]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / DxeMain / DxeMain.c
index 36a7ec6be6ba8b80cb4c93027ff7d6f4308efefe..04ec17708b2c9376b4c9640f604088b322009370 100644 (file)
@@ -1,8 +1,8 @@
 /** @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
@@ -215,8 +215,8 @@ EFI_DECOMPRESS_PROTOCOL  gEfiDecompress = {
 };\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
@@ -241,6 +241,11 @@ DxeMain (
   EFI_PHYSICAL_ADDRESS               MemoryBaseAddress;\r
   UINT64                             MemoryLength;\r
 \r
+  //\r
+  // Initialize Debug Agent to support source level debug in DXE phase\r
+  //\r
+  InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_CORE, HobStart);\r
+\r
   //\r
   // Initialize Memory Services\r
   //\r
@@ -294,11 +299,11 @@ DxeMain (
   //\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
@@ -331,7 +336,7 @@ DxeMain (
 \r
     for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
       if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {\r
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Memory Allocation %08x %0lx - %0lx\n", \\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Memory Allocation 0x%08x 0x%0lx - 0x%0lx\n", \\r
           Hob.MemoryAllocation->AllocDescriptor.MemoryType,                      \\r
           Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress,               \\r
           Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress + Hob.MemoryAllocation->AllocDescriptor.MemoryLength - 1));\r
@@ -339,9 +344,9 @@ DxeMain (
     }\r
     for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
       if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV2) {\r
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV2 Hob           %08x %0lx - %0lx\n", Hob.FirmwareVolume2->BaseAddress, Hob.FirmwareVolume2->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV2 Hob           0x%0lx - 0x%0lx\n", Hob.FirmwareVolume2->BaseAddress, Hob.FirmwareVolume2->BaseAddress + Hob.FirmwareVolume2->Length - 1));\r
       } else if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV) {\r
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV Hob            %08x %0lx - %0lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV Hob            0x%0lx - 0x%0lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->BaseAddress + Hob.FirmwareVolume2->Length - 1));\r
       }\r
     }\r
   DEBUG_CODE_END ();\r
@@ -378,8 +383,9 @@ DxeMain (
   //\r
   // Register for the GUIDs of the Architectural Protocols, so the rest of the\r
   // EFI Boot Services and EFI Runtime Services tables can be filled in.\r
+  // Also register for the GUIDs of optional protocols.\r
   //\r
-  CoreNotifyOnArchProtocolInstallation ();\r
+  CoreNotifyOnProtocolInstallation ();\r
 \r
   //\r
   // Produce Firmware Volume Protocols, one for each FV in the HOB list.\r
@@ -679,6 +685,11 @@ CoreExitBootServices (
   //\r
   CoreNotifySignalList (&gEfiEventExitBootServicesGuid);\r
 \r
+  //\r
+  // Disable interrupt of Debug timer.\r
+  //\r
+  SaveAndSetDebugTimerInterrupt (FALSE);\r
+\r
   //\r
   // Disable CPU Interrupts\r
   //\r