OvmfPkg/PlatformPei: Set BootMode, install MasterBootMode PPI

MdeModulePkg/Core/DxeIplPeim is now dependent on
gEfiPeiMasterBootModePpiGuid in order to run.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11412 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2011-03-22 01:55:08 +00:00
parent dc76cddca6
commit 9ed65b1005
2 changed files with 26 additions and 0 deletions

View File

@ -27,8 +27,10 @@
#include <Library/PcdLib.h>
#include <Library/PciLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/ResourcePublicationLib.h>
#include <Guid/MemoryTypeInformation.h>
#include <Ppi/MasterBootMode.h>
#include "Platform.h"
#include "Cmos.h"
@ -45,6 +47,15 @@ EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
};
EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
{
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
&gEfiPeiMasterBootModePpiGuid,
NULL
}
};
VOID
AddIoMemoryBaseSizeHob (
EFI_PHYSICAL_ADDRESS MemoryBase,
@ -206,6 +217,15 @@ MiscInitialization (
}
VOID
BootModeInitialization (
)
{
ASSERT_EFI_ERROR (PeiServicesSetBootMode (BOOT_WITH_FULL_CONFIGURATION));
ASSERT_EFI_ERROR (PeiServicesInstallPpi (mPpiBootMode));
}
VOID
ReserveEmuVariableNvStore (
)
@ -285,5 +305,7 @@ InitializePlatform (
MiscInitialization ();
BootModeInitialization ();
return EFI_SUCCESS;
}

View File

@ -48,6 +48,7 @@
IoLib
PciLib
PeiResourcePublicationLib
PeiServicesLib
PeiServicesTablePointerLib
PeimEntryPoint
@ -59,6 +60,9 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
[Ppis]
gEfiPeiMasterBootModePpiGuid
[Depex]
TRUE