RISC-V boards: Stop using the config string

RISC-V is moving towards OpenFirmware-derived device trees, and the old
functions to read the config string don't work anymore. Use dummy values
for the memory base and size until we can query the device tree.

Change-Id: Ice13feae4da2085ee56bac4ac2864268da18d8fe
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21690
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Jonathan Neuschäfer 2017-09-29 06:29:38 +02:00 committed by Patrick Georgi
parent 5a6e389747
commit 67b3268fac
4 changed files with 14 additions and 11 deletions

View File

@ -15,15 +15,13 @@
#include <console/console.h> #include <console/console.h>
#include <program_loading.h> #include <program_loading.h>
#include <commonlib/configstring.h>
void main(void) void main(void)
{ {
uintptr_t base;
size_t size;
console_init(); console_init();
query_mem(configstring(), &base, &size);
printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base); //query_mem(configstring(), &base, &size);
//printk(BIOS_SPEW, "0x%zx bytes of memory at 0x%llx\n", size, base);
run_ramstage(); run_ramstage();
} }

View File

@ -14,7 +14,6 @@
*/ */
#include <cbmem.h> #include <cbmem.h>
#include <commonlib/configstring.h>
#include <device/device.h> #include <device/device.h>
#include <symbols.h> #include <symbols.h>
@ -23,7 +22,9 @@ static void mainboard_enable(device_t dev)
uintptr_t ram_base; uintptr_t ram_base;
size_t ram_size; size_t ram_size;
query_mem(configstring(), &ram_base, &ram_size); /* FIXME: These values shouldn't necessarily be hardcoded */
ram_base = 0x80000000;
ram_size = 128 * MiB;
ram_resource(dev, 0, ram_base / KiB, ram_size / KiB); ram_resource(dev, 0, ram_base / KiB, ram_size / KiB);
cbmem_initialize_empty(); cbmem_initialize_empty();

View File

@ -12,14 +12,15 @@
*/ */
#include <cbmem.h> #include <cbmem.h>
#include <commonlib/configstring.h>
void *cbmem_top(void) void *cbmem_top(void)
{ {
uintptr_t base; uintptr_t base;
size_t size; size_t size;
query_mem(configstring(), &base, &size); /* FIXME: These values shouldn't necessarily be hardcoded */
base = 0x80000000;
size = 128 * MiB;
return (void *)(base + size); return (void *)(base + size);
} }

View File

@ -19,7 +19,10 @@ void *cbmem_top(void)
uintptr_t base; uintptr_t base;
size_t size; size_t size;
query_mem(configstring(), &base, &size); /* Use dummy values until we can query the memory size again */
//query_mem(configstring(), &base, &size);
base = 0x80000000;
size = 128 * MiB;
return (void *)(base + size); return (void *)(base + size);
} }