v2 initial commit
This commit is contained in:
parent
2c97dba9f7
commit
d2ef885e8d
118 changed files with 2420 additions and 9320 deletions
25
include/kernel/page.h
Normal file
25
include/kernel/page.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _PAGE_H_
|
||||
#define _PAGE_H_
|
||||
|
||||
#include <kernel/types.h>
|
||||
|
||||
#define PAGE_FLAGS_EMPTY(flags) (!((flags) & PAGE_PRESENT))
|
||||
|
||||
typedef struct {
|
||||
u64 pgd;
|
||||
} pgd_t; /* PML4 entries */
|
||||
typedef struct {
|
||||
u64 pud;
|
||||
} pud_t; /* PDPT entries */
|
||||
typedef struct {
|
||||
u64 pmd;
|
||||
} pmd_t; /* PD entries */
|
||||
typedef struct {
|
||||
u64 pte;
|
||||
} pte_t; /* page table entries */
|
||||
|
||||
void page_init();
|
||||
pgd_t *pgd_get();
|
||||
|
||||
#endif /* _PAGE_H_ */
|
||||
Loading…
Reference in a new issue