chore: general cleanup in code (removed unused includes and cosmetic stuff

This commit is contained in:
karina
2026-05-02 22:43:32 +04:00
parent b519e69fbd
commit 272b9c8998
10 changed files with 12 additions and 14 deletions
-1
View File
@@ -1,6 +1,5 @@
#include <Arch/DTB.h>
#include <OS/Panic.h>
#include <OS/Log.h>
#include <Lib/Bytes.h>
#include <Lib/Align.h>
#include <Lib/String.h>
-2
View File
@@ -1,7 +1,5 @@
#include <Arch/Exceptions.h>
#include <Arch/CPU.h>
#include <Arch/GIC.h>
#include <IO/Serial.h>
#include <OS/Panic.h>
Address ExceptionsHandler(ExceptionsContext* frame, ExceptionsType type) {
+1 -1
View File
@@ -10,7 +10,7 @@ static void CombineForward(VMHeapBlockHeader* current) {
if (!current->next || !current->next->isFree) return;
current->size += sizeof(VMHeapBlockHeader) + current->next->size;
current->next = current->next->next;
if (current->next) current->next->previous = current; // what the fuck
if (current->next) current->next->previous = current;
}
void HeapInitialize() {
+3 -3
View File
@@ -54,9 +54,9 @@ void PMMInitialize(VMBootMemoryMap* bootMap) {
Size pagesToReserve = (regionSize + kVMPageSize - 1) / kVMPageSize;
for (Size p = 0; p < pagesToReserve; p++) {
Address pageAdress = regionBase + (p * kVMPageSize);
if (pageAdress >= sPMMRamBase && pageAdress < (sPMMRamBase + bootMap->totalRAM.size)) {
BitmapSet(sPMMBitmap, pageAdress);
Address pageAddress = regionBase + (p * kVMPageSize);
if (pageAddress >= sPMMRamBase && pageAddress < (sPMMRamBase + bootMap->totalRAM.size)) {
BitmapSet(sPMMBitmap, pageAddress);
}
}
}
+1 -1
View File
@@ -159,7 +159,7 @@ void VMMInitialize(VMBootMemoryMap* bootMap, Bootinfo* info) {
Size kernelSize = ((Address)_kernelEnd - (Address)_kernelStart) + pmmBitmapSize;
kernelSize = (kernelSize + kVMPageSize - 1) & ~(kVMPageSize - 1);
Address kernelPhysStart = 0x40100000; // TODO: hardcode is awful
Address kernelPhysStart = kKernelPhysBase;
for (Address offset = 0; offset < kernelSize; offset += kVMPageSize) {
Address phys = kernelPhysStart + offset;