x86_64: rename struct cpu_context; move to machine/cpu.h
This commit is contained in:
@@ -27,11 +27,18 @@ typedef struct ml_cpu_block {
|
||||
struct cpu_data *c_data;
|
||||
} ml_cpu_block;
|
||||
|
||||
#define ml_cpu_pause() __asm__ __volatile__("hlt")
|
||||
#define ml_cpu_relax() __asm__ __volatile__("pause")
|
||||
struct ml_cpu_context {
|
||||
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
|
||||
uint64_t rdi, rsi, rbp, unused_rsp, rbx, rdx, rcx, rax;
|
||||
uint64_t int_no, err_no;
|
||||
uint64_t rip, cs, rflags, rsp, ss;
|
||||
} __packed;
|
||||
|
||||
#define ml_cpu_pause() __asm__ __volatile__("hlt")
|
||||
#define ml_cpu_relax() __asm__ __volatile__("pause")
|
||||
|
||||
#define ml_int_disable() __asm__ __volatile__("cli")
|
||||
#define ml_int_enable() __asm__ __volatile__("sti")
|
||||
#define ml_int_enable() __asm__ __volatile__("sti")
|
||||
|
||||
extern int ml_init_bootcpu(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user