diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-09-23 13:42:04 -0700 |
---|---|---|
committer | Vadim Bendebury <vbendeb@chromium.org> | 2011-09-24 10:23:34 -0700 |
commit | 1c823353a5ff505f57ce79e5f9aeace22430b095 (patch) | |
tree | 3da89330d44da15dbabec295283873c306e7381e /arch | |
parent | 4421bf3c1574c7d69a4be6a0c448ed401115f3a6 (diff) |
Retrieve timestamp table information from coreboot table.
This change adds code to process the timestamp table infiormation
in case it is included in the coreboot table.
coreboot/timestamp.h had to be modified to make it possible to
compile in u-boot environment. The upcoming change will modify
the timestamp handling code borrowed from coreboot under
http://gerrit.chromium.org/gerrit/8164.
BUG=chromium-os:20733
TEST=manual
. brought up a stumpy to ChromeOS login screen.
Change-Id: I008b5e4c971cbb13de2f055f53da6384035df5eb
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8222
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/cpu/coreboot/tables.c | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/ic/coreboot/sysinfo.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/ic/coreboot/tables.h | 7 |
3 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index 5916bd0e1c..18aa1149a5 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -130,6 +130,11 @@ static void cb_parse_vdat(unsigned char *ptr, struct sysinfo_t *info) info->vdat_size = vdat->vdat_size; } +static void cb_parse_tstamp(unsigned char *ptr, struct sysinfo_t *info) +{ + info->tstamp_table = ((struct cb_tstamp *)ptr)->tstamp_tab; +} + static void cb_parse_framebuffer(unsigned char *ptr, struct sysinfo_t *info) { info->framebuffer = (struct cb_framebuffer *)ptr; @@ -237,6 +242,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) case CB_TAG_VDAT: cb_parse_vdat(ptr, info); break; + case CB_TAG_TIMESTAMPS: + cb_parse_tstamp(ptr, info); + break; } ptr += rec->size; diff --git a/arch/x86/include/asm/ic/coreboot/sysinfo.h b/arch/x86/include/asm/ic/coreboot/sysinfo.h index bde093a965..3cd797fb5e 100644 --- a/arch/x86/include/asm/ic/coreboot/sysinfo.h +++ b/arch/x86/include/asm/ic/coreboot/sysinfo.h @@ -34,6 +34,7 @@ #include <compiler.h> #include <asm/ic/coreboot/tables.h> #include <fdt.h> +#include <coreboot/timestamp.h> /* Allow a maximum of 16 memory range definitions. */ #define SYSINFO_MAX_MEM_RANGES 16 @@ -80,6 +81,7 @@ struct sysinfo_t { void *vdat_addr; u32 vdat_size; struct fdt_header *sys_fdt; + struct timestamp_table *tstamp_table; }; extern struct sysinfo_t lib_sysinfo; diff --git a/arch/x86/include/asm/ic/coreboot/tables.h b/arch/x86/include/asm/ic/coreboot/tables.h index 27bafa0b0d..85b12582f5 100644 --- a/arch/x86/include/asm/ic/coreboot/tables.h +++ b/arch/x86/include/asm/ic/coreboot/tables.h @@ -196,6 +196,13 @@ struct cb_vdat { uint32_t vdat_size; }; +#define CB_TAG_TIMESTAMPS 0x0016 +struct cb_tstamp { + uint32_t tag; + uint32_t size; + void *tstamp_tab; +}; + #define CB_TAG_CMOS_OPTION_TABLE 0x00c8 struct cb_cmos_option_table { u32 tag; |