summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2006-08-28 20:05:00 +0000
committercognet <cognet@FreeBSD.org>2006-08-28 20:05:00 +0000
commitfa893a6f9c4b046d0a798810c61c986dfc111e8e (patch)
treecdd3aaa633997e078f357028af355f54b219a615 /sys
parent603e2aafcdd35903b0eaf99fc5800fd84a8ffcbb (diff)
downloadFreeBSD-src-fa893a6f9c4b046d0a798810c61c986dfc111e8e.zip
FreeBSD-src-fa893a6f9c4b046d0a798810c61c986dfc111e8e.tar.gz
Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR
code.
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/at91/at91.c12
-rw-r--r--sys/arm/at91/at91rm92reg.h2
-rw-r--r--sys/arm/at91/kb920x_machdep.c8
3 files changed, 13 insertions, 9 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c
index a4747ea..e48370f 100644
--- a/sys/arm/at91/at91.c
+++ b/sys/arm/at91/at91.c
@@ -54,7 +54,11 @@ at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
vm_paddr_t pa, endpa;
pa = trunc_page(bpa);
- if (pa >= 0xfff00000)
+ if (pa >= 0xfff00000) {
+ *bshp = pa - 0xf0000000 + 0xd0000000;
+ return (0);
+ }
+ if (pa >= 0xdff00000)
return (0);
endpa = round_page(bpa + size);
@@ -417,8 +421,8 @@ at91_attach(device_t dev)
rman_manage_region(&sc->sc_irq_rman, 1, 31) != 0)
panic("at91_attach: failed to set up IRQ rman");
if (rman_init(&sc->sc_mem_rman) != 0 ||
- rman_manage_region(&sc->sc_mem_rman, 0xfff00000ul,
- 0xfffffffful) != 0)
+ rman_manage_region(&sc->sc_mem_rman, 0xdff00000ul,
+ 0xdffffffful) != 0)
panic("at91_attach: failed to set up memory rman");
if (rman_manage_region(&sc->sc_mem_rman, AT91RM92_OHCI_BASE,
AT91RM92_OHCI_BASE + AT91RM92_OHCI_SIZE - 1) != 0)
@@ -543,7 +547,7 @@ at91_setup_intr(device_t dev, device_t child,
void **cookiep)
{
struct at91_softc *sc = device_get_softc(dev);
-
+
if (rman_get_start(ires) == AT91RM92_IRQ_SYSTEM && !(flags & INTR_FAST))
panic("All system interrupt ISRs must be type INTR_FAST");
BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, intr, arg,
diff --git a/sys/arm/at91/at91rm92reg.h b/sys/arm/at91/at91rm92reg.h
index 7a26339..b1b6758 100644
--- a/sys/arm/at91/at91rm92reg.h
+++ b/sys/arm/at91/at91rm92reg.h
@@ -41,7 +41,7 @@
* 0xf0000000 - 0xfffffffff : Peripherals
*/
-#define AT91RM92_BASE 0xf0000000
+#define AT91RM92_BASE 0xd0000000
/* Usart */
#define AT91RM92_USART0_BASE 0xffc0000
diff --git a/sys/arm/at91/kb920x_machdep.c b/sys/arm/at91/kb920x_machdep.c
index 43cf488..900173d 100644
--- a/sys/arm/at91/kb920x_machdep.c
+++ b/sys/arm/at91/kb920x_machdep.c
@@ -153,7 +153,7 @@ static const struct pmap_devmap kb920x_devmap[] = {
* and the timer. Other devices should use newbus to
* map their memory anyway.
*/
- 0xfff00000,
+ 0xdff00000,
0xfff00000,
0x100000,
VM_PROT_READ|VM_PROT_WRITE,
@@ -364,7 +364,7 @@ initarm(void *arg, void *arg2)
l1pagetable = kernel_l1pt.pv_va;
/* Map the L2 pages tables in the L1 page table */
- pmap_link_l2pt(l1pagetable, ARM_VECTORS_LOW,
+ pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH,
&kernel_pt_table[KERNEL_PT_SYS]);
for (i = 0; i < KERNEL_PT_KERN_NUM; i++)
pmap_link_l2pt(l1pagetable, KERNBASE + i * 0x100000,
@@ -383,7 +383,7 @@ initarm(void *arg, void *arg2)
/* Map the vector page. */
- pmap_map_entry(l1pagetable, ARM_VECTORS_LOW, systempage.pv_pa,
+ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
/* Map the stack pages */
pmap_map_chunk(l1pagetable, irqstack.pv_va, irqstack.pv_pa,
@@ -462,7 +462,7 @@ initarm(void *arg, void *arg2)
thread0.td_frame = &proc0_tf;
pcpup->pc_curpcb = thread0.td_pcb;
- arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
+ arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1);
/*
OpenPOWER on IntegriCloud