summaryrefslogtreecommitdiff
path: root/Kernel/linker.ld
AgeCommit message (Collapse)Author
2020-01-17Kernel: Move kernel above the 3GB virtual address markAndreas Kling
The kernel and its static data structures are no longer identity-mapped in the bottom 8MB of the address space, but instead move above 3GB. The first 8MB above 3GB are pseudo-identity-mapped to the bottom 8MB of the physical address space. But things don't have to stay this way! Thanks to Jesse who made an earlier attempt at this, it was really easy to get device drivers working once the page tables were in place! :^) Fixes #734.
2020-01-17Kernel: Reindent linker scriptAndreas Kling
2020-01-06Kernel: Harden memory mapping of the kernel imageAndreas Kling
We now map the kernel's text and rodata segments read+execute. We also make the data and bss segments non-executable. Thanks to q3k for the idea! :^)
2019-11-23Revert "Kernel: Move Kernel mapping to 0xc0000000"Andreas Kling
This reverts commit bd33c6627394b2166e1419965dd3b2d2dc0c401f. This broke the network card drivers, since they depended on kmalloc addresses being identity-mapped.
2019-11-22Kernel: Move Kernel mapping to 0xc0000000Jesse Buhagiar
The kernel is now no longer identity mapped to the bottom 8MiB of memory, and is now mapped at the higher address of `0xc0000000`. The lower ~1MiB of memory (from GRUB's mmap), however is still identity mapped to provide an easy way for the kernel to get physical pages for things such as DMA etc. These could later be mapped to the higher address too, as I'm not too sure how to go about doing this elegantly without a lot of address subtractions.
2019-11-08Kernel: Removing hardcoded offsets from Memory Managersupercomputer7
Now the kernel page directory and the page tables are located at a safe address, to prevent from paging data colliding with garbage.
2019-11-04Kernel: Reorganize memory layout a bitAndreas Kling
Move the kernel image to the 1 MB physical mark. This prevents it from colliding with stuff like the VGA memory. This was causing us to end up with the BIOS screen contents sneaking into kernel memory sometimes. This patch also bumps the kmalloc heap size from 1 MB to 3 MB. It's not the perfect permanent solution (obviously) but it should get the OOM monkey off our backs for a while.
2019-10-31Kernel: Add bare minimum for global constructors (#707)Andrew Kaster
Add text.startup to the .text block, add .ctors as well. Use them in init.cpp to call global constructors after gtd and idt init. That way any funky constructors should be ok. Also defines some Itanium C++ ABI methods that probably shouldn't be, but without them the linker gets very angry. If the code ever actually tries to use __dso_handle or call __cxa_atexit, there's bigger problems with the kernel. Bit of a hack would be an understatement but hey. It works :)
2019-10-20Kernel: Move Boot/ into Arch/i386/Boot (#667)Tidux
2019-04-01Kernel: Use a multiboot header instead of a convoluted two-part bootloader.Andreas Kling
The old bootloader was hilariously complicated, requiring a floppy disk with the kernel on it, and a hard drive with the file system. This patch removes the floppy disk from the equation and replaces it with a multiboot header. This means the kernel can now be booted with qemu-system-i386 -kernel kernel
2018-10-16Import the "gerbert" kernel I worked on earlier this year.Andreas Kling
It's a lot crappier than I remembered it. It's gonna need a lot of work.