]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c
1. Removed #ifdef EDK_RELEASE_VERSION from all c files for all modules
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Runtime.c
index f24d2a5c234cb46a76c4f4efb16f74dcd2e6a860..17cafea187bd3878927721edd1b843bed22bb7d0 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, 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
@@ -22,24 +22,24 @@ Abstract:
   THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT\r
 \r
   The transition for calling EFI Runtime functions in physical mode to calling\r
-  them in virtual mode is very very complex. Every pointer in needs to be \r
+  them in virtual mode is very very complex. Every pointer in needs to be\r
   converted from physical mode to virtual mode. Be very careful walking linked\r
   lists! Then to make it really hard the code it's self needs be relocated into\r
   the new virtual address space.\r
 \r
   So here is the concept. The code in this module will never ever be called in\r
   virtual mode. This is the code that collects the information needed to convert\r
-  to virtual mode (DXE core registers runtime stuff with this code). Since this \r
+  to virtual mode (DXE core registers runtime stuff with this code). Since this\r
   code is used to fixup all runtime images, it CAN NOT fix it's self up. So some\r
   code has to stay behind and that is us.\r
 \r
-  Also you need to be careful about when you allocate memory, as once we are in \r
-  runtime (including our EVT_SIGNAL_EXIT_BOOT_SERVICES event) you can no longer \r
+  Also you need to be careful about when you allocate memory, as once we are in\r
+  runtime (including our EVT_SIGNAL_EXIT_BOOT_SERVICES event) you can no longer\r
   allocate memory.\r
 \r
-  Any runtime driver that gets loaded before us will not be callable in virtual \r
-  mode. This is due to the fact that the DXE core can not register the info \r
-  needed with us. This is good, since it keeps the code in this file from \r
+  Any runtime driver that gets loaded before us will not be callable in virtual\r
+  mode. This is due to the fact that the DXE core can not register the info\r
+  needed with us. This is good, since it keeps the code in this file from\r
   getting registered.\r
 \r
 \r
@@ -79,8 +79,8 @@ EFI_RUNTIME_ARCH_PROTOCOL     mRuntime = {
   // 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
@@ -136,7 +136,7 @@ Routine Description:
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
 \r
 Arguments:\r
-  \r
+\r
   DebugDisposition    - Supplies type information for the pointer being converted.\r
   ConvertAddress      - A pointer to a pointer that is to be fixed to be the value needed\r
                         for the new virtual address mappings being applied.\r
@@ -234,11 +234,11 @@ RuntimeDriverConvertInternalPointer (
 \r
 Routine Description:\r
 \r
-  Determines the new virtual address that is to be used on subsequent memory accesses \r
+  Determines the new virtual address that is to be used on subsequent memory accesses\r
   for internal pointers.\r
 \r
 Arguments:\r
-  \r
+\r
   ConvertAddress  - A pointer to a pointer that is to be fixed to be the value needed\r
                     for the new virtual address mappings being applied.\r
 \r
@@ -269,7 +269,7 @@ Routine Description:
   Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
 \r
 Arguments:\r
-  \r
+\r
   MemoryMapSize     - The size in bytes of VirtualMap.\r
   DescriptorSize    - The size in bytes of an entry in the VirtualMap.\r
   DescriptorVersion - The version of the structure entries in VirtualMap.\r
@@ -287,7 +287,7 @@ Returns:
   EFI_NOT_FOUND         - A virtual address was supplied for an address that is not found\r
                           in the memory map.\r
 \r
---*/  \r
+--*/\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_RUNTIME_EVENT_ENTRY       *RuntimeEvent;\r
@@ -298,9 +298,7 @@ Returns:
   EFI_DRIVER_OS_HANDOFF_HEADER  *DriverOsHandoffHeader;\r
   EFI_DRIVER_OS_HANDOFF         *DriverOsHandoff;\r
   EFI_PHYSICAL_ADDRESS          VirtImageBase;\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-  EFI_CAPSULE_TABLE             *CapsuleTable; \r
-#endif\r
+  EFI_CAPSULE_TABLE             *CapsuleTable;\r
 \r
   //\r
   // Can only switch to virtual addresses once the memory map is locked down,\r
@@ -372,7 +370,7 @@ Returns:
         (UINTN) RuntimeImage->ImageSize,\r
         RuntimeImage->RelocationData\r
         );\r
-      \r
+\r
       InvalidateInstructionCacheRange (RuntimeImage->ImageBase, (UINTN)RuntimeImage->ImageSize);\r
     }\r
   }\r
@@ -386,18 +384,13 @@ Returns:
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetWakeupTime);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetWakeupTime);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ResetSystem);\r
-#if (EFI_SPECIFICATION_VERSION < 0x00020000)\r
-  RuntimeDriverConvertInternalPointer ((VOID **) &gRT->ReportStatusCode);\r
-#endif\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextHighMonotonicCount);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetVariable);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetVariable);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextVariableName);\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryVariableInfo);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->UpdateCapsule);\r
   RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryCapsuleCapabilities);\r
-#endif\r
   RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);\r
 \r
   //\r
@@ -421,15 +414,13 @@ Returns:
       RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));\r
     }\r
 \r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
     if (CompareGuid (&gEfiCapsuleGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {\r
       CapsuleTable = gST->ConfigurationTable[Index].VendorTable;\r
       for (Index1 = 0; Index1 < CapsuleTable->CapsuleArrayNumber; Index1++) {\r
         RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &CapsuleTable->CapsulePtr[Index1]);\r
-      }     \r
+      }\r
       RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));\r
     }\r
-#endif\r
   }\r
   //\r
   // Convert the runtime fields of the EFI System Table and recompute the CRC-32\r
@@ -512,6 +503,6 @@ Returns:
                   NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r