Use global variable gInMemory in place of gInMemoryGuid ppi in DxeIplX64 module to point this module is shadowed or not for size reduction.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1987 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2006-11-21 03:01:52 +00:00
parent 4c50c88544
commit 25549f698d
2 changed files with 4 additions and 29 deletions

View File

@ -116,9 +116,6 @@
<Ppi Usage="SOMETIMES_CONSUMED"> <Ppi Usage="SOMETIMES_CONSUMED">
<PpiCName>gEfiPeiSecurityPpiGuid</PpiCName> <PpiCName>gEfiPeiSecurityPpiGuid</PpiCName>
</Ppi> </Ppi>
<Ppi Usage="PRIVATE">
<PpiCName>gPeiInMemoryGuid</PpiCName>
</Ppi>
</PPIs> </PPIs>
<Guids> <Guids>
<GuidCNames Usage="ALWAYS_CONSUMED"> <GuidCNames Usage="ALWAYS_CONSUMED">

View File

@ -52,12 +52,6 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiList = {
&mDxeIplPpi &mDxeIplPpi
}; };
static EFI_PEI_PPI_DESCRIPTOR mPpiPeiInMemory = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gPeiInMemoryGuid,
NULL
};
static EFI_PEI_PPI_DESCRIPTOR mPpiSignal = { static EFI_PEI_PPI_DESCRIPTOR mPpiSignal = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiEndOfPeiSignalPpiGuid, &gEfiEndOfPeiSignalPpiGuid,
@ -127,14 +121,7 @@ Returns:
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = PeiServicesLocatePpi ( if (!gInMemory && (BootMode != BOOT_ON_S3_RESUME)) {
&gPeiInMemoryGuid,
0,
NULL,
NULL
);
if (EFI_ERROR (Status) && (BootMode != BOOT_ON_S3_RESUME)) {
// //
// The DxeIpl has not yet been shadowed // The DxeIpl has not yet been shadowed
// //
@ -150,10 +137,6 @@ Returns:
} else { } else {
if (BootMode != BOOT_ON_S3_RESUME) { if (BootMode != BOOT_ON_S3_RESUME) {
//
// The DxeIpl has been shadowed
//
gInMemory = TRUE;
// //
// Install LoadFile PPI // Install LoadFile PPI
@ -167,7 +150,7 @@ Returns:
// //
// Install DxeIpl PPI // Install DxeIpl PPI
// //
PeiServicesInstallPpi (&mPpiList); Status = PeiServicesInstallPpi (&mPpiList);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;
@ -620,14 +603,9 @@ Returns:
if (Status == EFI_SUCCESS) { if (Status == EFI_SUCCESS) {
// //
// Install PeiInMemory to indicate the Dxeipl is shadowed // Set gInMemory global variable to TRUE to indicate the dxeipl is shadowed.
// //
Status = PeiServicesInstallPpi (&mPpiPeiInMemory); *(BOOLEAN *) ((UINTN) &gInMemory + (UINTN) DxeIplEntryPoint - (UINTN) _ModuleEntryPoint) = TRUE;
if (EFI_ERROR (Status)) {
return Status;
}
Status = ((EFI_PEIM_ENTRY_POINT) (UINTN) DxeIplEntryPoint) (DxeIplFileHeader, GetPeiServicesTablePointer()); Status = ((EFI_PEIM_ENTRY_POINT) (UINTN) DxeIplEntryPoint) (DxeIplFileHeader, GetPeiServicesTablePointer());
} }