Curle
8f0de18b37
The current system of separating x86 and x86_64 is no longer feasible with UEFI implementation. UEFI must have its own entry point. To this end, some optimisations have been implemented in the ASM files. Everything related to setup has been removed, leaving only the IDT and GDT utility functions. The linker may be required for the other files, though.
29 lines
367 B
ArmAsm
29 lines
367 B
ArmAsm
[BITS 32] ;... somehow.
|
|
|
|
|
|
[GLOBAL load_gdt]
|
|
[EXTERN gp]
|
|
load_gdt:
|
|
lgdt [gp]
|
|
|
|
mov ax, 0x10
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov fs, ax
|
|
mov gs, ax
|
|
mov ss, ax
|
|
jmp 0x08:flush ; Far jump and load the new CSD into the processor
|
|
flush:
|
|
ret
|
|
|
|
[GLOBAL load_idt]
|
|
[EXTERN idtp]
|
|
load_idt:
|
|
lidt [idtp]
|
|
ret
|
|
|
|
|
|
SECTION .bss
|
|
resb 8192
|
|
_sys_stack:
|