From 414ecbd4909414ef533744156fddc67f118deaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 20 Aug 2003 02:17:09 +0000 Subject: [PATCH] Now uses the BeOS map_physical_memory() call. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4334 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/addons/bus_managers/pci/pci.c | 10 +++------- src/kernel/core/arch/x86/arch_vm.c | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/kernel/core/addons/bus_managers/pci/pci.c b/src/kernel/core/addons/bus_managers/pci/pci.c index 6bce64b331..b5631c512d 100755 --- a/src/kernel/core/addons/bus_managers/pci/pci.c +++ b/src/kernel/core/addons/bus_managers/pci/pci.c @@ -1353,13 +1353,9 @@ pci_module_init(void) check_pci(); - gPCI_Region = vm_map_physical_memory(vm_get_kernel_aspace_id(), - "pci_bios", - (void **)&gPCI_BIOS_Address, - REGION_ADDR_ANY_ADDRESS, - 0x10000, - LOCK_RO | LOCK_KERNEL, - (addr)0xf0000); + gPCI_Region = map_physical_memory("pci_bios", (void *)0xf0000, + 0x10000, B_ANY_KERNEL_ADDRESS, B_KERNEL_READ_AREA, + (void **)&gPCI_BIOS_Address); pirTable = find_pir_table(); if (pirTable) { diff --git a/src/kernel/core/arch/x86/arch_vm.c b/src/kernel/core/arch/x86/arch_vm.c index d090d75596..dcb8a47b9f 100755 --- a/src/kernel/core/arch/x86/arch_vm.c +++ b/src/kernel/core/arch/x86/arch_vm.c @@ -58,8 +58,8 @@ arch_vm_init_endvm(kernel_args *ka) TRACE(("arch_vm_init_endvm: entry\n")); // map 0 - 0xa0000 directly - id = vm_map_physical_memory(vm_get_kernel_aspace_id(), "dma_region", &ptr, - REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW | LOCK_KERNEL, 0x0); + id = map_physical_memory("dma_region", (void *)0x0, 0xa0000, + B_ANY_KERNEL_ADDRESS, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, &ptr); if (id < 0) { panic("arch_vm_init_endvm: unable to map dma region\n"); return B_NO_MEMORY;