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@
-/* $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.
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);
{
vaddr_t va, endva;
- if (bsh > (u_long)KERNEL_BASE)
- return;
-
va = trunc_page((vaddr_t)bsh);
endva = round_page((vaddr_t)bsh + size);