diff options
Diffstat (limited to 'src/kernel/arch/amd64/32')
-rw-r--r-- | src/kernel/arch/amd64/32/boot.s | 1 | ||||
-rw-r--r-- | src/kernel/arch/amd64/32/gdt.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/kernel/arch/amd64/32/boot.s b/src/kernel/arch/amd64/32/boot.s index 06de66e..af32007 100644 --- a/src/kernel/arch/amd64/32/boot.s +++ b/src/kernel/arch/amd64/32/boot.s @@ -80,6 +80,7 @@ cpu_halt: .global cpu_pause .type cpu_pause, @function cpu_pause: + xchgw %bx, %bx sti hlt cli diff --git a/src/kernel/arch/amd64/32/gdt.c b/src/kernel/arch/amd64/32/gdt.c index 2229330..d3d4aed 100644 --- a/src/kernel/arch/amd64/32/gdt.c +++ b/src/kernel/arch/amd64/32/gdt.c @@ -87,15 +87,15 @@ void gdt_init(void) { gdt_fillout(&GDT[SEG_r3data], 3, false); lgdt_arg.limit = sizeof(GDT) - 1; - lgdt_arg.base = (uint64_t) &GDT; + lgdt_arg.base = (uint64_t)(int)&GDT; memset32(&TSS, 0, sizeof(TSS)); for (int i = 0; i < 3; i++) - TSS.rsp[i] = (uint64_t) &_isr_mini_stack; - TSS.ist[1] = (uint64_t) &_isr_mini_stack; + TSS.rsp[i] = (uint64_t)(int)&_isr_mini_stack; + TSS.ist[1] = (uint64_t)(int)&_isr_mini_stack; - uint64_t tss_addr = (uint64_t) &TSS; + uint64_t tss_addr = (uint64_t)(int)&TSS; GDT[SEG_TSS] = (struct gdt_entry) { .limit_low = sizeof(TSS), .limit_high = sizeof(TSS) >> 16, |