diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2025-04-27 11:20:02 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2025-04-27 11:20:02 +0000 |
| commit | 7261c64bb236a313ed8846a9c9dbded6890a9e98 (patch) | |
| tree | 3f43ab7d1e87025dd622bbc9cd56aad5d37a2f78 /arch/x86_64/src/boot | |
| parent | c865eff02ae1978b4f665432d853374d1ffacecf (diff) | |
| download | teachos-7261c64bb236a313ed8846a9c9dbded6890a9e98.tar.xz teachos-7261c64bb236a313ed8846a9c9dbded6890a9e98.zip | |
wip implement syscall in cpp
Diffstat (limited to 'arch/x86_64/src/boot')
| -rw-r--r-- | arch/x86_64/src/boot/boot.s | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s index 24b38ca..7932045 100644 --- a/arch/x86_64/src/boot/boot.s +++ b/arch/x86_64/src/boot/boot.s @@ -352,31 +352,6 @@ prepare_page_maps: .section .boot_text, "ax", @progbits .code64 -syscall_target: - iretq - -.global syscall_trampoline -syscall_trampoline: - /* Write target function pointer in IA32_LSTAR MSR */ - mov $0xC0000082, %ecx /* IA32_LSTAR MSR */ - lea [syscall_target], %rax - lea [syscall_target], %rdx - shr $32, %rdx - wrmsr - - /* Write ... in IA32_LSTAR MSR */ - mov $0xC0000084, %ecx /* IA32_FMASK MSR */ - mov $0x0, %rax /* ... lower 32 bits */ - mov $0x0, %rdx /* ... upper 32 bits */ - wrmsr - - /* Write Segment selector in IA32_STAR MSR */ - mov $0xC0000081, %ecx /* IA32_STAR MSR */ - mov $0x10, %rax /* SS lower 32 bits */ - mov $0x0, %rdx /* SS upper 32 bits */ - wrmsr - - _transition_to_long_mode: xor %rax, %rax mov %rax, %ss |
