mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Fix a bug that PeiCore might fail to fix up Ppi pointer in CAR.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5527 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b39ece655b
commit
5c5a0601e8
@ -473,7 +473,7 @@ PeiDispatcher (
|
|||||||
// Update HandOffHob for new installed permenent memory
|
// Update HandOffHob for new installed permenent memory
|
||||||
//
|
//
|
||||||
OldHandOffTable = Private->HobList.HandoffInformationTable;
|
OldHandOffTable = Private->HobList.HandoffInformationTable;
|
||||||
OldCheckingBottom = (UINTN)OldHandOffTable;
|
OldCheckingBottom = (UINTN)(SecCoreData->TemporaryRamBase);
|
||||||
OldCheckingTop = (UINTN)(OldCheckingBottom + SecCoreData->TemporaryRamSize);
|
OldCheckingTop = (UINTN)(OldCheckingBottom + SecCoreData->TemporaryRamSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -552,7 +552,8 @@ PeiDispatcher (
|
|||||||
ConvertPpiPointers ((CONST EFI_PEI_SERVICES **)PeiServices,
|
ConvertPpiPointers ((CONST EFI_PEI_SERVICES **)PeiServices,
|
||||||
OldCheckingBottom,
|
OldCheckingBottom,
|
||||||
OldCheckingTop,
|
OldCheckingTop,
|
||||||
NewHandOffTable);
|
HeapOffset
|
||||||
|
);
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "Stack Hob: BaseAddress=0x%X Length=0x%X\n",
|
DEBUG ((EFI_D_INFO, "Stack Hob: BaseAddress=0x%X Length=0x%X\n",
|
||||||
(UINTN)PrivateInMem->StackBase,
|
(UINTN)PrivateInMem->StackBase,
|
||||||
|
@ -325,15 +325,16 @@ InitializePpiServices (
|
|||||||
@param PeiServices The PEI core services table.
|
@param PeiServices The PEI core services table.
|
||||||
@param OldCheckingBottom The old checking bottom.
|
@param OldCheckingBottom The old checking bottom.
|
||||||
@param OldCheckingTop The old checking top.
|
@param OldCheckingTop The old checking top.
|
||||||
@param NewHandOffHob The new handoff HOB list.
|
@param Fixup The address difference between
|
||||||
|
the new Hob list and old Hob list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
ConvertPpiPointers (
|
ConvertPpiPointers (
|
||||||
IN CONST EFI_PEI_SERVICES **PeiServices,
|
IN CONST EFI_PEI_SERVICES **PeiServices,
|
||||||
IN UINTN OldCheckingBottom,
|
IN UINTN OldCheckingBottom,
|
||||||
IN UINTN OldCheckingTop,
|
IN UINTN OldCheckingTop,
|
||||||
IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
|
IN UINTN Fixup
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -44,26 +44,24 @@ InitializePpiServices (
|
|||||||
@param PeiServices The PEI core services table.
|
@param PeiServices The PEI core services table.
|
||||||
@param OldCheckingBottom The old checking bottom.
|
@param OldCheckingBottom The old checking bottom.
|
||||||
@param OldCheckingTop The old checking top.
|
@param OldCheckingTop The old checking top.
|
||||||
@param NewHandOffHob The new handoff HOB list.
|
@param Fixup The address difference between
|
||||||
|
the new Hob list and old Hob list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
ConvertPpiPointers (
|
ConvertPpiPointers (
|
||||||
IN CONST EFI_PEI_SERVICES **PeiServices,
|
IN CONST EFI_PEI_SERVICES **PeiServices,
|
||||||
IN UINTN OldCheckingBottom,
|
IN UINTN OldCheckingBottom,
|
||||||
IN UINTN OldCheckingTop,
|
IN UINTN OldCheckingTop,
|
||||||
IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
|
IN UINTN Fixup
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PEI_CORE_INSTANCE *PrivateData;
|
PEI_CORE_INSTANCE *PrivateData;
|
||||||
UINT8 Index;
|
UINT8 Index;
|
||||||
PEI_PPI_LIST_POINTERS *PpiPointer;
|
PEI_PPI_LIST_POINTERS *PpiPointer;
|
||||||
UINTN Fixup;
|
|
||||||
|
|
||||||
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
|
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);
|
||||||
|
|
||||||
Fixup = (UINTN)NewHandOffHob - OldCheckingBottom;
|
|
||||||
|
|
||||||
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
|
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
|
||||||
if (Index < PrivateData->PpiData.PpiListEnd ||
|
if (Index < PrivateData->PpiData.PpiListEnd ||
|
||||||
Index > PrivateData->PpiData.NotifyListEnd) {
|
Index > PrivateData->PpiData.NotifyListEnd) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user