diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-11-16 14:02:07 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-11-16 14:02:07 -0800 |
commit | 197a8b81e4bbf61c497c93c0ac4630a33ab11b1c (patch) | |
tree | 27b984cf55295258d9ab31294402c66f328b53a4 /pk/mtrap.h | |
parent | 47f9e06fc2c696dfb1054d730cde888f1ac75d07 (diff) | |
download | riscv-pk-197a8b81e4bbf61c497c93c0ac4630a33ab11b1c.zip riscv-pk-197a8b81e4bbf61c497c93c0ac4630a33ab11b1c.tar.gz riscv-pk-197a8b81e4bbf61c497c93c0ac4630a33ab11b1c.tar.bz2 |
Use IPIs to wake up harts
This has the side effect of testing the IPI mechanism. Still not sure
this is the best approach to booting, but it works...
Diffstat (limited to 'pk/mtrap.h')
-rw-r--r-- | pk/mtrap.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -238,6 +238,7 @@ void hls_init(uint32_t hart_id, uintptr_t* csrs); // hart-local storage, at top of stack #define HLS() ((hls_t*)(MACHINE_STACK_TOP() - HLS_SIZE)) +#define OTHER_STACK_TOP(id) (MACHINE_STACK_TOP() + RISCV_PGSIZE * ((id) - HLS()->hart_id)) #define OTHER_HLS(id) ((hls_t*)((void*)HLS() + RISCV_PGSIZE * ((id) - HLS()->hart_id))) #endif // !__ASSEMBLER__ |