mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-23 09:02:11 +03:00
Add a call to BIOS int 15h AX EC00h before entering Long Mode in stivale proto
This commit is contained in:
parent
7336f2b819
commit
3d75644e2c
BIN
qloader2.bin
BIN
qloader2.bin
Binary file not shown.
@ -99,9 +99,7 @@ __attribute__((used)) static uint32_t int_08_ticks_counter;
|
|||||||
__attribute__((naked)) static void int_08_isr(void) {
|
__attribute__((naked)) static void int_08_isr(void) {
|
||||||
asm (
|
asm (
|
||||||
".code16\n\t"
|
".code16\n\t"
|
||||||
"pushf\n\t"
|
|
||||||
"inc dword ptr cs:[int_08_ticks_counter]\n\t"
|
"inc dword ptr cs:[int_08_ticks_counter]\n\t"
|
||||||
"popf\n\t"
|
|
||||||
"int 0x40\n\t" // call callback
|
"int 0x40\n\t" // call callback
|
||||||
"iret\n\t"
|
"iret\n\t"
|
||||||
".code32\n\t"
|
".code32\n\t"
|
||||||
|
@ -227,6 +227,16 @@ void stivale_load(char *cmdline, int boot_drive) {
|
|||||||
deinit_vga_textmode();
|
deinit_vga_textmode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bits == 64) {
|
||||||
|
// If we're going 64, we might as well call this BIOS interrupt
|
||||||
|
// to tell the BIOS that we are entering Long Mode, since it is in
|
||||||
|
// the specification.
|
||||||
|
struct rm_regs r = {0};
|
||||||
|
r.eax = 0xec00;
|
||||||
|
r.ebx = 0x02; // Long mode only
|
||||||
|
rm_int(0x15, &r, &r);
|
||||||
|
}
|
||||||
|
|
||||||
rm_flush_irqs();
|
rm_flush_irqs();
|
||||||
|
|
||||||
if (bits == 64) {
|
if (bits == 64) {
|
||||||
|
Loading…
Reference in New Issue
Block a user