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>
This commit is contained in:
Lee Leahy 2017-01-05 10:23:36 -08:00
parent 33efd98cfd
commit 6edb314050
1 changed files with 2 additions and 1 deletions

View File

@ -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;