kernel: separate headers into kernel and user headers

all kernel headers have been moved from include/mango to include/kernel
and include definitions that are only relevant to kernel-space.

any definitions that are relevant to both kernel- and user-space
(i.e. type definitions, syscall IDs) have been moved to
include/mango within libmango.
This commit is contained in:
2026-02-19 18:54:48 +00:00
parent e3dd48a0fa
commit 6019c9307d
117 changed files with 1361 additions and 3845 deletions

View File

@@ -1,14 +1,14 @@
#include <mango/compiler.h>
#include <mango/libc/stdio.h>
#include <mango/memblock.h>
#include <mango/pmap.h>
#include <mango/printk.h>
#include <mango/sched.h>
#include <kernel/compiler.h>
#include <kernel/libc/stdio.h>
#include <kernel/memblock.h>
#include <kernel/pmap.h>
#include <kernel/printk.h>
#include <kernel/sched.h>
#include <kernel/types.h>
#include <kernel/vm-object.h>
#include <kernel/vm-region.h>
#include <kernel/vm.h>
#include <mango/status.h>
#include <mango/types.h>
#include <mango/vm-object.h>
#include <mango/vm-region.h>
#include <mango/vm.h>
/* some helpful datasize constants */
#define C_1GiB 0x40000000ULL
@@ -43,7 +43,7 @@ static pmap_t alloc_pmap(void)
return vm_virt_to_phys(p);
}
static pte_t make_pte(pfn_t pfn, enum vm_prot prot, enum page_size size)
static pte_t make_pte(pfn_t pfn, vm_prot_t prot, enum page_size size)
{
pte_t v = pfn;
@@ -139,7 +139,7 @@ static kern_status_t do_pmap_add(
pmap_t pmap,
virt_addr_t pv,
pfn_t pfn,
enum vm_prot prot,
vm_prot_t prot,
enum page_size size)
{
unsigned int pml4t_index = BAD_INDEX, pdpt_index = BAD_INDEX,
@@ -371,7 +371,7 @@ kern_status_t pmap_add(
pmap_t pmap,
virt_addr_t p,
pfn_t pfn,
enum vm_prot prot,
vm_prot_t prot,
enum pmap_flags flags)
{
enum page_size ps = PS_4K;
@@ -387,7 +387,7 @@ kern_status_t pmap_add_block(
virt_addr_t p,
pfn_t pfn,
size_t len,
enum vm_prot prot,
vm_prot_t prot,
enum pmap_flags flags)
{
return KERN_OK;