summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-26 18:12:58 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-04-30 12:47:06 +0300
commit33139a0bc7645f73f6e7dd152336e1ee00c9d40e (patch)
tree0bdce9170a4d567a622f1084c26f97a9ad35f4f1 /arch/x86/include
parentba974a0137edc86cff9727a83cf6be154ab18ef0 (diff)
downloadu-boot-33139a0bc7645f73f6e7dd152336e1ee00c9d40e.tar.xz
x86: Move coreboot-table detection into common code
To support detecting booting from coreboot, move the code which locates the coreboot tables into a common place. Adjust the algorithm slightly to use a word comparison instead of string, since it is faster. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: correct the comments to 960KB] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/coreboot_tables.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/coreboot_tables.h b/arch/x86/include/asm/coreboot_tables.h
index 61de0077d7..268284f43c 100644
--- a/arch/x86/include/asm/coreboot_tables.h
+++ b/arch/x86/include/asm/coreboot_tables.h
@@ -343,4 +343,11 @@ void *high_table_malloc(size_t bytes);
*/
void write_coreboot_table(u32 addr, struct memory_area *cfg_tables);
+/**
+ * locate_coreboot_table() - Try to find coreboot tables at standard locations
+ *
+ * @return address of table that was found, or -ve error number
+ */
+long locate_coreboot_table(void);
+
#endif