summaryrefslogtreecommitdiff
path: root/board/chromebook-x86
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-08-06 21:20:15 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:28 -0700
commitb1f0f438e3fd22c8c38b9820ea341e17c606ea6a (patch)
treeef9791c0e089baf1ba519495fd492752abbf1c09 /board/chromebook-x86
parenta8cc6be8ef09c179c3f2a71fd94fc19db15a1038 (diff)
Fix checking if information about vboot's nv storage was in the cb tables
u-boot was not checking for information about vboot's non-volatile storage correctly. If the information taken from the coreboot table was non-zero (when there was something there), u-boot would fail, which is essentially the opposite of correct. This change sets sentry values in the structure filled from coreboot's tables and then checks for those to determine if there's any information about nonvolatile storage. BUG=chrome-os-partner:4552 TEST=Built and ran vboot_twostop. Verified that attempts to access nonvolatile storage no longer fail. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I254c5808637dcd668c0529bbcfa3ba22924165b7 Reviewed-on: http://gerrit.chromium.org/gerrit/5542 Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'board/chromebook-x86')
-rw-r--r--board/chromebook-x86/vbexport/nvstorage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/chromebook-x86/vbexport/nvstorage.c b/board/chromebook-x86/vbexport/nvstorage.c
index 094d6b22a3d..c800bebbe26 100644
--- a/board/chromebook-x86/vbexport/nvstorage.c
+++ b/board/chromebook-x86/vbexport/nvstorage.c
@@ -54,7 +54,7 @@ VbError_t VbExNvStorageRead(uint8_t* buf)
{
int i;
- if (lib_sysinfo.vbnv_start) {
+ if (lib_sysinfo.vbnv_start == (uint32_t)(-1)) {
printf("%s:%d - vbnv address undefined\n",
__FUNCTION__, __LINE__);
return VBERROR_INVALID_SCREEN_INDEX;
@@ -70,7 +70,7 @@ VbError_t VbExNvStorageWrite(const uint8_t* buf)
{
int i;
- if (lib_sysinfo.vbnv_start) {
+ if (lib_sysinfo.vbnv_start == (uint32_t)(-1)) {
printf("%s:%d - vbnv address undefined\n",
__FUNCTION__, __LINE__);
return VBERROR_INVALID_SCREEN_INDEX;