aboutsummaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-02-16 23:36:18 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-02-16 23:37:08 +0100
commit768a7d4a989d95e22e1249c36c57655665975918 (patch)
tree1556560f1bebf7fe21606798ee401308075134d2 /i386
parent6ac0b3e58152e1ecd9851dec6f05d33f123dc198 (diff)
downloadgnumach-768a7d4a989d95e22e1249c36c57655665975918.tar.gz
gnumach-768a7d4a989d95e22e1249c36c57655665975918.tar.bz2
gnumach-768a7d4a989d95e22e1249c36c57655665975918.zip
io_map: Fix using physical addresses
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/io_map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/i386/i386/io_map.c b/i386/i386/io_map.c
index 2c2aa720..96062243 100644
--- a/i386/i386/io_map.c
+++ b/i386/i386/io_map.c
@@ -38,7 +38,7 @@ extern vm_offset_t kernel_virtual_start;
*/
vm_offset_t
io_map(
- vm_offset_t phys_addr,
+ phys_addr_t phys_addr,
vm_size_t size)
{
vm_offset_t start;
@@ -72,10 +72,10 @@ io_map(
*/
vm_offset_t
io_map_cached(
- vm_offset_t phys_addr,
+ phys_addr_t phys_addr,
vm_size_t size)
{
- static vm_offset_t base;
+ static phys_addr_t base;
static vm_size_t length;
static vm_offset_t map;
@@ -83,8 +83,8 @@ io_map_cached(
|| (phys_addr < base)
|| (base + length < phys_addr + size))
{
- base = trunc_page(phys_addr);
- length = round_page(phys_addr - base + size);
+ base = trunc_phys(phys_addr);
+ length = round_phys(phys_addr - base + size);
map = io_map(base, length);
}