summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2012-03-11 01:57:53 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-08 19:49:46 +0100
commitd3890cc16de538c44ed1419a1df54bde560d1787 (patch)
tree07e694fdb350a2aeafa89aa4aeab7e8a5ca66a4c /payloads/libpayload/include
parent1fc346179262f4d4b0ce2f97970f775407a39a1c (diff)
downloadcoreboot-d3890cc16de538c44ed1419a1df54bde560d1787.tar.xz
Update libpayloads understanding of the coreboot tables.
Give it somewhere to put the new info in sysinfo, and tell it how to parse the new tables which it doesn't yet understand. Change-Id: I01d3318138696e6407553c27c1814f79e3fbc4f8 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://review.coreboot.org/1718 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h42
-rw-r--r--payloads/libpayload/include/sysinfo.h32
2 files changed, 74 insertions, 0 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 20bcc4e4c9..9251826648 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -165,6 +165,48 @@ struct cb_framebuffer {
u8 reserved_mask_size;
};
+#define CB_TAG_GPIO 0x0013
+#define GPIO_MAX_NAME_LENGTH 16
+struct cb_gpio {
+ u32 port;
+ u32 polarity;
+ u32 value;
+ u8 name[GPIO_MAX_NAME_LENGTH];
+};
+
+struct cb_gpios {
+ u32 tag;
+ u32 size;
+
+ u32 count;
+ struct cb_gpio gpios[0];
+};
+
+#define CB_TAG_VDAT 0x0015
+struct cb_vdat {
+ uint32_t tag;
+ uint32_t size; /* size of the entire entry */
+ void *vdat_addr;
+ uint32_t vdat_size;
+};
+
+#define CB_TAG_TIMESTAMPS 0x0016
+#define CB_TAG_CBMEM_CONSOLE 0x0017
+#define CB_TAG_MRC_CACHE 0x0018
+struct cb_cbmem_tab {
+ uint32_t tag;
+ uint32_t size;
+ void *cbmem_tab;
+};
+
+#define CB_TAG_VBNV 0x0019
+struct cb_vbnv {
+ uint32_t tag;
+ uint32_t size;
+ uint32_t vbnv_start;
+ uint32_t vbnv_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 cce934f42f..bb5b2eea68 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -32,6 +32,10 @@
/* Allow a maximum of 16 memory range definitions. */
#define SYSINFO_MAX_MEM_RANGES 16
+/* Allow a maximum of 8 GPIOs */
+#define SYSINFO_MAX_GPIOS 8
+
+#include <coreboot_tables.h>
struct cb_serial;
@@ -53,15 +57,43 @@ struct sysinfo_t {
u32 cmos_range_start;
u32 cmos_range_end;
u32 cmos_checksum_location;
+#if CONFIG_CHROMEOS
+ u32 vbnv_start;
+ u32 vbnv_size;
+#endif
+
+ char *version;
+ char *extra_version;
+ char *build;
+ char *compile_time;
+ char *compile_by;
+ char *compile_host;
+ char *compile_domain;
+ char *compiler;
+ char *linker;
+ char *assembler;
char *cb_version;
struct cb_framebuffer *framebuffer;
+#if CONFIG_CHROMEOS
+ int num_gpios;
+ struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
+#endif
+
unsigned long *mbtable; /** Pointer to the multiboot table */
struct cb_header *header;
struct cb_mainboard *mainboard;
+
+#if CONFIG_CHROMEOS
+ void *vdat_addr;
+ u32 vdat_size;
+#endif
+ void *tstamp_table;
+ void *cbmem_cons;
+ void *mrc_cache;
};
extern struct sysinfo_t lib_sysinfo;