summaryrefslogtreecommitdiff
path: root/gnu-efi/inc
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2022-06-23 00:16:56 +0100
committerSteve McIntyre <steve@einval.com>2022-06-23 00:16:56 +0100
commite6ace38abd705fbe24349152b7c90d473404e86e (patch)
tree50e7a2d6b00d650fcbee8b0c54f0a0eacefc6929 /gnu-efi/inc
parent8529e0f7f70f427a7202815061362eceba6bfc50 (diff)
downloadefi-boot-shim-upstream/15.6.tar.gz
efi-boot-shim-upstream/15.6.zip
New upstream version 15.6upstream/15.6
Diffstat (limited to 'gnu-efi/inc')
-rw-r--r--gnu-efi/inc/efidef.h7
-rw-r--r--gnu-efi/inc/efiprot.h35
2 files changed, 39 insertions, 3 deletions
diff --git a/gnu-efi/inc/efidef.h b/gnu-efi/inc/efidef.h
index a552c7d9..841cc9ac 100644
--- a/gnu-efi/inc/efidef.h
+++ b/gnu-efi/inc/efidef.h
@@ -169,12 +169,13 @@ typedef enum {
#define EFI_MEMORY_WC 0x0000000000000002
#define EFI_MEMORY_WT 0x0000000000000004
#define EFI_MEMORY_WB 0x0000000000000008
-#define EFI_MEMORY_UCE 0x0000000000000010
-
-// physical memory protection on range
+#define EFI_MEMORY_UCE 0x0000000000000010
#define EFI_MEMORY_WP 0x0000000000001000
+
+// physical memory protection on range
#define EFI_MEMORY_RP 0x0000000000002000
#define EFI_MEMORY_XP 0x0000000000004000
+#define EFI_MEMORY_RO 0x0000000000020000
// range requires a runtime mapping
#define EFI_MEMORY_RUNTIME 0x8000000000000000
diff --git a/gnu-efi/inc/efiprot.h b/gnu-efi/inc/efiprot.h
index c83a574f..4013ab25 100644
--- a/gnu-efi/inc/efiprot.h
+++ b/gnu-efi/inc/efiprot.h
@@ -1422,4 +1422,39 @@ typedef struct _EFI_EBC_PROTOCOL {
EFI_EBC_GET_VERSION GetVersion;
} EFI_EBC_PROTOCOL;
+INTERFACE_DECL(_EFI_MEMORY_ATTRIBUTE_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_MEMORY_ATTRIBUTES)(
+ IN struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ OUT UINT64 *Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_MEMORY_ATTRIBUTES)(
+ IN struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CLEAR_MEMORY_ATTRIBUTES)(
+ IN struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes
+ );
+
+typedef struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL {
+ EFI_GET_MEMORY_ATTRIBUTES GetMemoryAttributes;
+ EFI_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;
+ EFI_CLEAR_MEMORY_ATTRIBUTES ClearMemoryAttributes;
+} EFI_MEMORY_ATTRIBUTE_PROTOCOL;
+
#endif