Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570745
| From | Ard Biesheuvel <ard.biesheuvel@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/10] efi: Introduce EFI_MEM_ATTR bit and set it from memory attributes table |
| Date | 2017-01-31 14:30 +0100 |
| Message-ID | <t5GFs-1cI-39@gated-at.bofh.it> (permalink) |
| References | <t5GFr-1cI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Sai Praneeth <sai.praneeth.prakhya@intel.com> UEFI v2.6 introduces a configuration table called EFI_MEMORY_ATTRIBUTES_TABLE which provides additional information about efi runtime regions. Currently this table describes memory protections that may be applied to EFI Runtime code and data regions by kernel. Allocate a EFI_XXX bit to keep track of whether this feature is published by firmware or not. Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com> Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Ricardo Neri <ricardo.neri@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Ravi Shankar <ravi.v.shankar@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- drivers/firmware/efi/memattr.c | 1 + include/linux/efi.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c index 236004b9a50d..402197460507 100644 --- a/drivers/firmware/efi/memattr.c +++ b/drivers/firmware/efi/memattr.c @@ -43,6 +43,7 @@ int __init efi_memattr_init(void) tbl_size = sizeof(*tbl) + tbl->num_entries * tbl->desc_size; memblock_reserve(efi.mem_attr_table, tbl_size); + set_bit(EFI_MEM_ATTR, &efi.flags); unmap: early_memunmap(tbl, sizeof(*tbl)); diff --git a/include/linux/efi.h b/include/linux/efi.h index 6642c4d9d11d..b17f73113bd2 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1065,6 +1065,7 @@ extern int __init efi_setup_pcdp_console(char *); #define EFI_ARCH_1 7 /* First arch-specific bit */ #define EFI_DBG 8 /* Print additional debug info at runtime */ #define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */ +#define EFI_MEM_ATTR 10 /* Did firmware publish EFI_MEMORY_ATTRIBUTES table? */ #ifdef CONFIG_EFI /* -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/10] EFI updates for v4.11 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[PATCH 03/10] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures tip-bot for Sai Praneeth <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 04/10] efi: Introduce EFI_MEM_ATTR bit and set it from memory attributes table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi: Introduce the EFI_MEM_ATTR bit and set it from the memory attributes table tip-bot for Sai Praneeth <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 02/10] x86/efi: Deduplicate efi_char16_printk() Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] x86/efi: Deduplicate efi_char16_printk() tip-bot for Lukas Wunner <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 08/10] efi/x86: Move EFI BGRT init code to early init code Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi/x86: Move the EFI BGRT init code to early init code tip-bot for Dave Young <tipbot@zytor.com> - 2017-02-01 10:50 +0100
csiph-web