diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-09 08:16:53 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-09 08:16:53 +0000 |
commit | 81c7803cf4a49ca2633c706b7630c1cf2d9e9b55 (patch) | |
tree | c4f4dd9d4cf3a1e943acbbf85f80cd43a299bc41 /MdeModulePkg/Core | |
parent | d173d9c7616a5e7c3c7758e5692335dacfedebe1 (diff) | |
download | edk2-platforms-81c7803cf4a49ca2633c706b7630c1cf2d9e9b55.tar.xz |
PI Enabling: the address of PeiServices Pointer should be
1) Set to preceding of IDT table in PeiCore's entry
2) Migrate to preceding of new memory IDT table when memory is discovery
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4059 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 9d73c53bb1..7294d85c6c 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -395,7 +395,8 @@ Returns: // Migrate IDT from CAR into real memory, so after stack switches to
// the new memory, the caller can get memory version PeiServiceTable.
//
- //MigrateIdtTable (PeiServices);
+ MigrateIdtTable (PeiServices);
+
//
// Since we are at dispatch level, only the Core's private data
// is preserved, nobody else should have any data on the stack.
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index f858740971..4dd7f26c30 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -166,6 +166,11 @@ Returns: InitializePpiServices (&PrivateData, OldCoreData);
+ //
+ // Save PeiServicePointer so that it can be retrieved anywhere.
+ //
+ SetPeiServicesTablePointer(&PrivateData.PS);
+
if (OldCoreData != NULL) {
PERF_END (NULL,"PreMem", NULL, 0);
|