MOS Source Code
Loading...
Searching...
No Matches
iterator.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#pragma once
4
5
#include "
mos/platform/platform.h
"
6
7
typedef
struct
8
{
9
bool
present
;
10
ptr_t
vaddr
, vaddr_end;
11
pfn_t
pfn
, pfn_end;
12
vm_flags
flags
;
13
}
pagetable_iter_range_t
;
14
15
typedef
struct
16
{
17
pgd_t
pgd
;
18
19
ptr_t
start
;
20
ptr_t
end
;
21
ptr_t
vaddr
;
22
23
pagetable_iter_range_t
range
;
24
}
pagetable_iter_t
;
25
34
void
pagetable_iter_init
(
pagetable_iter_t
*it,
pgd_t
pgd,
ptr_t
vaddr,
ptr_t
end);
35
42
pagetable_iter_range_t
*
pagetable_iter_next
(
pagetable_iter_t
*it);
pagetable_iter_init
void pagetable_iter_init(pagetable_iter_t *it, pgd_t pgd, ptr_t vaddr, ptr_t end)
Initialize a pagetable iterator.
Definition
iterator.c:82
pagetable_iter_next
pagetable_iter_range_t * pagetable_iter_next(pagetable_iter_t *it)
Get the next page table range.
Definition
iterator.c:97
platform.h
vm_flags
vm_flags
Definition
platform.h:40
pagetable_iter_range_t
Definition
iterator.h:8
pagetable_iter_range_t::vaddr
ptr_t vaddr
Definition
iterator.h:10
pagetable_iter_range_t::pfn
pfn_t pfn
Definition
iterator.h:11
pagetable_iter_range_t::present
bool present
Definition
iterator.h:9
pagetable_iter_range_t::flags
vm_flags flags
Definition
iterator.h:12
pagetable_iter_t
Definition
iterator.h:16
pagetable_iter_t::vaddr
ptr_t vaddr
Definition
iterator.h:21
pagetable_iter_t::pgd
pgd_t pgd
Definition
iterator.h:17
pagetable_iter_t::end
ptr_t end
Definition
iterator.h:20
pagetable_iter_t::start
ptr_t start
Definition
iterator.h:19
pagetable_iter_t::range
pagetable_iter_range_t range
Definition
iterator.h:23
pgd_t
Definition
pml_types.h:85
pfn_t
unsigned long long pfn_t
Definition
types.h:41
ptr_t
unsigned long ptr_t
Definition
types.h:25
kernel
include
private
mos
mm
paging
iterator.h
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0