[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a19ebf59e20880c87dd49b6336476307559ac5ba@git.kernel.org>
Date: Wed, 1 Feb 2017 01:46:12 -0800
From: tip-bot for Sai Praneeth <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: peterz@...radead.org, fenghua.yu@...el.com, ricardo.neri@...el.com,
ravi.v.shankar@...el.com, ard.biesheuvel@...aro.org, hpa@...or.com,
mingo@...nel.org, matt@...eblueprint.co.uk,
linux-kernel@...r.kernel.org, jlee@...e.com,
torvalds@...ux-foundation.org, tglx@...utronix.de,
sai.praneeth.prakhya@...el.com, bp@...en8.de
Subject: [tip:efi/core] efi: Introduce the EFI_MEM_ATTR bit and set it from
the memory attributes table
Commit-ID: a19ebf59e20880c87dd49b6336476307559ac5ba
Gitweb: http://git.kernel.org/tip/a19ebf59e20880c87dd49b6336476307559ac5ba
Author: Sai Praneeth <sai.praneeth.prakhya@...el.com>
AuthorDate: Tue, 31 Jan 2017 13:21:36 +0000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 1 Feb 2017 08:45:44 +0100
efi: Introduce the EFI_MEM_ATTR bit and set it from the memory attributes table
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 the EFI Runtime code and data regions by the 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@...el.com>
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Reviewed-by: Lee, Chun-Yi <jlee@...e.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ravi Shankar <ravi.v.shankar@...el.com>
Cc: Ricardo Neri <ricardo.neri@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/1485868902-20401-5-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.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 236004b..4021974 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 6642c4d..5f632bf 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 an EFI_MEMORY_ATTRIBUTES table? */
#ifdef CONFIG_EFI
/*
Powered by blists - more mailing lists