1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include "mos/mm/paging/pml_types.h"
6#include "mos/platform/platform.h"
7
8void mm_do_map(pgd_t top, ptr_t vaddr, pfn_t pfn, size_t n_pages, vm_flags flags, bool do_refcount);
9void mm_do_flag(pgd_t top, ptr_t vaddr, size_t n_pages, vm_flags flags);
10void mm_do_unmap(pgd_t top, ptr_t vaddr, size_t n_pages, bool do_unref);
11void mm_do_mask_flags(pgd_t max, ptr_t vaddr, size_t n_pages, vm_flags to_remove);
12void mm_do_copy(pgd_t src, pgd_t dst, ptr_t vaddr, size_t n_pages);
13pfn_t mm_do_get_pfn(pgd_t top, ptr_t vaddr);
14vm_flags mm_do_get_flags(pgd_t max, ptr_t vaddr);
15bool mm_do_get_present(pgd_t max, ptr_t vaddr);
16