MOS Source Code
Loading...
Searching...
No Matches
do_mask.c
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#include "
mos/mm/paging/table_ops/do_mask.h
"
4
5
#include "
mos/platform/platform.h
"
6
7
static
void
pml1e_do_mask_callback
(
pml1_t
pml1,
pml1e_t
*e,
ptr_t
vaddr,
void
*data)
8
{
9
MOS_UNUSED
(pml1);
10
MOS_UNUSED
(vaddr);
11
if
(
platform_pml1e_get_present
(e))
12
{
13
struct
pagetable_do_mask_data
*mask_data = data;
14
vm_flags
flags =
platform_pml1e_get_flags
(e);
15
flags &= ~mask_data->mask;
16
platform_pml1e_set_flags
(e, flags);
17
platform_invalidate_tlb
(vaddr);
18
}
19
}
20
21
const
pagetable_walk_options_t
pagetable_do_mask_callbacks
= {
22
.pml1e_callback =
pml1e_do_mask_callback
,
23
};
platform_pml1e_get_flags
vm_flags platform_pml1e_get_flags(const pml1e_t *pml1e)
Definition
mm.c:101
platform_invalidate_tlb
void platform_invalidate_tlb(ptr_t vaddr)
Definition
mm.c:72
platform_pml1e_set_flags
void platform_pml1e_set_flags(pml1e_t *pml1, vm_flags flags)
Definition
mm.c:95
platform_pml1e_get_present
bool platform_pml1e_get_present(const pml1e_t *pml1)
Definition
mm.c:90
pagetable_do_mask_callbacks
const pagetable_walk_options_t pagetable_do_mask_callbacks
Definition
do_mask.c:21
pml1e_do_mask_callback
static void pml1e_do_mask_callback(pml1_t pml1, pml1e_t *e, ptr_t vaddr, void *data)
Definition
do_mask.c:7
do_mask.h
MOS_UNUSED
#define MOS_UNUSED(x)
Definition
mos_global.h:64
platform.h
vm_flags
vm_flags
Definition
platform.h:40
pagetable_do_mask_data
Definition
do_mask.h:7
pagetable_walk_options_t
Definition
pml_types.h:93
pml1_t
Definition
pml_types.h:35
pml1e_t
Definition
pml_types.h:35
ptr_t
unsigned long ptr_t
Definition
types.h:25
kernel
mm
paging
table_ops
do_mask.c
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0