[coreboot] New patch to review for coreboot: e858631 libpayload: add support for vboot_handoff
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu Mar 14 00:23:02 CET 2013
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2720
-gerrit
commit e8586316bba4c1aa8d929b64f22f08b638157ac2
Author: Aaron Durbin <adurbin at chromium.org>
Date: Thu Mar 7 23:22:24 2013 -0600
libpayload: add support for vboot_handoff
The vboot_handoff structure needs to be parsed from the coreboot tables.
Add a placeholder in sysinfo as well as the ability to parse the
coreboot table entry concering the vboot_handoff structure.
Built with unified boot loader and ebuild changes. Can find and use
the VbInitParams for doing kernel selection.
Change-Id: If40a863b4a445fa5f7814325add03355fd0ac647
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
payloads/libpayload/arch/x86/coreboot.c | 11 +++++++++++
payloads/libpayload/include/coreboot_tables.h | 8 ++++++++
payloads/libpayload/include/sysinfo.h | 2 ++
3 files changed, 21 insertions(+)
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index d39af4a..e8bc380 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -79,6 +79,14 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
}
#ifdef CONFIG_CHROMEOS
+static void cb_parse_vboot_handoff(unsigned char *ptr, struct sysinfo_t *info)
+{
+ struct cb_vboot_handoff *vbho = (struct cb_vboot_handoff *)ptr;
+
+ info->vboot_handoff = vbho->vboot_handoff_addr;
+ info->vboot_handoff_size = vbho->vboot_handoff_size;
+}
+
static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr;
@@ -258,6 +266,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_VBNV:
cb_parse_vbnv(ptr, info);
break;
+ case CB_TAG_VBOOT_HANDOFF:
+ cb_parse_vboot_handoff(ptr, info);
+ break;
#endif
case CB_TAG_TIMESTAMPS:
cb_parse_tstamp(ptr, info);
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 43fd41b..38bda55 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -209,6 +209,14 @@ struct cb_vbnv {
uint32_t vbnv_size;
};
+#define CB_TAG_VBOOT_HANDOFF 0x0020
+struct cb_vboot_handoff {
+ uint32_t tag;
+ uint32_t size;
+ void *vboot_handoff_addr;
+ uint32_t vboot_handoff_size;
+};
+
#define CB_TAG_CMOS_OPTION_TABLE 0x00c8
struct cb_cmos_option_table {
u32 tag;
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index 80763f0..4c7ce45 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -88,6 +88,8 @@ struct sysinfo_t {
struct cb_mainboard *mainboard;
#ifdef CONFIG_CHROMEOS
+ void *vboot_handoff;
+ u32 vboot_handoff_size;
void *vdat_addr;
u32 vdat_size;
#endif
More information about the coreboot
mailing list