12 #if __riscv_xlen == 32
17 #define MENTRY_FRAME_SIZE (HLS_SIZE + 37 * __SIZEOF_POINTER__)
22 #include <arch/smp/atomic.h>
54 sizeof(
hls_t) == HLS_SIZE,
55 "HLS_SIZE must equal to sizeof(hls_t)");
57 #define MACHINE_STACK_TOP() ({ \
59 register uintptr_t sp asm ("sp"); \
60 (void*)((sp + RISCV_PGSIZE) & -RISCV_PGSIZE); })
63 #define HLS() ((hls_t*)(MACHINE_STACK_TOP() - HLS_SIZE))
64 #define OTHER_HLS(id) ((hls_t*)((void*)HLS() + RISCV_PGSIZE * ((id) - HLS()->hart_id)))
66 #define MACHINE_STACK_SIZE RISCV_PGSIZE
void set_msip(int hartid, int val)
_Static_assert(sizeof(hls_t)==HLS_SIZE, "HLS_SIZE must equal to sizeof(hls_t)")
void hls_init(uint32_t hart_id, void *fdt)
unsigned long long uint64_t
sbi_device_message * device_response_queue_tail
sbi_device_message * device_response_queue_head
sbi_device_message * device_request_queue_head
unsigned long device_request_queue_size
unsigned long sbi_private_data
typedef void(X86APIP X86EMU_intrFuncs)(int num)