mirror of https://github.com/acidanthera/audk.git
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:
parent
4c50c88544
commit
25549f698d
|
@ -116,9 +116,6 @@
|
|||
<Ppi Usage="SOMETIMES_CONSUMED">
|
||||
<PpiCName>gEfiPeiSecurityPpiGuid</PpiCName>
|
||||
</Ppi>
|
||||
<Ppi Usage="PRIVATE">
|
||||
<PpiCName>gPeiInMemoryGuid</PpiCName>
|
||||
</Ppi>
|
||||
</PPIs>
|
||||
<Guids>
|
||||
<GuidCNames Usage="ALWAYS_CONSUMED">
|
||||
|
|
|
@ -52,12 +52,6 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiList = {
|
|||
&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 = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEfiEndOfPeiSignalPpiGuid,
|
||||
|
@ -127,14 +121,7 @@ Returns:
|
|||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gPeiInMemoryGuid,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status) && (BootMode != BOOT_ON_S3_RESUME)) {
|
||||
if (!gInMemory && (BootMode != BOOT_ON_S3_RESUME)) {
|
||||
//
|
||||
// The DxeIpl has not yet been shadowed
|
||||
//
|
||||
|
@ -150,10 +137,6 @@ Returns:
|
|||
|
||||
} else {
|
||||
if (BootMode != BOOT_ON_S3_RESUME) {
|
||||
//
|
||||
// The DxeIpl has been shadowed
|
||||
//
|
||||
gInMemory = TRUE;
|
||||
|
||||
//
|
||||
// Install LoadFile PPI
|
||||
|
@ -167,7 +150,7 @@ Returns:
|
|||
//
|
||||
// Install DxeIpl PPI
|
||||
//
|
||||
PeiServicesInstallPpi (&mPpiList);
|
||||
Status = PeiServicesInstallPpi (&mPpiList);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
|
@ -620,14 +603,9 @@ Returns:
|
|||
|
||||
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);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
*(BOOLEAN *) ((UINTN) &gInMemory + (UINTN) DxeIplEntryPoint - (UINTN) _ModuleEntryPoint) = TRUE;
|
||||
Status = ((EFI_PEIM_ENTRY_POINT) (UINTN) DxeIplEntryPoint) (DxeIplFileHeader, GetPeiServicesTablePointer());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue