Gunnar Beutner
cbdb488578
Kernel: Move end_of_kernel_image after the .ksyms section
...
Without this we won't be able to detect whether .ksyms overlaps the end
of the page table we set up for the kernel image.
2021-07-16 18:50:59 +02:00
Gunnar Beutner
8aafbd917a
Kernel: Fix incorrect indentation
...
Looks like a tab and some other things snuck in. :)
2021-07-05 17:12:56 +02:00
Hendiadyoin1
9b7e48c6bd
Kernel: Replace raw asm functions with naked ones
2021-07-05 16:40:00 +02:00
Gunnar Beutner
52f9aaa823
Kernel: Use the GS segment for the per-CPU struct
...
Right now we're using the FS segment for our per-CPU struct. On x86_64
there's an instruction to switch between a kernel and usermode GS
segment (swapgs) which we could use.
This patch doesn't update the rest of the code to use swapgs but it
prepares for that by using the GS segment instead of the FS segment.
2021-07-02 23:33:17 +02:00
Gunnar Beutner
5666809889
Kernel: Fix building the kernel with LTO
...
Fixes #8383 .
2021-07-02 17:51:26 +02:00
Gunnar Beutner
e37576440d
Kernel: Fix stack alignment on x86_64
...
These were already properly aligned (as far as I can tell).
2021-06-30 15:13:30 +02:00
Gunnar Beutner
732dc72c58
Kernel: Fix the limit for the IDT table
2021-06-28 22:29:28 +02:00
Gunnar Beutner
e56a0d6af7
Kernel: Fix memset() on x86_64
...
Previously memset() only set half of the bytes to the requested value.
2021-06-28 15:55:00 +02:00
Gunnar Beutner
9d9f20391d
Kernel: Use macros for GDT indices instead of hardcoding the values
2021-06-27 15:46:42 +02:00
Gunnar Beutner
065c6c307d
Kernel: Add support for interrupts on x86_64
2021-06-27 15:46:42 +02:00
Gunnar Beutner
233ef26e4d
Kernel+Userland: Add x86_64 registers to RegisterState/PtraceRegisters
2021-06-27 15:46:42 +02:00
Hendiadyoin1
62f9377656
Kernel: Move special sections into Sections.h
...
This also removes a lot of CPU.h includes infavor for Sections.h
2021-06-24 00:38:23 +02:00
Hendiadyoin1
7ca3d413f7
Kernel: Pull apart CPU.h
...
This does not add any functional changes
2021-06-24 00:38:23 +02:00