From: patrick Date: Wed, 27 Jul 2016 21:25:25 +0000 (+0000) Subject: Remove a feature to re-use existing early bootstrap mappings. This X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad612ec499aa6cc2b12dbac3d193df0c6b0c5662;p=openbsd Remove a feature to re-use existing early bootstrap mappings. This allowed you to pass a virtual address, which you received from an early bootstrap mapping, as physical address to bus_space_map(9). It breaks bus_space_map(9) for peripherals that are after 0xC0000000, as it assumes that everything after that address cannot be a real peripheral. But that's wrong. It does not make sense to pass a virtual address to bus_space_map(9) anyway, so just get rid of this whole "feature". ok kettenis@ --- diff --git a/sys/arch/arm/armv7/armv7_space.c b/sys/arch/arm/armv7/armv7_space.c index 243e2dbbd50..d61549301da 100644 --- a/sys/arch/arm/armv7/armv7_space.c +++ b/sys/arch/arm/armv7/armv7_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_space.c,v 1.6 2014/11/16 12:30:56 deraadt Exp $ */ +/* $OpenBSD: armv7_space.c,v 1.7 2016/07/27 21:25:25 patrick Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -172,14 +172,6 @@ armv7_bs_map(void *t, bus_addr_t bpa, bus_size_t size, vaddr_t va; pt_entry_t *pte; - if ((u_long)bpa > (u_long)KERNEL_BASE) { - /* Some IO registers (ex. UART ports for console) - are mapped to fixed address by board specific - routine. */ - *bshp = bpa; - return(0); - } - startpa = trunc_page(bpa); endpa = round_page(bpa + size); @@ -213,9 +205,6 @@ armv7_bs_unmap(void *t, bus_space_handle_t bsh, bus_size_t size) { vaddr_t va, endva; - if (bsh > (u_long)KERNEL_BASE) - return; - va = trunc_page((vaddr_t)bsh); endva = round_page((vaddr_t)bsh + size);