@@ -28,6 +28,28 @@ PROVIDE(_max_hart_id = 0);
28
28
PROVIDE(_hart_stack_size = 2K);
29
29
PROVIDE(_heap_size = 0);
30
30
31
+ /** TRAP ENTRY POINTS **/
32
+
33
+ /* Default trap entry point. The riscv-rt crate provides a weak alias of this function,
34
+ which saves caller saved registers, calls _start_trap_rust, restores caller saved registers
35
+ and then returns. Users can override this alias by defining the symbol themselves */
36
+ EXTERN(_start_trap);
37
+
38
+ /* Default interrupt trap entry point. When vectored trap mode is enabled,
39
+ the riscv-rt crate provides an implementation of this function, which saves caller saved
40
+ registers, calls the the DefaultHandler ISR, restores caller saved registers and returns. */
41
+ PROVIDE(_start_DefaultHandler_trap = _start_trap);
42
+
43
+ /* When vectored trap mode is enabled, each interrupt source must implement its own
44
+ trap entry point. By default, all interrupts start in _start_trap. However, users can
45
+ override these alias by defining the symbol themselves */
46
+ PROVIDE(_start_SupervisorSoft_trap = _start_DefaultHandler_trap);
47
+ PROVIDE(_start_MachineSoft_trap = _start_DefaultHandler_trap);
48
+ PROVIDE(_start_SupervisorTimer_trap = _start_DefaultHandler_trap);
49
+ PROVIDE(_start_MachineTimer_trap = _start_DefaultHandler_trap);
50
+ PROVIDE(_start_SupervisorExternal_trap = _start_DefaultHandler_trap);
51
+ PROVIDE(_start_MachineExternal_trap = _start_DefaultHandler_trap);
52
+
31
53
/** EXCEPTION HANDLERS **/
32
54
33
55
/* Default exception handler. The riscv-rt crate provides a weak alias of this function,
@@ -44,7 +66,7 @@ PROVIDE(Breakpoint = ExceptionHandler);
44
66
PROVIDE(LoadMisaligned = ExceptionHandler);
45
67
PROVIDE(LoadFault = ExceptionHandler);
46
68
PROVIDE(StoreMisaligned = ExceptionHandler);
47
- PROVIDE(StoreFault = ExceptionHandler);;
69
+ PROVIDE(StoreFault = ExceptionHandler);
48
70
PROVIDE(UserEnvCall = ExceptionHandler);
49
71
PROVIDE(SupervisorEnvCall = ExceptionHandler);
50
72
PROVIDE(MachineEnvCall = ExceptionHandler);
0 commit comments