Skip to content

Commit

Permalink
Change back to original memory size, added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Egil committed Feb 20, 2024
1 parent 6b0bb9d commit 5d0cda9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions dts/riscv_em.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions src/core/riscv_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 5d0cda9

Please sign in to comment.