From d2f12c590073cb9f2c3f05e7ac08517bce38bddc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 22 Feb 2018 21:23:48 -0500 Subject: [PATCH 1/2] mmu: Remove extraneous argument to mmu_unmap in mmu_unmap_range --- exosphere/mmu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exosphere/mmu.h b/exosphere/mmu.h index cb398d315..0a2274600 100644 --- a/exosphere/mmu.h +++ b/exosphere/mmu.h @@ -165,7 +165,7 @@ static inline void mmu_map_page_range(uintptr_t *tbl, uintptr_t base_addr, uintp static inline void mmu_unmap_range(unsigned int level, uintptr_t *tbl, uintptr_t base_addr, uintptr_t phys_addr, size_t size) { size = (size >> MMU_Lx_SHIFT(level)) << MMU_Lx_SHIFT(level); for(size_t offset = 0; offset < size; offset += MMU_Lx_SHIFT(level)) { - mmu_unmap(level, tbl, base_addr + offset, phys_addr + offset); + mmu_unmap(level, tbl, base_addr + offset); } } From 705802d749c3e3596d9c7f8bf51bd0e570be27db Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Feb 2018 07:32:23 -0500 Subject: [PATCH 2/2] mmu: Fix call to non-existent mmu_unmap_page_range function in mmio_unmap_all_devices --- exosphere/mmu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exosphere/mmu.h b/exosphere/mmu.h index 0a2274600..84bb66187 100644 --- a/exosphere/mmu.h +++ b/exosphere/mmu.h @@ -250,7 +250,7 @@ static inline void mmio_map_all_devices(uintptr_t *mmu_l3_tbl) { static inline void mmio_unmap_all_devices(uintptr_t *mmu_l3_tbl) { for(size_t i = 0, offset = 0; i < sizeof(devices) / sizeof(devices[0]); i++) { - mmu_unmap_page_range(mmu_l3_tbl, MMIO_BASE + offset, devices[i].pa, devices[i].size); + mmu_unmap_range(3, mmu_l3_tbl, MMIO_BASE + offset, devices[i].size); offset += devices[i].size; offset += 0x1000; /* insert guard page */