mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-12 09:44:04 +03:00
multiboot1: When on BIOS, set IDTR to BIOS defaults before handoff
This commit is contained in:
parent
605623bd05
commit
0562c8ef70
@ -2,9 +2,26 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <mm/vmm.h>
|
#include <mm/vmm.h>
|
||||||
|
#if bios == 1
|
||||||
|
# include <sys/idt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
__attribute__((noreturn)) void multiboot1_spinup_32(
|
__attribute__((noreturn)) void multiboot1_spinup_32(
|
||||||
uint32_t entry_point, uint32_t multiboot1_info) {
|
uint32_t entry_point, uint32_t multiboot1_info) {
|
||||||
|
#if bios == 1
|
||||||
|
struct idtr idtr;
|
||||||
|
|
||||||
|
idtr.limit = 0x3ff;
|
||||||
|
idtr.ptr = 0;
|
||||||
|
|
||||||
|
asm volatile (
|
||||||
|
"lidt %0"
|
||||||
|
:
|
||||||
|
: "m" (idtr)
|
||||||
|
: "memory"
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"cld\n\t"
|
"cld\n\t"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user