32bit stivale was not pushing a return address. (#26)
When trying to boot skift using limine I was still getting an invalid address for the stivale struct. Pushing an additional 0 where the return address should have been fixed the issue.
This commit is contained in:
parent
79fb7342ce
commit
8271c0b8df
|
@ -363,12 +363,13 @@ __attribute__((noreturn)) void stivale_spinup(int bits, bool level5pg,
|
|||
: "memory"
|
||||
);
|
||||
} else if (bits == 32) {
|
||||
asm volatile (
|
||||
asm volatile(
|
||||
"cli\n\t"
|
||||
"cld\n\t"
|
||||
|
||||
"mov esp, dword ptr [esi]\n\t"
|
||||
"push edi\n\t"
|
||||
"push 0\n\t"
|
||||
|
||||
"pushfd\n\t"
|
||||
"push 0x18\n\t"
|
||||
|
@ -382,10 +383,10 @@ __attribute__((noreturn)) void stivale_spinup(int bits, bool level5pg,
|
|||
"xor edi, edi\n\t"
|
||||
"xor ebp, ebp\n\t"
|
||||
|
||||
"iret\n\t" :
|
||||
: "b" (&entry_point), "D" (stivale_struct), "S" (&stack)
|
||||
: "memory"
|
||||
);
|
||||
"iret\n\t"
|
||||
:
|
||||
: "b"(&entry_point), "D"(stivale_struct), "S"(&stack)
|
||||
: "memory");
|
||||
}
|
||||
for (;;);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue