| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "efi.h" |
| 5 |
|
| 6 |
#define EFI_MEMORY_ATTRIBUTE_PROTOCOL_GUID \ |
| 7 |
GUID_DEF(0xf4560cf6, 0x40ec, 0x4b4a, 0xa1, 0x92, 0xbf, 0x1d, 0x57, 0xd0, 0xb1, 0x89) |
| 8 |
|
| 9 |
#define EFI_MEMORY_RP 0x0000000000002000 |
| 10 |
#define EFI_MEMORY_XP 0x0000000000004000 |
| 11 |
#define EFI_MEMORY_RO 0x0000000000020000 |
| 12 |
|
| 13 |
struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL; |
| 14 |
|
| 15 |
typedef struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL { |
| 16 |
EFI_STATUS (EFIAPI *GetMemoryAttributes)( |
| 17 |
struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This, |
| 18 |
EFI_PHYSICAL_ADDRESS BaseAddress, |
| 19 |
uint64_t Length, |
| 20 |
uint64_t *Attributes); |
| 21 |
EFI_STATUS (EFIAPI *SetMemoryAttributes)( |
| 22 |
struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This, |
| 23 |
EFI_PHYSICAL_ADDRESS BaseAddress, |
| 24 |
uint64_t Length, |
| 25 |
uint64_t Attributes); |
| 26 |
EFI_STATUS (EFIAPI *ClearMemoryAttributes)( |
| 27 |
struct _EFI_MEMORY_ATTRIBUTE_PROTOCOL *This, |
| 28 |
EFI_PHYSICAL_ADDRESS BaseAddress, |
| 29 |
uint64_t Length, |
| 30 |
uint64_t Attributes); |
| 31 |
} EFI_MEMORY_ATTRIBUTE_PROTOCOL; |