protos: Remove dead code

This commit is contained in:
mintsuki 2021-07-06 00:48:29 +02:00
parent 3876645dd9
commit fa2a2d77bb
3 changed files with 2 additions and 21 deletions

View File

@ -27,15 +27,6 @@ __attribute__((noreturn)) void linux_spinup(void *entry, void *boot_params) {
linux_gdt.limit = sizeof(linux_gdt_descs) - 1;
linux_gdt.ptr = (uintptr_t)linux_gdt_descs;
// Load invalid IDT
uint64_t invalid_idt[2] = {0, 0};
asm volatile (
"lidt %0"
:
: "m" (invalid_idt)
: "memory"
);
asm volatile (
"lgdt %0\n\t"
@ -56,6 +47,8 @@ __attribute__((noreturn)) void linux_spinup(void *entry, void *boot_params) {
"xorl %%edi, %%edi\n\t"
"xorl %%ebx, %%ebx\n\t"
"cld\n\t"
"jmp *%%ecx\n\t"
:
: "m"(linux_gdt), "c"(entry), "S"(boot_params)

View File

@ -6,7 +6,6 @@
__attribute__((noreturn)) void multiboot1_spinup_32(
uint32_t entry_point, uint32_t multiboot1_info) {
asm volatile (
"cli\n\t"
"cld\n\t"
"pushfl\n\t"

View File

@ -14,15 +14,6 @@ __attribute__((noreturn)) void stivale_spinup_32(
(uint64_t)stack_lo | ((uint64_t)stack_hi << 32)
};
// Load invalid IDT
uint64_t invalid_idt[2] = {0, 0};
asm volatile (
"lidt %0"
:
: "m" (invalid_idt)
: "memory"
);
if (bits == 64) {
if (level5pg) {
// Enable CR4.LA57
@ -35,7 +26,6 @@ __attribute__((noreturn)) void stivale_spinup_32(
}
asm volatile (
"cli\n\t"
"cld\n\t"
"movl %%eax, %%cr3\n\t"
"movl %%cr4, %%eax\n\t"
@ -109,7 +99,6 @@ __attribute__((noreturn)) void stivale_spinup_32(
);
} else if (bits == 32) {
asm volatile (
"cli\n\t"
"cld\n\t"
"movl %%esi, %%esp\n\t"