/** @file\r
DXE Core Main Entry Point\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
};\r
\r
//\r
-// For Loading modules at fixed address feature, the configuration table is to cache the top address below which to load \r
-// Runtime code&boot time code \r
+// For Loading modules at fixed address feature, the configuration table is to cache the top address below which to load\r
+// Runtime code&boot time code\r
//\r
GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable = {0, 0};\r
\r
IN VOID *HobStart\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_PHYSICAL_ADDRESS MemoryBaseAddress;\r
- UINT64 MemoryLength;\r
+ EFI_STATUS Status;\r
+ EFI_PHYSICAL_ADDRESS MemoryBaseAddress;\r
+ UINT64 MemoryLength;\r
+ PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;\r
+\r
+ //\r
+ // Initialize Debug Agent to support source level debug in DXE phase\r
+ //\r
+ InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_CORE, HobStart, NULL);\r
\r
//\r
// Initialize Memory Services\r
PERF_END (NULL,"PEI", NULL, 0) ;\r
PERF_START (NULL,"DXE", NULL, 0) ;\r
\r
+ //\r
+ // Report DXE Core image information to the PE/COFF Extra Action Library\r
+ //\r
+ ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)gDxeCoreLoadedImage->ImageBase;\r
+ ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageContext.ImageAddress);\r
+ PeCoffLoaderRelocateImageExtraAction (&ImageContext);\r
+\r
//\r
// Initialize the Global Coherency Domain Services\r
//\r
//\r
Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);\r
ASSERT_EFI_ERROR (Status);\r
- \r
+\r
//\r
- // If Loading modules At fixed address feature is enabled, install Load moduels at fixed address \r
+ // If Loading modules At fixed address feature is enabled, install Load moduels at fixed address\r
// Configuration Table so that user could easily to retrieve the top address to load Dxe and PEI\r
- // Code and Tseg base to load SMM driver. \r
+ // Code and Tseg base to load SMM driver.\r
//\r
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {\r
Status = CoreInstallConfigurationTable (&gLoadFixedAddressConfigurationTableGuid, &gLoadModuleAtFixAddressConfigurationTable);\r
{\r
EFI_STATUS Status;\r
\r
+ //\r
+ // Disable Timer\r
+ //\r
+ gTimer->SetTimerPeriod (gTimer, 0);\r
+\r
//\r
// Terminate memory services if the MapKey matches\r
//\r
}\r
\r
//\r
- // Disable Timer\r
+ // Notify other drivers that we are exiting boot services.\r
//\r
- gTimer->SetTimerPeriod (gTimer, 0);\r
+ CoreNotifySignalList (&gEfiEventExitBootServicesGuid);\r
\r
//\r
- // Notify other drivers that we are exiting boot services.\r
+ // Disable interrupt of Debug timer.\r
//\r
- CoreNotifySignalList (&gEfiEventExitBootServicesGuid);\r
+ SaveAndSetDebugTimerInterrupt (FALSE);\r
\r
//\r
// Disable CPU Interrupts\r