diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-12-12 10:10:52 -0800 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-10 06:31:45 +0200 |
commit | be2512973d04f3da3cebfd3e7ee10809fbe4ae4a (patch) | |
tree | 87e5998608c57917fd4c9c695238d223e0866563 /src/lib | |
parent | 7d34c6070b8fc2e8dc2f5274794e2374a883d4ce (diff) | |
download | coreboot-be2512973d04f3da3cebfd3e7ee10809fbe4ae4a.tar.xz |
ramstage_cache: allow ramstage usage add valid helper
Allow ramstage cache to be used from ramstage proper. Also
add a helper function for checking validity of ramstage
cache structure.
BUG=chrome-os-partner:22867
BRANCH=None
TEST=Built and booted. S3 resumed.
Change-Id: If1f2ad1bcf64504b42e315be243a12432b50e3d5
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179775
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/5011
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ramstage_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ramstage_cache.c b/src/lib/ramstage_cache.c index a1a4804a16..0f7273a961 100644 --- a/src/lib/ramstage_cache.c +++ b/src/lib/ramstage_cache.c @@ -79,7 +79,7 @@ void *load_cached_ramstage(struct romstage_handoff *handoff, cache = ramstage_cache_location(&size); - if (cache == NULL || cache->magic != RAMSTAGE_CACHE_MAGIC) { + if (!ramstage_cache_is_valid(cache)) { printk(BIOS_DEBUG, "Invalid ramstage cache found.\n"); ramstage_cache_invalid(cache); return NULL; |