mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
parent
3344f91fc4
commit
4499b0418c
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@ template<typename T>
|
||||||
static TypedMapping<T> map_typed(PhysicalAddress paddr, size_t length, Region::Access access = Region::Access::Read)
|
static TypedMapping<T> map_typed(PhysicalAddress paddr, size_t length, Region::Access access = Region::Access::Read)
|
||||||
{
|
{
|
||||||
TypedMapping<T> table;
|
TypedMapping<T> table;
|
||||||
table.region = MM.allocate_kernel_region(paddr.page_base(), page_round_up(length), {}, access);
|
size_t mapping_length = page_round_up(paddr.offset_in_page() + length);
|
||||||
|
table.region = MM.allocate_kernel_region(paddr.page_base(), mapping_length, {}, access);
|
||||||
table.offset = paddr.offset_in_page();
|
table.offset = paddr.offset_in_page();
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue