From 384ec033b8fbf26db2b390218541e9bd2a2e4cf6 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 21 Sep 2025 14:09:49 -0400 Subject: kern: bus: Simply return bus_space, don't remap As of now, the bootloader handles setting up the MMIO regions and we'll need huge page support (2 megs) for reassigning MMIO space Signed-off-by: Ian Moffett --- src/sys/arch/amd64/os/os_bus.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/sys/arch/amd64') diff --git a/src/sys/arch/amd64/os/os_bus.c b/src/sys/arch/amd64/os/os_bus.c index 96f841d..2c1d0dd 100644 --- a/src/sys/arch/amd64/os/os_bus.c +++ b/src/sys/arch/amd64/os/os_bus.c @@ -47,35 +47,12 @@ bus_space_map(struct bus_space *bp, bus_addr_t pa, size_t len) static size_t PSIZE = DEFAULT_PAGESIZE; struct vm_vas vas; struct mmu_map spec; - vaddr_t va; int error; if (bp == NULL || pa == 0) { return -EINVAL; } - /* Get the current VAS */ - error = mmu_this_vas(&vas); - if (error < 0) { - printf("bus_space_map: could not read VAS\n"); - return error; - } - - spec.pa = pa; - spec.va = va; - error = vm_map(&vas, &spec, len, PROT_READ | PROT_WRITE); - if (error < 0) { - printf("bus_space_map: could not map base\n"); - return error; - } - - /* Mark uncachable and global */ - pmap_set_cache( - &vas, pa, - MMU_CACHE_UC | - MMU_CACHE_GL - ); - /* Identity mapped */ bp->va_base = (void *)pa; bp->length = len; -- cgit v1.2.3