Ronald G. Minnich (rminnich@gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17710
-gerrit
commit 727f2f8e7215a9c74348e4961f1f59fc7494a526 Author: Jonathan Neuschäfer j.neuschaefer@gmx.net Date: Sun Dec 4 08:49:38 2016 +0100
mb/lowrisc/nexys4ddr: Read RAM information from the config string
Change-Id: I9147eca0b536b6267d58f6e8baa37b6950b35160 Signed-off-by: Jonathan Neuschäfer j.neuschaefer@gmx.net --- src/mainboard/lowrisc/nexys4ddr/mainboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/lowrisc/nexys4ddr/mainboard.c b/src/mainboard/lowrisc/nexys4ddr/mainboard.c index 8b6bcb2..aae3b9b 100644 --- a/src/mainboard/lowrisc/nexys4ddr/mainboard.c +++ b/src/mainboard/lowrisc/nexys4ddr/mainboard.c @@ -14,17 +14,17 @@ */
#include <cbmem.h> +#include <commonlib/configstring.h> #include <device/device.h> #include <symbols.h>
static void mainboard_enable(device_t dev) { - /* - * TODO: Get this size from the hardware-supplied configuration string. - */ - const size_t ram_size = 1*GiB; + uintptr_t ram_base; + size_t ram_size;
- ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size / KiB); + query_mem(configstring(), &ram_base, &ram_size); + ram_resource(dev, 0, ram_base / KiB, ram_size / KiB);
cbmem_initialize_empty(); }