update
This commit is contained in:
parent
c6ba51009c
commit
5cc5bf3f04
10
src/crt.S
10
src/crt.S
|
@ -3,20 +3,22 @@
|
|||
.global irqCallback
|
||||
|
||||
.section .start_jump,"ax",@progbits
|
||||
crtStart:
|
||||
|
||||
crtStart: // 0x 8000 0000
|
||||
//long jump to allow crtInit to be anywhere
|
||||
//do it always in 12 bytes
|
||||
lui x2, %hi(crtInit)
|
||||
addi x2, x2, %lo(crtInit)
|
||||
jalr x1,x2
|
||||
nop
|
||||
nop // 0x 8000 0010
|
||||
|
||||
.section .text
|
||||
|
||||
.global trap_entry
|
||||
.align 5
|
||||
.align 5 //2^5 = 32 = 0x 20
|
||||
trap_entry:
|
||||
sw x1, - 1*4(sp)
|
||||
|
||||
sw x1, - 1*4(sp) // 0x 8000 0020
|
||||
sw x5, - 2*4(sp)
|
||||
sw x6, - 3*4(sp)
|
||||
sw x7, - 4*4(sp)
|
||||
|
|
|
@ -57,10 +57,11 @@ int main() {
|
|||
TIMER_INTERRUPT->PENDINGS = 0xF;
|
||||
TIMER_INTERRUPT->MASKS = 0x1;
|
||||
|
||||
// Thread 0
|
||||
while( 1){
|
||||
|
||||
++mati;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extern "C" void irqCallback(){
|
||||
|
|
Loading…
Reference in New Issue