CBMEM: Fix allocation for static CBMEM
CBMEM console buffer size is adjustable in menuconfig, but this would not correctly adjust the overall allocation made for CBMEM. HIGH_MEMORY_SIZE is aligned to 64kB and definitions are moved down in the header file as HIGH_MEMORY_SIZE is not used with DYNAMIC_CBMEM. Try to continue boot even if CBMEM cannot be created. This error would only occur during development of new ports anyways and more log output is better. Change-Id: I4ee2df601b12ab6532ffcae8897775ecaa2fc05f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4621 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
This commit is contained in:
@@ -104,13 +104,12 @@ static void cbmem_init(void)
|
||||
cbmem_locate_table(&baseaddr, &size);
|
||||
cbmem_trace_location(baseaddr, size, __FUNCTION__);
|
||||
|
||||
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
|
||||
|
||||
if (size < (64 * 1024)) {
|
||||
printk(BIOS_DEBUG, "Increase CBMEM size!\n");
|
||||
for (;;) ;
|
||||
if (!(baseaddr && size)) {
|
||||
printk(BIOS_CRIT, "Unable to set location for CBMEM.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
|
||||
memset(cbmem_toc, 0, CBMEM_TOC_RESERVED);
|
||||
|
||||
cbmem_toc[0] = (struct cbmem_entry) {
|
||||
|
Reference in New Issue
Block a user