-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
things are back to working, sort of. the test, platform_configuration…
…, is executing.
- Loading branch information
1 parent
84ea6fb
commit f9b795e
Showing
7 changed files
with
54 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
// Author: Bill McSpadden ([email protected]) | ||
// -------------------------------------------------------------------------------------------- | ||
|
||
// -------------------------------------------------------- | ||
// Support for 32/64 bit compilation. | ||
|
||
#if __riscv_xlen == 64 | ||
# define LREG ld | ||
|
@@ -18,33 +20,31 @@ | |
# define REGBYTES 4 | ||
#endif | ||
|
||
|
||
// -------------------------------------------------------- | ||
// Support for tohost/fromhost | ||
|
||
#define PASS_CODE 1 | ||
#define FAIL_CODE 1337 | ||
|
||
|
||
|
||
|
||
// -------------------------------------------------------- | ||
// Following power-on reset, we start executing at _start. | ||
// Put this code in ROM. | ||
// We jump to "reset_vector" | ||
// | ||
.section ".rotext.init" | ||
.section ".text.init" | ||
.globl _start | ||
_start: | ||
la x5, reset_vector | ||
jr x5 | ||
// -------------------------------------------------------- | ||
|
||
|
||
.section ".text" | ||
|
||
// -------------------------------------------------------- | ||
// Initialization of the processor, starting with the | ||
// register file. | ||
// Put this code in RAM. | ||
.section ".text.begin" | ||
.global reset_vector // This pushed the symbol, reset_vector, to 0x80000000 | ||
reset_vector: | ||
li x1, 0 | ||
li x2, 0 | ||
|
@@ -87,6 +87,7 @@ reset_vector: | |
li t0, 0xffffffff | ||
csrw pmpaddr0, t0 | ||
|
||
|
||
// -------------------------------------------------------- | ||
// PASS: The end of the test, if successful | ||
j_target_end_pass: | ||
|
@@ -110,6 +111,7 @@ j_target_end_fail: | |
la x5, j_target_end_fail | ||
jalr x5 | ||
|
||
|
||
// -------------------------------------------------------- | ||
// Memory locations for specific usage. | ||
.section ".tdata.begin" | ||
|
@@ -134,6 +136,10 @@ tohost: .dword 0 | |
.globl fromhost | ||
fromhost: .dword 0 | ||
|
||
.align 6 | ||
.global timer_interrupt_flag | ||
timer_interrupt_flag: .dword 0 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters