]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c
1. Removed #ifdef EDK_RELEASE_VERSION from all c files for all modules
[mirror_edk2.git] / EdkModulePkg / Core / Dxe / DxeMain / DxeMain.c
index 9252d85ebf40842db9f12f730ec30b092acb9b6c..fce61bd45e778c7a10798f8828d5e95a3d2525d7 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -67,7 +67,7 @@ EFI_BOOT_SERVICES mBootServices = {
     sizeof (EFI_BOOT_SERVICES),                                                           // HeaderSize\r
     0,                                                                                    // CRC32\r
     0                                                                                     // Reserved\r
-  },                                                                                      \r
+  },\r
   (EFI_RAISE_TPL)                               CoreRaiseTpl,                             // RaiseTPL\r
   (EFI_RESTORE_TPL)                             CoreRestoreTpl,                           // RestoreTPL\r
   (EFI_ALLOCATE_PAGES)                          CoreAllocatePages,                        // AllocatePages\r
@@ -110,11 +110,8 @@ EFI_BOOT_SERVICES mBootServices = {
   (EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)  CoreUninstallMultipleProtocolInterfaces,  // UninstallMultipleProtocolInterfaces\r
   (EFI_CALCULATE_CRC32)                         CoreEfiNotAvailableYetArg3,               // CalculateCrc32\r
   (EFI_COPY_MEM)                                CopyMem,                                  // CopyMem\r
-  (EFI_SET_MEM)                                 SetMem                                    // SetMem\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-  ,                                   \r
-  (EFI_CREATE_EVENT_EX)                          CoreCreateEventEx                         // CreateEventEx\r
-#endif\r
+  (EFI_SET_MEM)                                 SetMem,                                   // SetMem\r
+  (EFI_CREATE_EVENT_EX)                         CoreCreateEventEx                         // CreateEventEx\r
 };\r
 \r
 EFI_DXE_SERVICES mDxeServices = {\r
@@ -174,33 +171,20 @@ EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {
     0,                                                            // CRC32\r
     0                                                             // Reserved\r
   },\r
-  (EFI_GET_TIME)                 CoreEfiNotAvailableYetArg2,      // GetTime\r
-  (EFI_SET_TIME)                 CoreEfiNotAvailableYetArg1,      // SetTime\r
-  (EFI_GET_WAKEUP_TIME)          CoreEfiNotAvailableYetArg3,      // GetWakeupTime\r
-  (EFI_SET_WAKEUP_TIME)          CoreEfiNotAvailableYetArg2,      // SetWakeupTime\r
-  (EFI_SET_VIRTUAL_ADDRESS_MAP)  CoreEfiNotAvailableYetArg4,      // SetVirtualAddressMap\r
-  (EFI_CONVERT_POINTER)          CoreEfiNotAvailableYetArg2,      // ConvertPointer\r
-  (EFI_GET_VARIABLE)             CoreEfiNotAvailableYetArg5,      // GetVariable\r
-  (EFI_GET_NEXT_VARIABLE_NAME)   CoreEfiNotAvailableYetArg3,      // GetNextVariableName\r
-  (EFI_SET_VARIABLE)             CoreEfiNotAvailableYetArg5,      // SetVariable\r
-  (EFI_GET_NEXT_HIGH_MONO_COUNT) CoreEfiNotAvailableYetArg1,      // GetNextHighMonotonicCount\r
-  (EFI_RESET_SYSTEM)             CoreEfiNotAvailableYetArg4       // ResetSystem \r
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION <  0x00020000))\r
-  //\r
-  // This Tiano extension was removed when UEFI 2.0 support was added. \r
-  // It's now just a protocol.\r
-  //\r
-  ,\r
-  (EFI_REPORT_STATUS_CODE)       CoreEfiNotAvailableYetArg5       // ReportStatusCode\r
-#elif (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-  //\r
-  // New runtime services added by UEFI 2.0\r
-  //\r
-  ,\r
+  (EFI_GET_TIME)                    CoreEfiNotAvailableYetArg2,   // GetTime\r
+  (EFI_SET_TIME)                    CoreEfiNotAvailableYetArg1,   // SetTime\r
+  (EFI_GET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg3,   // GetWakeupTime\r
+  (EFI_SET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg2,   // SetWakeupTime\r
+  (EFI_SET_VIRTUAL_ADDRESS_MAP)     CoreEfiNotAvailableYetArg4,   // SetVirtualAddressMap\r
+  (EFI_CONVERT_POINTER)             CoreEfiNotAvailableYetArg2,   // ConvertPointer\r
+  (EFI_GET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // GetVariable\r
+  (EFI_GET_NEXT_VARIABLE_NAME)      CoreEfiNotAvailableYetArg3,   // GetNextVariableName\r
+  (EFI_SET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // SetVariable\r
+  (EFI_GET_NEXT_HIGH_MONO_COUNT)    CoreEfiNotAvailableYetArg1,   // GetNextHighMonotonicCount\r
+  (EFI_RESET_SYSTEM)                CoreEfiNotAvailableYetArg4,   // ResetSystem\r
   (EFI_UPDATE_CAPSULE)              CoreEfiNotAvailableYetArg3,   // UpdateCapsule\r
   (EFI_QUERY_CAPSULE_CAPABILITIES)  CoreEfiNotAvailableYetArg4,   // QueryCapsuleCapabilities\r
   (EFI_QUERY_VARIABLE_INFO)         CoreEfiNotAvailableYetArg4    // QueryVariableInfo\r
-#endif\r
 };\r
 \r
 EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {\r
@@ -212,8 +196,8 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
   // prevent people from having pointer math bugs in their code.\r
   // now you have to use *DescriptorSize to make things work.\r
   //\r
-  sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),  \r
-  EFI_MEMORY_DESCRIPTOR_VERSION, \r
+  sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),\r
+  EFI_MEMORY_DESCRIPTOR_VERSION,\r
   0,\r
   NULL,\r
   NULL,\r
@@ -224,7 +208,7 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
 EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;\r
 \r
 //\r
-// DXE Core Global Variables for the EFI System Table, Boot Services Table, \r
+// DXE Core Global Variables for the EFI System Table, Boot Services Table,\r
 // DXE Services Table, and Runtime Services Table\r
 //\r
 EFI_BOOT_SERVICES     *gBS = &mBootServices;\r
@@ -311,7 +295,7 @@ Returns:
   ASSERT (gRT != NULL);\r
 \r
   gST->RuntimeServices = gRT;\r
-  \r
+\r
   //\r
   // Start the Image Services.\r
   //\r
@@ -353,13 +337,6 @@ Returns:
   // Initialize the ReportStatusCode with PEI version, if available\r
   //\r
   CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode->ReportStatusCode);\r
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))\r
-  //\r
-  // This Tiano extension was removed when UEFI 2.0 support was added. \r
-  // It's now just a protocol.\r
-  //\r
-  gRT->ReportStatusCode = gStatusCode->ReportStatusCode;\r
-#endif\r
 \r
   //\r
   // Report Status Code here for DXE_ENTRY_POINT once it is available\r
@@ -386,22 +363,22 @@ Returns:
   Status = CoreInitializeEventServices ();\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-   \r
+\r
   //\r
   // Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs\r
   //\r
-  // These Protocols are not architectural. This implementation is sharing code between \r
-  // PEI and DXE in order to save FLASH space. These Protocols could also be implemented \r
-  // as part of the DXE Core. However, that would also require the DXE Core to be ported \r
-  // each time a different CPU is used, a different Decompression algorithm is used, or a \r
-  // different Image type is used. By placing these Protocols in PEI, the DXE Core remains \r
-  // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform, \r
+  // These Protocols are not architectural. This implementation is sharing code between\r
+  // PEI and DXE in order to save FLASH space. These Protocols could also be implemented\r
+  // as part of the DXE Core. However, that would also require the DXE Core to be ported\r
+  // each time a different CPU is used, a different Decompression algorithm is used, or a\r
+  // different Image type is used. By placing these Protocols in PEI, the DXE Core remains\r
+  // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,\r
   // and from CPU to CPU.\r
   //\r
 \r
   //\r
   // Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components\r
-  //   \r
+  //\r
   Status = CoreInstallMultipleProtocolInterfaces (\r
               &mDecompressHandle,\r
               &gEfiDecompressProtocolGuid,           &gEfiDecompress,\r
@@ -430,7 +407,7 @@ Returns:
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
-  // Produce the Section Extraction Protocol \r
+  // Produce the Section Extraction Protocol\r
   //\r
   Status = InitializeSectionExtraction (gDxeCoreImageHandle, gST);\r
   ASSERT_EFI_ERROR (Status);\r
@@ -455,7 +432,7 @@ Returns:
   DEBUG_CODE_BEGIN ();\r
     CoreDisplayMissingArchProtocols ();\r
   DEBUG_CODE_END ();\r
-  \r
+\r
   //\r
   // Assert if the Architectural Protocols are not present.\r
   //\r
@@ -477,7 +454,7 @@ Returns:
   // Transfer control to the BDS Architectural Protocol\r
   //\r
   gBds->Entry (gBds);\r
-  \r
+\r
   //\r
   // BDS should never return\r
   //\r
@@ -561,7 +538,7 @@ Routine Description:
 Arguments:\r
 \r
   Arg1        - Undefined\r
-  \r
+\r
   Arg2        - Undefined\r
 \r
 Returns:\r
@@ -595,9 +572,9 @@ Routine Description:
 Arguments:\r
 \r
   Arg1        - Undefined\r
-  \r
+\r
   Arg2        - Undefined\r
-  \r
+\r
   Arg3        - Undefined\r
 \r
 Returns:\r
@@ -632,11 +609,11 @@ Routine Description:
 Arguments:\r
 \r
   Arg1        - Undefined\r
-  \r
+\r
   Arg2        - Undefined\r
-  \r
+\r
   Arg3        - Undefined\r
-  \r
+\r
   Arg4        - Undefined\r
 \r
 Returns:\r
@@ -672,13 +649,13 @@ Routine Description:
 Arguments:\r
 \r
   Arg1        - Undefined\r
-  \r
+\r
   Arg2        - Undefined\r
-  \r
+\r
   Arg3        - Undefined\r
-  \r
+\r
   Arg4        - Undefined\r
-  \r
+\r
   Arg5        - Undefined\r
 \r
 Returns:\r
@@ -729,7 +706,7 @@ Returns:
   if (GuidHob == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   Buffer = GET_GUID_HOB_DATA (GuidHob);\r
   ASSERT (Buffer != NULL);\r
 \r
@@ -763,14 +740,14 @@ Returns:
   UINT32 Crc;\r
 \r
   Hdr->CRC32 = 0;\r
-  \r
+\r
   //\r
   // If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
   //  Crc will come back as zero if we set it to zero here\r
   //\r
   Crc = 0;\r
   gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
-  Hdr->CRC32 = Crc; \r
+  Hdr->CRC32 = Crc;\r
 }\r
 \r
 \r
@@ -853,12 +830,12 @@ Returns:
   //\r
   SetMem (gBS, sizeof (EFI_BOOT_SERVICES), 0);\r
   gBS = NULL;\r
-  \r
+\r
   //\r
   // Update the AtRuntime field in Runtiem AP.\r
   //\r
   gRuntime->AtRuntime = TRUE;\r
-  \r
+\r
   return Status;\r
 }\r
 \r