Files
mkrtos-real/mkrtos_knl/arch/aarch64/early_boot.h
2024-03-31 16:06:11 +00:00

23 lines
732 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <types.h>
#include "pager.h"
#include "asm/mm.h"
#include "asm_config.h"
#define PAGE_DEEP 4
typedef struct page_entry
{
pte_t *dir; //!< 存储页表地址
uint8_t lv_shift_sizes[PAGE_DEEP]; //!< 页表翻译的大小order
uint8_t depth; //!< 页表深度
} page_entry_t;
pte_t *pages_walk(page_entry_t *pdir, addr_t virt_addr, mword_t size, void *(*fn_alloc)(void));
void map_mm(page_entry_t *pdir, addr_t virt_addr, addr_t phys_addr,
mword_t page_order, mword_t pfn_cn, mword_t attr);
void per_cpu_boot_mapping(bool_t init_pages);
page_entry_t *boot_get_pdir(void);
void knl_pdir_init(page_entry_t *pdir, pte_t *dir, int page_deep);