blob: cc112d944fe1ff2275d451a6c4e12e367f2fa9c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef _ASM_RISCV_SBI_H
#define _ASM_RISCV_SBI_H
typedef struct {
unsigned long base;
unsigned long size;
unsigned long node_id;
} memory_block_info;
unsigned long sbi_query_memory(unsigned long id, memory_block_info *p);
unsigned long sbi_hart_id(void);
unsigned long sbi_num_harts(void);
unsigned long sbi_timebase(void);
void sbi_set_timer(unsigned long long stime_value);
void sbi_send_ipi(unsigned long hart_id);
unsigned long sbi_clear_ipi(void);
void sbi_console_putchar(unsigned long ch);
void sbi_shutdown(void);
void sbi_remote_sfence_vm(unsigned long hart_mask_ptr, unsigned long asid);
void sbi_remote_sfence_vm_range(unsigned long hart_mask_ptr, unsigned long asid, unsigned long start, unsigned long size);
void sbi_remote_fence_i(unsigned long hart_mask_ptr);
typedef struct {
unsigned long dev;
unsigned long cmd;
unsigned long data;
unsigned long sbi_private_data;
} sbi_device_message;
unsigned long sbi_send_device_request(unsigned long req);
unsigned long sbi_receive_device_response(void);
unsigned long sbi_mask_interrupt(unsigned long which);
unsigned long sbi_unmask_interrupt(unsigned long which);
#endif
|