Module Name: src Committed By: skrll Date: Thu May 21 20:59:11 UTC 2009
Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Add mjf's d390 to the list of machines that need help finding devices. hmm. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/hp700/hp700/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.49 src/sys/arch/hp700/hp700/mainbus.c:1.50 --- src/sys/arch/hp700/hp700/mainbus.c:1.49 Fri May 8 09:33:58 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Thu May 21 20:59:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.49 2009/05/08 09:33:58 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.50 2009/05/21 20:59:11 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.49 2009/05/08 09:33:58 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.50 2009/05/21 20:59:11 skrll Exp $"); #include "locators.h" #include "power.h" @@ -195,6 +195,7 @@ */ *bshp = bpa; +printf("%s: bpa 0x%016llx size 0x%016llx\n", __func__, (unsigned long long)bpa, (unsigned long long)size); /* * Loop while there is space left to map. */ @@ -229,7 +230,7 @@ /* * Enter another single-page mapping. */ - pmap_kenter_pa(bpa, bpa, VM_PROT_READ | VM_PROT_WRITE); + pmap_kenter_pa(bpa, bpa, VM_PROT_READ | VM_PROT_WRITE | PMAP_NC); bpa += PAGE_SIZE; frames--; } @@ -1497,6 +1498,20 @@ bus_space_handle_t ioh; hppa_hpa_t hpabase; + struct iomod_openbsd { +/* SRS (Supervisor Register Set) */ + u_int io_eir; /* (WO) interrupt CPU; set bits in EIR CR */ + u_int io_eim; /* (WO) External Interrupt Message address */ + u_int io_dc_rw; /* write address of IODC to read IODC data */ + u_int io_ii_rw; /* read/clear external intrpt msg (bit-26) */ + u_int io_dma_link; /* pointer to "next quad" in DMA chain */ + u_int io_dma_command; /* (RO) chain command to exec on "next quad" */ + u_int io_dma_address; /* (RO) start of DMA */ + u_int io_dma_count; /* (RO) number of bytes remaining to xfer */ + u_int io_flex; /* (WO) HPA flex addr, LSB: bus master flag */ + } *fred; + + sc->sc_dv = self; mb_attached = 1; @@ -1521,8 +1536,19 @@ /* * Local-Broadcast the HPA to all modules on the bus */ +#if 0 + fred = (struct iomod_openbsd *)HPPA_LBCAST; + + fred->io_flex = + (pdc_hpa.hpa & FLEX_MASK) | DMA_ENABLE; +#else + fred = (struct iomod_openbsd *)HPPA_LBCAST; + printf("fred->io_flex %p\n", &fred->io_flex); ((struct iomod *)(pdc_hpa.hpa & FLEX_MASK))[FPA_IOMOD].io_flex = (void *)((pdc_hpa.hpa & FLEX_MASK) | DMA_ENABLE); +#endif + + sc->sc_hpa = pdc_hpa.hpa; aprint_normal(" [flex %lx]\n", pdc_hpa.hpa & FLEX_MASK); @@ -1568,6 +1594,7 @@ case HPPA_BOARD_HP785_C360: case HPPA_BOARD_HP800D: + case HPPA_BOARD_HP821: hpabase = HPPA_FPA; break; default: