forked from xamidev/pepperOS
Config header file + comment header
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief x64 4-level paging implementation
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include "paging.h"
|
||||
#include "pmm.h"
|
||||
#include <kernel.h>
|
||||
#include <stddef.h>
|
||||
#include <limine.h>
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
Paging on x86 uses four different page table levels:
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief x64 4-level paging implementation
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef PAGING_H
|
||||
#define PAGING_H
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
#define BITS_PER_ROW 64
|
||||
|
||||
#include <stdint.h>
|
||||
#include <limine.h>
|
||||
@@ -40,10 +45,4 @@ extern uint64_t hhdm_off;
|
||||
#define PTE_HUGE (1ULL << 7)
|
||||
#define PTE_NOEXEC (1ULL << 63)
|
||||
|
||||
// Specified in linker.ld
|
||||
#define KERNEL_BASE 0xFFFFFFFF80000000ULL
|
||||
|
||||
// 2 MB should be enough (as of now, the whole kernel ELF is around 75kb)
|
||||
#define KERNEL_SIZE 0x200000
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,8 @@
|
||||
// OMG here we are. I'm cooked.
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Physical memory manager from freelist
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
/*
|
||||
pmm - Physical Memory Manager
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Physical memory manager from freelist
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef PAGING_PMM_H
|
||||
#define PAGING_PMM_H
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Virtual memory manager
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
/*
|
||||
The VMM (virtual memory manager) will have two roles:
|
||||
- mapping pages
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Virtual memory manager
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef VMM_H
|
||||
#define VMM_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user