Skip to content

Commit 20eebb7

Browse files
committed
refactor: TrapContext
Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
1 parent 54c8b44 commit 20eebb7

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

src/arch/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,13 @@ TARGET_INCLUDE_DIRECTORIES (arch INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
88

99
TARGET_SOURCES (
1010
arch
11-
INTERFACE $<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},riscv64>:
12-
${CMAKE_SYSTEM_PROCESSOR}/switch.S
13-
${CMAKE_SYSTEM_PROCESSOR}/trap.S
14-
>
15-
$<$<STREQUAL:${CMAKE_SYSTEM_PROCESSOR},aarch64>:
16-
${CMAKE_SYSTEM_PROCESSOR}/interrupt.S
17-
>
18-
${CMAKE_SYSTEM_PROCESSOR}/boot.S
11+
INTERFACE ${CMAKE_SYSTEM_PROCESSOR}/boot.S
1912
${CMAKE_SYSTEM_PROCESSOR}/macro.S
2013
${CMAKE_SYSTEM_PROCESSOR}/arch_main.cpp
2114
${CMAKE_SYSTEM_PROCESSOR}/early_console.cpp
2215
${CMAKE_SYSTEM_PROCESSOR}/backtrace.cpp
16+
${CMAKE_SYSTEM_PROCESSOR}/interrupt.S
17+
${CMAKE_SYSTEM_PROCESSOR}/switch.S
2318
${CMAKE_SYSTEM_PROCESSOR}/interrupt.cpp
2419
${CMAKE_SYSTEM_PROCESSOR}/timer.cpp
2520
${CMAKE_SYSTEM_PROCESSOR}/interrupt_main.cpp

src/arch/riscv64/macro.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* @copyright Copyright The SimpleKernel Contributors
3+
* @note 需要与 MRNIU/cpu_io/include/riscv64/context.hpp 中的结构体定义保持一致
34
*/
45

56
// 对齐到 16 字节

src/include/interrupt_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern "C" void kernel_thread_entry();
2020
// 在 switch.S 中定义
2121
extern "C" void trap_return(void*);
2222

23-
//trap.S 中定义
23+
//interrupt.S 中定义
2424
extern "C" void trap_entry();
2525

2626
class InterruptBase {

0 commit comments

Comments
 (0)