From dd32a31fbafafb6fa3dd1dc342884ffe88a7aa04 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 7 Mar 2013 23:15:06 -0600 Subject: coreboot: add vboot_handoff to coreboot tables The vboot_handoff structure contians the VbInitParams as well as the shared vboot data. In order for the boot loader to find it, the structure address and size needs to be obtained from the coreboot tables. Change-Id: I6573d479009ccbf373a7325f861bebe8dc9f5cf8 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/2857 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/x86/boot/coreboot_table.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/boot') diff --git a/src/arch/x86/boot/coreboot_table.c b/src/arch/x86/boot/coreboot_table.c index 530849f0b0..a456484cd3 100644 --- a/src/arch/x86/boot/coreboot_table.c +++ b/src/arch/x86/boot/coreboot_table.c @@ -36,6 +36,7 @@ #endif #if CONFIG_CHROMEOS #include +#include #include #endif @@ -219,7 +220,27 @@ static void lb_vbnv(struct lb_header *header) vbnv->vbnv_start = CONFIG_VBNV_OFFSET + 14; vbnv->vbnv_size = CONFIG_VBNV_SIZE; } -#endif + +#if CONFIG_VBOOT_VERIFY_FIRMWARE +static void lb_vboot_handoff(struct lb_header *header) +{ + void *addr; + uint32_t size; + struct lb_vboot_handoff* vbho; + + if (vboot_get_handoff_info(&addr, &size)) + return; + + vbho = (struct lb_vboot_handoff *)lb_new_record(header); + vbho->tag = LB_TAB_VBOOT_HANDOFF; + vbho->size = sizeof(*vbho); + vbho->vboot_handoff_addr = addr; + vbho->vboot_handoff_size = size; +} +#else +static inline void lb_vboot_handoff(struct lb_header *header) {} +#endif /* CONFIG_VBOOT_VERIFY_FIRMWARE */ +#endif /* CONFIG_CHROMEOS */ static void add_cbmem_pointers(struct lb_header *header) { @@ -697,6 +718,9 @@ unsigned long write_coreboot_table( /* pass along VBNV offsets in CMOS */ lb_vbnv(head); + + /* pass along the vboot_handoff address. */ + lb_vboot_handoff(head); #endif add_cbmem_pointers(head); -- cgit v1.2.3