summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-01-05 10:23:36 -0800
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-14 23:54:11 +0100
commit6edb3140501ad6ad4224e9c79e7d63b8af970466 (patch)
tree0dbbb7b5958c7dac6ea99ecfe7dea2c349a8d25f /src
parent33efd98cfd92f4e7c2cfc670c718c5b187f11659 (diff)
downloadcoreboot-6edb3140501ad6ad4224e9c79e7d63b8af970466.tar.xz
soc/intel/quark: Return NULL for top_of_memory
Return NULL for top_of_memory when the register has not been set. TEST=Build and run on Galileo Gen2 Change-Id: If79cac68c2a64aa9bf3be72d3cfc4c73fceef12b Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/18802 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: Martin Roth <martinroth@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/quark/memmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/quark/memmap.c b/src/soc/intel/quark/memmap.c
index 53a1b24094..d67856cc74 100644
--- a/src/soc/intel/quark/memmap.c
+++ b/src/soc/intel/quark/memmap.c
@@ -26,7 +26,8 @@ void *cbmem_top(void)
top_of_memory <<= 16;
/* Reserve 64 KiB for RMU firmware */
- top_of_memory -= 0x10000;
+ if (top_of_memory)
+ top_of_memory -= 0x10000;
/* Return the top of memory */
return (void *)top_of_memory;