summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/DxeMain
diff options
context:
space:
mode:
authorjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-05 07:54:16 +0000
committerjchen20 <jchen20@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-05 07:54:16 +0000
commit54ea99a798f7d714b59503fcc21ee97878bc6492 (patch)
treedfbab215685cc880a8e46833f2369c24d9e7d28a /MdeModulePkg/Core/Dxe/DxeMain
parentf3198cba84f56f85281b87c4e9bf96e77a934f16 (diff)
downloadedk2-platforms-54ea99a798f7d714b59503fcc21ee97878bc6492.tar.xz
Enable the Load Module At fixed Address feature
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9937 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/DxeMain')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 52f9437b9e..5d1d6df202 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -210,6 +210,11 @@ EFI_DECOMPRESS_PROTOCOL gEfiDecompress = {
};
//
+// For Loading modules at fixed address feature, the configuration table is to cache the top address below which to load
+// Runtime code&boot time code
+//
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
+
// Main entry point to the DXE Core
//
@@ -284,7 +289,16 @@ DxeMain (
//
Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);
ASSERT_EFI_ERROR (Status);
-
+
+ //
+ // If Loading modules At fixed address feature is enabled, install Load moduels at fixed address
+ // Configuration Table so that user could easily to retrieve the top address to load Dxe and PEI
+ // Code and Tseg base to load SMM driver.
+ //
+ if (FixedPcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {
+ Status = CoreInstallConfigurationTable (&gLoadFixedAddressConfigurationTableGuid, &gLoadModuleAtFixAddressConfigurationTable);
+ ASSERT_EFI_ERROR (Status);
+ }
//
// Report Status Code here for DXE_ENTRY_POINT once it is available
//