diff options
Diffstat (limited to 'pt')
l---------[-rw-r--r--] | pt/link.ld | 45 | ||||
-rw-r--r-- | pt/riscv_test.h | 8 |
2 files changed, 5 insertions, 48 deletions
diff --git a/pt/link.ld b/pt/link.ld index 694e906..86b45f9 100644..120000 --- a/pt/link.ld +++ b/pt/link.ld @@ -1,44 +1 @@ -/*======================================================================*/ -/* Proxy kernel linker script */ -/*======================================================================*/ -/* This is the linker script used when building the proxy kernel. */ - -/*----------------------------------------------------------------------*/ -/* Setup */ -/*----------------------------------------------------------------------*/ - -/* The OUTPUT_ARCH command specifies the machine architecture where the - argument is one of the names used in the BFD library. More - specifically one of the entires in bfd/cpu-mips.c */ - -OUTPUT_ARCH( "riscv" ) - -/* The ENTRY command specifies the entry point (ie. first instruction - to execute). The symbol _start should be defined in each test. */ - -ENTRY( _start ) - -/*----------------------------------------------------------------------*/ -/* Sections */ -/*----------------------------------------------------------------------*/ - -SECTIONS -{ - - /* text: test code section */ - . = 0; - .text : - { - *(.text) - } - - /* data: Initialized data segment */ - .data : - { - *(.data) - } - - /* End of uninitalized data segement */ - _end = .; -} - +../p/link.ld
\ No newline at end of file diff --git a/pt/riscv_test.h b/pt/riscv_test.h index 84b2d51..93c1c4d 100644 --- a/pt/riscv_test.h +++ b/pt/riscv_test.h @@ -22,9 +22,9 @@ _skip: \ _jump_around_interrupt_handler: \ #define ENABLE_TIMER_INTERRUPT \ - li a0, MSTATUS_STIE; \ - csrs mstatus, a0; \ - csrr a0, scycle; \ + li a0, MIP_STIP; \ + csrs mie, a0; \ + csrr a0, stime; \ addi a0, a0, TIMER_INTERVAL; \ csrw stimecmp, a0; \ @@ -42,7 +42,7 @@ _interrupt_handler: \ VECTOR_RESTORE; \ _skip_vector_restore: \ csrr a1, sscratch; \ - csrr a0, scycle; \ + csrr a0, stime; \ addi a0, a0, TIMER_INTERVAL; \ csrw stimecmp, a0; \ csrr a0, mscratch; \ |