summaryrefslogtreecommitdiff
path: root/kernel/arch
AgeCommit message (Collapse)Author
2024-12-14mmu: Remove recursion in ksbrkAnton Kling
Due to buggy edge cases it caused logic bugs which caused stack overflows. There should be no need to make any additional checks after the table was created anyways so it is better to just skip it.
2024-12-09mmu: Make certain allocations physical and virtual mapping linearAnton Kling
Previously it was possible for fragmentation to occur and as a result certain allocations would have a linear virtual address space but not a linear physical address space. This is bad since a lot of calls to kmalloc_align rely upon both being linear, it has now been changed such that all allocations done by kmalloc_align now guarantee this mapping holds for both virtual and physical addresses. It was due to oversight and sheer luck that this had been working for so long.
2024-11-28changesAnton Kling
2024-10-30kernel/mmu: Make sure to check for NULL.Anton Kling
2024-10-12Kernel/MMU: Don't return non present pages unless creation is desiredAnton Kling
`get_page` is a horrible multipurpose function and at this point I am unsure what behavior I expect and have expected it to produce. Refactor should probably be done soon.
2024-07-03Kernel/Time: Improve time keepingAnton Kling
This makes use of TSC and now provides a file system interface for userland programs to change the system time.
2024-07-03Kernel: Add simple support for timer using TSCAnton Kling
2024-06-30Kernel: Add clock_gettimeAnton Kling
2024-06-26Kernel: Code cleanupAnton Kling
2024-06-23Kernel: Fix small out of memory issuesAnton Kling
2024-06-17Reorganize logging codeAnton Kling
2024-06-09Add UDPAnton Kling
2024-05-05Kernel: Mask interrupts until they have a handlerAnton Kling
2024-05-02Bug: Kernel: Bounds check array accessAnton Kling
2024-05-02Kernel/MMU: Flush TLB after having made allocationsAnton Kling
2024-05-01Bug: Kernel/MMU: Initialize memory after allocationAnton Kling
The memory not being zeroed caused certain flags to be set(presumably no-cache flag) and resulted in the OS being unusually for only certain operations and only in certain cases.
2024-04-27Kernel: Ensure new kernel tables geet allocated for all current page directoriesAnton Kling
2024-04-26Kernel: clang format fixesAnton Kling
2024-04-26Kernel: More out of memory condition checksAnton Kling
2024-04-26Kernel: Improve error handling for out of memory conditionsAnton Kling
2024-04-22MMU: Extra asserts to avoid future regressionsAnton Kling
2024-04-18Kernel: Fix compiler warningsAnton Kling
2024-04-15Bug fix and cleanup.Anton Kling
2024-04-13Kernel: Don't hard fail if the kernel can't allocate memory.Anton Kling
Currently this is just a improvement of error handling but it should also try to free up memory where it is possible.
2024-04-13Kernel/MMU: Optimize search for free frames.Anton Kling
This can significantly cut down on the search space for unallocated frames. But it has not been benchmarked so I am unsure if it makes a big difference.
2024-04-12Kernel/MMU: Dellocate pagedirectory when process exits.Anton Kling
2024-04-11bug fixesAnton Kling
2024-03-26Increase support for signalsAnton Kling
2024-03-25Random changesAnton Kling
2024-03-20MMU: Fixed massive problem in assumption of RAM layoutAnton Kling
This caused certain addreses which where not RAM memory to be assigned to virtual addresses incorrectly. This caused a significant slowdown when running it with KVM due to constantly having to exit the VM if the OS writes to memory that is not RAM. This fix increased the performance of KVM significantly and improved TCG performance.
2024-03-14random changes madeAnton Kling
2024-02-21Kernel: Remove all inline assembly.Anton Kling
Now the kernel does not rely upon inline assembly which is often very error prone. This also means that the kernel could probably be compiled with any c99 compiler which would help future bootstrapping.
2024-02-21New clang-format optionsAnton Kling
2024-02-07Add enable/disable interrupts functionAnton Kling
This is to reduce usage of inline assembly
2024-02-07A lot of small changesAnton Kling
2023-11-28Meta: Apply new clang-format rules to kernelAnton Kling
2023-11-15Meta: Setup a drive over AHCIAnton Kling
2023-11-13Memory: Fix problem where certain tables did not get marked as kernel.Anton Kling
This caused the tables to be cloned instead of having the pointer copied on the new page directory creations. This is just a solution to the symptom of having a bad design for memory managment. Maybe I will figure out something better.
2023-11-13Crypto: Implement fast insecure RNG for overwritting memory areas.Anton Kling
This is mainly done to test for uninitlalized memory and find bugs faster. Therefore it does not need to be cryptographically secure or perfectly uniform. Xoshiro256++ seems like a good fit.
2023-11-12AHCI: Add very basic AHCI and some additional helper functions to mmu.cAnton Kling
Currently certain parts of the code are taken from osdev wiki as there seems to be very little documentation that I can find on how H2D FIS is structured. Those parts, especially some of the uglier parts of the example code will be rewritten/changed.
2023-11-10Kernel Style: Change uint*_t -> u*Anton Kling
2023-11-10Kernel/Memory: Fill new allocations with random data.Anton Kling
This should make it easier to spot uninitalized memory being used.
2023-11-09Kernel: Remove old commentAnton Kling
2023-11-08Kerenl/MMU: Remove dumb bug as a result of uninitalized memoryAnton Kling
The kernel would randomly crash. Turns out I did not zero out the frames so my page allocator seemed to get into some weird state.
2023-11-08Kernel/MMU: Detect system memory and dynamically adjust memory usage availableAnton Kling
Previously this would be hardcoded but now it can be detected by the bootloader and passed in via the multiboot header.
2023-11-08Kernel/MMU: Create a seperate table for heap allocationAnton Kling
2023-10-31Kernel: Remove all O0 optimizations on functions.Anton Kling
The kernel can now fully compile under O3 without any noticable problems :)
2023-10-31Kernel: Bug fix, infinite loop when checking string memory permissionsAnton Kling
If the string is pointed to a very exact location in memory the loop never finishes.
2023-10-31Meta: Move kernel and userland to their own folders.Anton Kling
This is to allow both the kernel and the userland to share certain header files and to make the folder structure a bit more clear.