From 589c3f289e05454be23507767439cb9769a2264a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 20 Feb 2025 13:51:29 -0500 Subject: Move memory attribute support to its own file. This moves the EFI Memory Attribute Protocol helper functions to their own file, since they're not related to PE things. Signed-off-by: Peter Jones --- include/memattrs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/memattrs.h (limited to 'include') diff --git a/include/memattrs.h b/include/memattrs.h new file mode 100644 index 00000000..8fefef22 --- /dev/null +++ b/include/memattrs.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BSD-2-Clause-Patent +/* + * memattrs.h - EFI and DXE memory attribute helpers + * Copyright Peter Jones + */ + +#ifndef SHIM_MEMATTRS_H_ +#define SHIM_MEMATTRS_H_ + +extern EFI_STATUS get_mem_attrs (uintptr_t addr, size_t size, uint64_t *attrs); +extern EFI_STATUS update_mem_attrs(uintptr_t addr, uint64_t size, + uint64_t set_attrs, uint64_t clear_attrs); + +#endif /* !SHIM_MEMATTRS_H_ */ +// vim:fenc=utf-8:tw=75:noet -- cgit v1.2.3