Kernel: Move kmalloc and MMU to Memory directory

This commit is contained in:
Bananymous 2023-04-14 13:30:21 +03:00
parent 079df39ca8
commit 9c0f3dd996
15 changed files with 16 additions and 17 deletions

View File

@ -1,7 +1,7 @@
#pragma once
#if defined(__is_kernel)
#include <kernel/kmalloc.h>
#include <kernel/Memory/kmalloc.h>
#else
#include <stdlib.h>
#endif

View File

@ -26,7 +26,7 @@ set(KERNEL_SOURCES
kernel/Input/PS2Keymap.cpp
kernel/InterruptController.cpp
kernel/kernel.cpp
kernel/kmalloc.cpp
kernel/Memory/kmalloc.cpp
kernel/PCI.cpp
kernel/PIC.cpp
kernel/PIT.cpp

View File

@ -1,7 +1,7 @@
#include <BAN/Errors.h>
#include <kernel/IDT.h>
#include <kernel/InterruptController.h>
#include <kernel/kmalloc.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Panic.h>
#include <kernel/Scheduler.h>

View File

@ -1,7 +1,7 @@
#include <BAN/Errors.h>
#include <kernel/Debug.h>
#include <kernel/MMU.h>
#include <kernel/kmalloc.h>
#include <kernel/Memory/MMU.h>
#include <kernel/Memory/kmalloc.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
#include <BAN/Errors.h>
#include <kernel/IDT.h>
#include <kernel/InterruptController.h>
#include <kernel/kmalloc.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Panic.h>
#include <kernel/Scheduler.h>

View File

@ -1,6 +1,6 @@
#include <BAN/Errors.h>
#include <kernel/kmalloc.h>
#include <kernel/MMU.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Memory/MMU.h>
#define PAGE_SIZE 0x1000
#define PAGE_MASK ~(PAGE_SIZE - 1)

View File

@ -1,7 +1,7 @@
#include <BAN/ScopeGuard.h>
#include <BAN/StringView.h>
#include <kernel/ACPI.h>
#include <kernel/MMU.h>
#include <kernel/Memory/MMU.h>
#define RSPD_SIZE 20
#define RSPDv2_SIZE 36

View File

@ -4,7 +4,7 @@
#include <kernel/APIC.h>
#include <kernel/CPUID.h>
#include <kernel/IDT.h>
#include <kernel/MMU.h>
#include <kernel/Memory/MMU.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
#include <BAN/Errors.h>
#include <kernel/CriticalScope.h>
#include <kernel/kmalloc.h>
#include <kernel/kprint.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/multiboot.h>
#include <kernel/Thread.h>
@ -128,7 +128,6 @@ void kmalloc_initialize()
{
if (mmmt->base_addr <= s_kmalloc_info.base && s_kmalloc_fixed_info.end <= mmmt->base_addr + mmmt->length)
{
dprintln("Total usable RAM: {}.{} MB", mmmt->length / MB, mmmt->length % MB);
valid = true;
break;
}

View File

@ -2,7 +2,7 @@
#include <kernel/CriticalScope.h>
#include <kernel/FS/VirtualFileSystem.h>
#include <kernel/LockGuard.h>
#include <kernel/MMU.h>
#include <kernel/Memory/MMU.h>
#include <kernel/Process.h>
#include <kernel/Scheduler.h>

View File

@ -1,6 +1,6 @@
#include <BAN/Errors.h>
#include <kernel/Debug.h>
#include <kernel/MMU.h>
#include <kernel/Memory/MMU.h>
#include <kernel/multiboot.h>
#include <kernel/Terminal/VesaTerminalDriver.h>

View File

@ -1,6 +1,6 @@
#include <BAN/Errors.h>
#include <kernel/InterruptController.h>
#include <kernel/kmalloc.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Process.h>
#include <kernel/Scheduler.h>
#include <kernel/Thread.h>

View File

@ -7,9 +7,9 @@
#include <kernel/IDT.h>
#include <kernel/Input/PS2Controller.h>
#include <kernel/InterruptController.h>
#include <kernel/kmalloc.h>
#include <kernel/kprint.h>
#include <kernel/MMU.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Memory/MMU.h>
#include <kernel/multiboot.h>
#include <kernel/PCI.h>
#include <kernel/PIC.h>