diff --git a/dts/riscv_em.dts b/dts/riscv_em.dts index 16f45df..0e5a059 100644 --- a/dts/riscv_em.dts +++ b/dts/riscv_em.dts @@ -29,9 +29,14 @@ }; }; + /* Make sure these adresses and sizes match the actual + configuration in src/core/riscv_config.h */ sram: memory@80000000 { device_type = "memory"; + reg = <0x0 0x80000000 0x0 0x8000000>; + /* Example alternative configuration with much more RAM reg = <0x0 0x80000000 0x0 0x40000000>; + */ }; rom: memory@c0000000 { diff --git a/src/core/riscv_config.h b/src/core/riscv_config.h index 36c0345..a3a4736 100644 --- a/src/core/riscv_config.h +++ b/src/core/riscv_config.h @@ -9,10 +9,11 @@ #define MROM_BASE_ADDR 0x1000UL #define MROM_SIZE_BYTES 0xf000UL -// #define RAM_BASE_ADDR 0x80000000UL -// #define RAM_SIZE_BYTES 0x8000000UL /* 128MB such as the default for the qemu virt machine */ -#define RAM_BASE_ADDR 0x80000000UL +#define RAM_BASE_ADDR 0x80000000UL +#define RAM_SIZE_BYTES 0x8000000UL /* 128MB such as the default for the qemu virt machine */ +/* Example alternative configuration with much more RAM #define RAM_SIZE_BYTES 0x40000000UL +*/ #define CLINT_BASE_ADDR 0x2000000UL #define CLINT_SIZE_BYTES 0x10000UL diff --git a/src/main.c b/src/main.c index 52805fa..35aed57 100644 --- a/src/main.c +++ b/src/main.c @@ -118,10 +118,6 @@ static void parse_options(int argc, case 'i': { arg_initrd_file = optarg; - // if (arg_fw_file) - // { - // printf("Firmware file %s\n", arg_fw_file); - // } break; } case 'n':