summaryrefslogtreecommitdiff
path: root/common/cmd_vboot_twostop.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-08-27 18:15:18 -0700
committerSimon Glass <sjg@chromium.org>2011-08-30 13:25:46 -0700
commitf07606ac047cd763211a7aeddf4dc9733e5114ce (patch)
tree96fe09c438718f882ec46db8579051af04bc9c5f /common/cmd_vboot_twostop.c
parentf759070b539747df59380ca0164b25515d927908 (diff)
Pass correct VDAT address to the vboot wrapper.
On X86 systems where VDAT address is passed to the kernel through ACPI the u-boot must retrieve the address from the coreboot table and make it available to the vboot wrapper. This change accomplishes just that utilizing the coreboot changes which include the vdat area address and size into the coreboot table. Another modification is removing conditional compilation for including fields in the sysinfo table. The thing is that the code is not conditionally compiled anyways, so keeping an extra pointer in a table even if not needed is not a problem. BUG=chrome-os-partner:5707 TEST=manual . program the new firmware on an Alex . bring up ChromeOS . try running crossystem It was reporting errors before (when displaying data retrieved from VDAT). It displays sensible values now. Change-Id: Ib4090049092f7963a1b1705409d2beea8a9abfac Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/6868 Tested-by: Vadim Bendebury <vbendeb@google.com> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/6919 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_vboot_twostop.c')
-rw-r--r--common/cmd_vboot_twostop.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/cmd_vboot_twostop.c b/common/cmd_vboot_twostop.c
index cf661b6f33..e247f43d31 100644
--- a/common/cmd_vboot_twostop.c
+++ b/common/cmd_vboot_twostop.c
@@ -28,6 +28,9 @@
#include <tss_constants.h>
#include <vboot_api.h>
+#ifdef CONFIG_SYS_COREBOOT
+#include <asm/ic/coreboot/sysinfo.h>
+#endif
#ifndef CACHE_LINE_SIZE
#define CACHE_LINE_SIZE __BIGGEST_ALIGNMENT__
#endif
@@ -132,9 +135,13 @@ twostop_init_cparams(struct twostop_fmap *fmap, void *gbb,
{
cparams->gbb_data = gbb;
cparams->gbb_size = fmap->readonly.gbb.length;
+#ifdef CONFIG_SYS_COREBOOT
+ cparams->shared_data_blob = lib_sysinfo.vdat_addr;
+ cparams->shared_data_size = lib_sysinfo.vdat_size;
+#else
cparams->shared_data_blob = vb_shared_data;
cparams->shared_data_size = VB_SHARED_DATA_REC_SIZE;
-
+#endif
#define P(format, field) \
VBDEBUG(PREFIX "- %-20s: " format "\n", #field, cparams->field)