diff options
Diffstat (limited to 'OvmfPkg/PlatformPei/Platform.c')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index fe25486fa4..aa64aa381c 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -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,
@@ -207,6 +218,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;
}
|