Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR

code.
This commit is contained in:
cognet 2006-08-28 20:05:00 +00:00
parent 603e2aafcd
commit fa893a6f9c
3 changed files with 13 additions and 9 deletions

View File

@ -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,

View File

@ -41,7 +41,7 @@
* 0xf0000000 - 0xfffffffff : Peripherals
*/
#define AT91RM92_BASE 0xf0000000
#define AT91RM92_BASE 0xd0000000
/* Usart */
#define AT91RM92_USART0_BASE 0xffc0000

View File

@ -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);
/*