summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-22 01:55:08 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-22 01:55:08 +0000
commit9ed65b1005034bc4c051af5e237fa4e637570afc (patch)
tree6019ef6cff9d26b3f06580cf1d3746845afa281f /OvmfPkg
parentdc76cddca6dc687f7d08f59b18ded542629f92d3 (diff)
downloadedk2-platforms-9ed65b1005034bc4c051af5e237fa4e637570afc.tar.xz
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
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c22
-rw-r--r--OvmfPkg/PlatformPei/PlatformPei.inf4
2 files changed, 26 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;
}
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index 3f0a19439e..2926553f5f 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -48,6 +48,7 @@
IoLib
PciLib
PeiResourcePublicationLib
+ PeiServicesLib
PeiServicesTablePointerLib
PeimEntryPoint
@@ -59,6 +60,9 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
+[Ppis]
+ gEfiPeiMasterBootModePpiGuid
+
[Depex]
TRUE