[edk2-devel] [PATCH v2 2/3] MdePkg/MdeModule: Add support for RuntimeServicesSupported variable

Jeff Brasen via Groups.Io jbrasen=nvidia.com at groups.io
Wed Nov 27 23:25:08 UTC 2019


Add support for new global variable defined in the UEFI 2.8
specification. This provides a bitmask of which calls are
implemented by the firmware during runtime services.

Change-Id: If871e16052ecd871fd03a0eef2e3ed5fa5beb93c
Signed-off-by: Jeff Brasen <jbrasen at nvidia.com>
---
 .../Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c        | 11 +++++++++++
 MdePkg/Include/Guid/GlobalVariable.h                          |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
index e3bf04a..4264892 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
@@ -553,6 +553,17 @@ UEFI_DEFINED_VARIABLE_ENTRY mGlobalVariableList[] = {
     },
     NULL
   },
+  {
+    EFI_RUNTIME_SERVICES_SUPPORTED_VARIABLE_NAME,
+    {
+      VAR_CHECK_VARIABLE_PROPERTY_REVISION,
+      VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY,
+      VARIABLE_ATTRIBUTE_BS_RT,
+      sizeof (UINT16),
+      sizeof (UINT16)
+    },
+    NULL
+  },
 };
 
 UEFI_DEFINED_VARIABLE_ENTRY mGlobalVariableList2[] = {
diff --git a/MdePkg/Include/Guid/GlobalVariable.h b/MdePkg/Include/Guid/GlobalVariable.h
index 7abc103..06a8a12 100644
--- a/MdePkg/Include/Guid/GlobalVariable.h
+++ b/MdePkg/Include/Guid/GlobalVariable.h
@@ -182,5 +182,12 @@ extern EFI_GUID gEfiGlobalVariableGuid;
 /// Its attribute is BS+RT.
 ///
 #define EFI_VENDOR_KEYS_VARIABLE_NAME               L"VendorKeys"
+///
+/// Bitmask of which calls are implemented by the firmware during runtime services.
+/// RT access is required only if GetVariable() is implemented by runtime services.
+/// Should be treated as read-only.
+/// Its attribute is BS+RT.
+///
+#define EFI_RUNTIME_SERVICES_SUPPORTED_VARIABLE_NAME  L"RuntimeServicesSupported"
 
 #endif
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51380): https://edk2.groups.io/g/devel/message/51380
Mute This Topic: https://groups.io/mt/63268505/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list