How to change the start address?
xicongye opened this issue · comments
I want to change the default address from 0x8000_0000
to 0x7000_0000
, but spike cannot run rv64ui-v-add
(vm enable) successfully, here the steps:
Step1: modified the link.ld
file
diff --git a/p/link.ld b/p/link.ld
index b3e315e..a94f636 100644
--- a/p/link.ld
+++ b/p/link.ld
@@ -3,7 +3,7 @@ ENTRY(_start)
SECTIONS
{
- . = 0x80000000;
+ . = 0x70000000;
.text.init : { *(.text.init) }
. = ALIGN(0x1000);
.tohost : { *(.tohost) }
Step2: remake all stuffs
$ cd isa
$ make clean
$ make -j$(nproc)
Step3: run rv64ui-p-add
(vm disable) on spike, looks fine
$ spike --isa=rv64gc_zfh_zicboz_svnapot -m0x70000000:0x10000000 rv64ui-p-add
Step4: run rv64ui-v-add
(vm enable) on spike, get stuck
$ spike --isa=rv64gc_zfh_zicboz_svnapot -m0x70000000:0x10000000 rv64ui-v-add
^C:
core 0: exception trap_instruction_page_fault, epc 0xffffffffefe00144
core 0: tval 0xffffffffefe00144
:
The v
tests are quite constrained as to what environment they can run in. You might succeed in changing the start address, but you probably need to make additional changes. And, most likely, there are constraints as to what start addresses will actually work, even if you change all of the necessary parameters.
Caveat emptor, YMMV, etc.