remove bochs breaks
This commit is contained in:
parent
a5d79d7957
commit
fcec69efdc
|
@ -13,17 +13,16 @@ pub unsafe extern fn syscall() {
|
||||||
let d;
|
let d;
|
||||||
let e;
|
let e;
|
||||||
let f;
|
let f;
|
||||||
asm!("xchg bx, bx" : "={rax}"(a), "={rbx}"(b), "={rcx}"(c), "={rdx}"(d), "={rsi}"(e), "={rdi}"(f)
|
asm!("" : "={rax}"(a), "={rbx}"(b), "={rcx}"(c), "={rdx}"(d), "={rsi}"(e), "={rdi}"(f)
|
||||||
: : : "intel", "volatile");
|
: : : "intel", "volatile");
|
||||||
|
|
||||||
a = syscall(a, b, c, d, e, f);
|
a = syscall(a, b, c, d, e, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
asm!("xchg bx, bx" : : "{rax}"(a) : : "intel", "volatile");
|
asm!("" : : "{rax}"(a) : : "intel", "volatile");
|
||||||
}
|
}
|
||||||
|
|
||||||
asm!("xchg bx, bx
|
asm!("push fs
|
||||||
push fs
|
|
||||||
push rax
|
push rax
|
||||||
mov rax, 0x18
|
mov rax, 0x18
|
||||||
mov fs, ax
|
mov fs, ax
|
||||||
|
@ -33,8 +32,7 @@ pub unsafe extern fn syscall() {
|
||||||
inner();
|
inner();
|
||||||
|
|
||||||
// Interrupt return
|
// Interrupt return
|
||||||
asm!("xchg bx, bx
|
asm!("pop fs
|
||||||
pop fs
|
|
||||||
iretq"
|
iretq"
|
||||||
: : : : "intel", "volatile");
|
: : : : "intel", "volatile");
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,7 @@ macro_rules! interrupt {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push scratch registers
|
// Push scratch registers
|
||||||
asm!("xchg bx, bx
|
asm!("push rax
|
||||||
push rax
|
|
||||||
push rcx
|
push rcx
|
||||||
push rdx
|
push rdx
|
||||||
push rdi
|
push rdi
|
||||||
|
@ -67,8 +66,7 @@ macro_rules! interrupt {
|
||||||
inner();
|
inner();
|
||||||
|
|
||||||
// Pop scratch registers and return
|
// Pop scratch registers and return
|
||||||
asm!("xchg bx, bx
|
asm!("pop fs
|
||||||
pop fs
|
|
||||||
pop r11
|
pop r11
|
||||||
pop r10
|
pop r10
|
||||||
pop r9
|
pop r9
|
||||||
|
@ -95,8 +93,7 @@ macro_rules! interrupt_error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push scratch registers
|
// Push scratch registers
|
||||||
asm!("xchg bx, bx
|
asm!("push rax
|
||||||
push rax
|
|
||||||
push rcx
|
push rcx
|
||||||
push rdx
|
push rdx
|
||||||
push rdi
|
push rdi
|
||||||
|
@ -114,8 +111,7 @@ macro_rules! interrupt_error {
|
||||||
inner();
|
inner();
|
||||||
|
|
||||||
// Pop scratch registers, error code, and return
|
// Pop scratch registers, error code, and return
|
||||||
asm!("xchg bx, bx
|
asm!("pop fs
|
||||||
pop fs
|
|
||||||
pop r11
|
pop r11
|
||||||
pop r10
|
pop r10
|
||||||
pop r9
|
pop r9
|
||||||
|
|
|
@ -204,8 +204,7 @@ pub unsafe extern fn kstart_ap(stack_start: usize, stack_end: usize) -> ! {
|
||||||
|
|
||||||
pub unsafe fn usermode(ip: usize, sp: usize) {
|
pub unsafe fn usermode(ip: usize, sp: usize) {
|
||||||
// Test usermode
|
// Test usermode
|
||||||
asm!("xchg bx, bx
|
asm!("mov rax, 0x2B
|
||||||
mov rax, 0x2B
|
|
||||||
mov ds, ax
|
mov ds, ax
|
||||||
mov es, ax
|
mov es, ax
|
||||||
mov fs, ax
|
mov fs, ax
|
||||||
|
|
Loading…
Reference in a new issue