Hi,
If you want to simulate more RAM on an ARMv8 system you'll need to do something
like the following:
1. Modify the address map definition in gem5 src/dev/arm/RealView.py.
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -621,12 +621,16 @@
self.mmc_fake.clk_domain = clkdomain
class VExpress_EMM64(VExpress_EMM):
+ mem_start_addr = '34GB'
+ max_mem_size = '16GB'
+
+ local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30,
pio_addr=0x2A430000)
+ hdlcd = HDLcd(pio_addr=0x7FF60000, int_num=117)
+
def setupBootLoader(self, mem_bus, cur_sys, loc):
self.nvmem = SimpleMemory(range = AddrRange(0, size = '64MB'))
self.nvmem.port = mem_bus.master
- cur_sys.boot_loader = loc('boot_emm.arm64')
+ cur_sys.boot_loader = loc('boot_emm_largemem.arm64')
cur_sys.atags_addr = 0x8000000
cur_sys.load_addr_mask = 0xfffffff
- cur_sys.load_offset = 0x80000000
-
-
+ cur_sys.load_offset = 0x880000000
2. Modify the bootloader to reflect the new starting offset (-DPHYS_OFFSET).
diff --git a/system/arm/aarch64_bootloader/makefile
b/system/arm/aarch64_bootloader/makefile
--- a/system/arm/aarch64_bootloader/makefile
+++ b/system/arm/aarch64_bootloader/makefile
@@ -1,4 +1,4 @@
build:
- aarch64-linux-gnu-gcc -c -DPHYS_OFFSET=0x80000000 -DCNTFRQ=0x01800000
-DUART_BASE=0x1c090000 -DSYSREGS_BASE=0x1c010000 -DGIC_DIST_BASE=0x2c001000
-DGIC_CPU_BASE=0x2c002000 -Dkernel=0x80080000 -Dmbox=0x8000fff8
-Ddtb=0x80000100 -o boot_emm.o -march=armv8-a boot.S
- aarch64-linux-gnu-ld -o boot_emm.arm64 -N -Ttext 0x00000010 boot_emm.o
-non_shared -static
- rm boot_emm.o
\ No newline at end of file
+ aarch64-linux-gnu-gcc -c -DPHYS_OFFSET=0x880000000 -DCNTFRQ=0x01800000
-DUART_BASE=0x1c090000 -DSYSREGS_BASE=0x1c010000 -DGIC_DIST_BASE=0x2c001000
-DGIC_CPU_BASE=0x2c002000 -Dkernel=0x80080000 -Dmbox=0x8000fff8
-Ddtb=0x80000100 -o boot_emm.o -march=armv8-a boot.S
+ aarch64-linux-gnu-ld -o boot_emm_largemem.arm64 -N -Ttext 0x00000010
boot_emm.o -non_shared -static
+ rm boot_emm.o
3. Modify the memory definition in the dts file to reflect the new starting
point.
For example you need to change:
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x80000000>;
};
...
cpu-release-addr = <0x0 0x8000fff8>;
...
to
cpu-release-addr = <0x8 0x8000fff8>;
...
memory@880000000 {
device_type = "memory";
reg = <0x8 0x80000000 0x4 0x0>;
};
Ali
On 28.05.2014 18:35, Embedded Systems MadHatter wrote:
> Thank you Ali.
>
> I forgot to clarify, I'm trying to use it for ARMv8 so far, ARMv7 I expected
> this limitation, but I'm focusing into the ARMv8 right now.
>
>
> On Mon, May 26, 2014 at 1:50 PM, Ali Saidi <[email protected]> wrote:
> For ARMv7 you can only really use 2047MB of RAM with the memory map we have
> in the simulator. It would be possible to use more with the LPAE extensions
> we recently implemented, but it would certainly required some work on your
> part to define a new memory map and modify a dtb file appropriately. For
> ARMv8 it’s much easier to get more RAM, however it too doesn’t work outside
> the box. To make this work you need to again modify a DTB file and the armv8
> boot loader start address to match that address. I’ve got the latter mostly
> working and will try to get you some instructions in the next week.
>
> Ali
>
>
>
> On May 21, 2014, at 1:52 PM, Embedded Systems MadHatter via gem5-users
> <[email protected]> wrote:
>
> > Hello,
> > I'm trying to launch simulations with ARMv7, ARMv8 and X86, but
> > unfortunately I cannot use more than 2GB of RAM for the simulation. How can
> > I set a simulation with more than 2GB of RAM ?
> >
> > My current parameter is: --mem-type=DDR3_1600_x64 --mem-size=2GB
> > _______________________________________________
> > gem5-users mailing list
> > [email protected]
> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users