summaryrefslogtreecommitdiff
path: root/UnixPkg/Sec
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-16 20:23:33 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-16 20:23:33 +0000
commit249383cf15342d386e7cf832191653e8232b0a3d (patch)
treee7dbbd89efafb92306165851488601dd08d021ad /UnixPkg/Sec
parent45059fab2a4fdff047d4f485c9691f28d47f135e (diff)
downloadedk2-249383cf15342d386e7cf832191653e8232b0a3d.zip
edk2-249383cf15342d386e7cf832191653e8232b0a3d.tar.gz
edk2-249383cf15342d386e7cf832191653e8232b0a3d.tar.bz2
Added SecDispatchTable library to allow custom PPIs to be passed up to into PEI Core. This will allow platform specific libraries to do thinks like map hardware devices directly into the emulator.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10882 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Sec')
-rw-r--r--UnixPkg/Sec/SecMain.c9
-rw-r--r--UnixPkg/Sec/SecMain.h2
-rw-r--r--UnixPkg/Sec/SecMain.inf1
3 files changed, 11 insertions, 1 deletions
diff --git a/UnixPkg/Sec/SecMain.c b/UnixPkg/Sec/SecMain.c
index 76ac58e..b2046b6 100644
--- a/UnixPkg/Sec/SecMain.c
+++ b/UnixPkg/Sec/SecMain.c
@@ -543,6 +543,7 @@ Returns:
EFI_PHYSICAL_ADDRESS PeiImageAddress;
EFI_SEC_PEI_HAND_OFF *SecCoreData;
UINTN PeiStackSize;
+ EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
//
// Compute Top Of Memory for Stack and PEI Core Allocations
@@ -597,12 +598,18 @@ Returns:
}
//
+ // Allow an override for extra PPIs to be passed up to PEI
+ // This is an easy way to enable OS specific customizations
+ //
+ DispatchTable = OverrideDispatchTable (&gPrivateDispatchTable[0]);
+
+ //
// Transfer control to the PEI Core
//
PeiSwitchStacks (
(SWITCH_STACK_ENTRY_POINT) (UINTN) PeiCoreEntryPoint,
SecCoreData,
- (VOID *) (UINTN) ((EFI_PEI_PPI_DESCRIPTOR *) &gPrivateDispatchTable),
+ (VOID *)DispatchTable,
NULL,
TopOfStack
);
diff --git a/UnixPkg/Sec/SecMain.h b/UnixPkg/Sec/SecMain.h
index 9d34787..408a761 100644
--- a/UnixPkg/Sec/SecMain.h
+++ b/UnixPkg/Sec/SecMain.h
@@ -30,6 +30,8 @@ Abstract:
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <Library/ReportStatusCodeLib.h>
+#include <Library/SecDispatchTableLib.h>
+
#define STACK_SIZE 0x20000
diff --git a/UnixPkg/Sec/SecMain.inf b/UnixPkg/Sec/SecMain.inf
index 890c2ea..da09d07 100644
--- a/UnixPkg/Sec/SecMain.inf
+++ b/UnixPkg/Sec/SecMain.inf
@@ -62,6 +62,7 @@
BaseLib
PeCoffLib
ReportStatusCodeLib
+ SecDispatchTableLib
[Ppis]