25 lines
451 B
C
25 lines
451 B
C
/* 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_ */
|