]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / RuntimeDxe / EfiRuntimeLib / x64 / RuntimeLib.c
index d9d5f70f46c31a43ceb3e090376d5498c0c9dc90..93cef53e0f9bd675e832ee9bd0eca25d60b9a37d 100644 (file)
@@ -792,7 +792,13 @@ Returns:
 \r
 #if (EFI_SPECIFICATION_VERSION >= 0x00020000) \r
   if (gStatusCode == NULL) {\r
-    return EFI_UNSUPPORTED;\r
+    if (EfiAtRuntime ()) {\r
+      return EFI_UNSUPPORTED;\r
+    }\r
+    Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);\r
+    if (EFI_ERROR (Status) || gStatusCode == NULL) {\r
+      return EFI_UNSUPPORTED;\r
+    }\r
   }\r
   Status = gStatusCode->ReportStatusCode (CodeType, Value, Instance, CallerId, Data);\r
 #else\r
@@ -811,33 +817,3 @@ Returns:
 #endif\r
   return Status;\r
 }\r
-\r
-//\r
-// Cache Flush Routine.\r
-//\r
-EFI_STATUS\r
-EfiCpuFlushCache (\r
-  IN EFI_PHYSICAL_ADDRESS          Start,\r
-  IN UINT64                        Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Flush cache with specified range.\r
-\r
-Arguments:\r
-\r
-  Start   - Start address\r
-  Length  - Length in bytes\r
-\r
-Returns:\r
-\r
-  Status code\r
-  \r
-  EFI_SUCCESS - success\r
-\r
---*/\r
-{\r
-  return EFI_SUCCESS;\r
-}\r