Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the start address? #441

Open
xicongye opened this issue Dec 9, 2022 · 1 comment
Open

How to change the start address? #441

xicongye opened this issue Dec 9, 2022 · 1 comment

Comments

@xicongye
Copy link

xicongye commented Dec 9, 2022

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
: 
@aswaterman
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants