diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/dev/phantomas.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/dev/uturn.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 6 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 10 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/mainbus.c | 12 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 9 | ||||
-rw-r--r-- | sys/arch/hppa/include/iomod.h | 53 | ||||
-rw-r--r-- | sys/arch/hppa/include/pdc.h | 53 | ||||
-rw-r--r-- | sys/arch/hppa/stand/boot/srt0.S | 7 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/itecons.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/pdc.c | 20 |
12 files changed, 111 insertions, 77 deletions
diff --git a/sys/arch/hppa/dev/phantomas.c b/sys/arch/hppa/dev/phantomas.c index 532e564c90d..9f32bf27595 100644 --- a/sys/arch/hppa/dev/phantomas.c +++ b/sys/arch/hppa/dev/phantomas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: phantomas.c,v 1.3 2004/09/15 20:11:28 mickey Exp $ */ +/* $OpenBSD: phantomas.c,v 1.4 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -72,6 +72,6 @@ phantomasattach(struct device *parent, struct device *self, void *aux) printf("\n"); nca = *ca; - nca.ca_hpamask = HPPA_IOSPACE; + nca.ca_hpamask = HPPA_IOBEGIN; pdc_scanbus(self, &nca, MAXMODBUS, 0); } diff --git a/sys/arch/hppa/dev/uturn.c b/sys/arch/hppa/dev/uturn.c index 9185181fb03..a64174973a3 100644 --- a/sys/arch/hppa/dev/uturn.c +++ b/sys/arch/hppa/dev/uturn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uturn.c,v 1.2 2004/09/26 21:54:00 mickey Exp $ */ +/* $OpenBSD: uturn.c,v 1.3 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -107,6 +107,6 @@ uturnattach(parent, self, aux) ((struct iomod *)ioh)->io_control = 0x80; nca = *ca; /* clone from us */ - nca.ca_hpamask = HPPA_IOSPACE; + nca.ca_hpamask = HPPA_IOBEGIN; pdc_scanbus(self, &nca, MAXMODBUS, 0); } diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 2a9b661ca49..e01d4f3ab13 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.147 2005/03/26 20:04:37 mickey Exp $ */ +/* $OpenBSD: locore.S,v 1.148 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -2020,9 +2020,9 @@ ENTRY(TLABEL(hpmc),0) ldw R%emrg_stack(arg1), arg1 /* never returns, but still */ - ldil L%GBCAST_ADDR, t1 + ldil L%HPPA_GBCAST, t1 ldi CMD_RESET, t2 - stw t2, R%GBCAST_ADDR(t1) + stw t2, R%HPPA_GBCAST(t1) hpmc_never_dies b hpmc_never_dies nop diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 6bbe931bb47..2c4cd72de6e 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.142 2005/03/26 20:04:37 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.143 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -339,7 +339,7 @@ hppa_init(start) cksum += *p; *p = cksum; - PAGE0->ivec_toc = (int (*)(void))hppa_toc; + PAGE0->ivec_toc = (u_int)hppa_toc; PAGE0->ivec_toclen = (hppa_toc_end - hppa_toc + 1) * 4; } @@ -351,7 +351,7 @@ hppa_init(start) cksum += *p; *p = cksum; - PAGE0->ivec_mempf = (int (*)(void))hppa_pfr; + PAGE0->ivec_mempf = (u_int)hppa_pfr; PAGE0->ivec_mempflen = (hppa_pfr_end - hppa_pfr + 1) * 4; } @@ -1008,14 +1008,14 @@ boot(howto) printf("System halted!\n"); DELAY(2000000); __asm __volatile("stwas %0, 0(%1)" - :: "r" (CMD_STOP), "r" (LBCAST_ADDR + iomod_command)); + :: "r" (CMD_STOP), "r" (HPPA_LBCAST + iomod_command)); } else { printf("rebooting..."); DELAY(2000000); __asm __volatile(".export hppa_reset, entry\n\t" ".label hppa_reset"); __asm __volatile("stwas %0, 0(%1)" - :: "r" (CMD_RESET), "r" (LBCAST_ADDR + iomod_command)); + :: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command)); } for(;;); /* loop while bus reset is comming up */ diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index 9f4408699cb..e5466c6b7c1 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.61 2004/11/09 19:17:01 claudio Exp $ */ +/* $OpenBSD: mainbus.c,v 1.62 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -1019,8 +1019,8 @@ mbattach(parent, self, aux) /* * Local-Broadcast the HPA to all modules on this bus */ - ((struct iomod *)LBCAST_ADDR)->io_flex = - (void *)((pdc_hpa.hpa & HPPA_FLEX_MASK) | DMA_ENABLE); + ((struct iomod *)HPPA_LBCAST)->io_flex = + (pdc_hpa.hpa & HPPA_FLEX_MASK) | DMA_ENABLE; sc->sc_hpa = pdc_hpa.hpa; @@ -1040,7 +1040,7 @@ mbattach(parent, self, aux) PDC_SOFT_POWER_INFO, &pdc_power_info, 0)) { nca.ca_iot = &hppa_bustag; nca.ca_hpa = pdc_power_info.addr; - nca.ca_hpamask = HPPA_IOSPACE; + nca.ca_hpamask = HPPA_IOBEGIN; } config_found(self, &nca, mbprint); #endif @@ -1048,7 +1048,7 @@ mbattach(parent, self, aux) bzero (&nca, sizeof(nca)); nca.ca_hpa = 0; nca.ca_irq = -1; - nca.ca_hpamask = HPPA_IOSPACE; + nca.ca_hpamask = HPPA_IOBEGIN; nca.ca_iot = &hppa_bustag; nca.ca_dmatag = &hppa_dmatag; nca.ca_dp.dp_bc[0] = nca.ca_dp.dp_bc[1] = nca.ca_dp.dp_bc[2] = @@ -1073,7 +1073,7 @@ mbattach(parent, self, aux) case HPPA_BOARD_HP780_C230: case HPPA_BOARD_HP780_C240: case HPPA_BOARD_HP785_C360: - pdc_scanbus(self, &nca, MAXMODBUS, FP_ADDR); + pdc_scanbus(self, &nca, MAXMODBUS, HPPA_FPA); break; default: pdc_scanbus(self, &nca, MAXMODBUS, 0); diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index 3c1085d511a..759f435e0d5 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.123 2005/03/15 05:09:23 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.124 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -1188,7 +1188,7 @@ pmap_kenter_pa(va, pa, prot) opte = pmap_pte_get(pde, va); pte = pa | PTE_PROT(TLB_WIRED | TLB_REFTRAP | pmap_prot(pmap_kernel(), prot)); - if (pa >= HPPA_IOSPACE) + if (pa >= HPPA_IOBEGIN) pte |= PTE_PROT(TLB_UNCACHABLE); pmap_pte_set(pde, va, pte); pmap_kernel()->pm_stats.wired_count++; diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 629f346bacb..37086f2b82f 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.44 2004/06/30 18:18:54 mickey Exp $ */ +/* $OpenBSD: cpu.h,v 1.45 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -105,10 +105,13 @@ extern int cpu_hvers; #define HPPA_PGAMASK 0xfff00000 #define HPPA_PGAOFF 0x000fffff -#define HPPA_IOSPACE 0xf0000000 -#define HPPA_IOBCAST 0xfffc0000 +#define HPPA_IOBEGIN 0xf0000000 +#define HPPA_IOLEN 0x10000000 #define HPPA_PDC_LOW 0xef000000 #define HPPA_PDC_HIGH 0xf1000000 +#define HPPA_IOBCAST 0xfffc0000 +#define HPPA_LBCAST 0xfffc0000 +#define HPPA_GBCAST 0xfffe0000 #define HPPA_FPA 0xfff80000 #define HPPA_FLEX_DATA 0xfff80001 #define HPPA_DMA_ENABLE 0x00000001 diff --git a/sys/arch/hppa/include/iomod.h b/sys/arch/hppa/include/iomod.h index ba5dfb38292..dac90d75ae5 100644 --- a/sys/arch/hppa/include/iomod.h +++ b/sys/arch/hppa/include/iomod.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iomod.h,v 1.16 2004/04/07 18:24:19 mickey Exp $ */ +/* $OpenBSD: iomod.h,v 1.17 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -99,25 +99,14 @@ * SPA space (see below) ranges from 0xF1000000 thru 0xFFFC0000. */ -#define HPPA_IOBEGIN 0xF0000000 -#define HPPA_IOLEN 0x10000000 -#define PDC_ADDR 0xEF000000 /* explained above */ -#define IO_ADDR 0xF1000000 -#define SGC_SLOT1 0xF4000000 /* (hp700) */ -#define SGC_SLOT2 0xF8000000 /* (hp700) */ -#define SGC_SIZE 0x02000000 /* (hp700) */ -#define FP_ADDR 0xFFF80000 -#define LBCAST_ADDR 0xFFFC0000 -#define GBCAST_ADDR 0xFFFE0000 - -#define PDC_LOW PDC_ADDR /* define some ranges */ -#define PDC_HIGH IO_ADDR -#define FPA_LOW FP_ADDR -#define FPA_HIGH LBCAST_ADDR -#define SPA_LOW IO_ADDR -#define SPA_HIGH LBCAST_ADDR -#define SGC_LOW SGC_SLOT1 -#define SGC_HIGH (SGC_SLOT2+SGC_SIZE) +#define PDC_LOW 0xEF000000 /* define some ranges */ +#define PDC_HIGH 0xF1000000 +#define FPA_LOW 0xFFF80000 +#define FPA_HIGH 0xFFFC0000 +#define SPA_LOW 0xF1000000 +#define SPA_HIGH 0xFFFC0000 +#define SGC_LOW 0xF4000000 +#define SGC_HIGH 0xFA000000 #define FPA_IOMOD ((FPA_HIGH-FPA_LOW)/sizeof(struct iomod)) #define MAXMODBUS ((int)(FPA_IOMOD)) /* maximum modules/bus */ @@ -147,10 +136,10 @@ struct pagezero { /* [0x000] Initialize Vectors */ int ivec_special; /* must be zero */ - int (*ivec_mempf)(void); /* powerfail recovery software */ - int (*ivec_toc)(void); /* exec'd after Transfer Of Control */ + u_int ivec_mempf; /* powerfail recovery software */ + u_int ivec_toc; /* exec'd after Transfer Of Control */ u_int ivec_toclen; /* bytes of ivec_toc code */ - int (*ivec_rendz)(void); /* exec'd after Rendezvous Signal */ + u_int ivec_rendz; /* exec'd after Rendezvous Signal */ u_int ivec_mempflen; /* bytes of ivec_mempf code */ u_int ivec_resv[2]; /* (reserved) */ u_int ivec_mbz; /* must be zero */ @@ -208,11 +197,11 @@ struct pagezero { struct boot_err mem_be[8]; /* boot errors (see above) */ u_int mem_free; /* first free phys. memory location */ u_int mem_hpa; /* HPA of CPU */ - int (*mem_pdc)(void); /* PDC entry point */ + u_int mem_pdc; /* PDC entry point */ u_int mem_10msec; /* # of Interval Timer ticks in 10msec*/ /* [0x390] Initial Memory Module */ - struct iomod *imm_hpa; /* HPA of Initial Memory module */ + u_int imm_hpa; /* HPA of Initial Memory module */ u_int imm_soft_boot; /* 0 == hard boot, 1 == soft boot */ u_int imm_spa_size; /* bytes of SPA in IMM */ u_int imm_max_mem; /* bytes of mem in IMM (<= spa_size) */ @@ -321,12 +310,12 @@ struct iomod { 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) */ - caddr_t io_dma_link; /* pointer to "next quad" in DMA chain */ + 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" */ - caddr_t io_dma_address; /* (RO) start of DMA */ + u_int io_dma_address; /* (RO) start of DMA */ u_int io_dma_count; /* (RO) number of bytes remaining to xfer */ - caddr_t io_flex; /* (WO) HPA flex addr, LSB: bus master flag */ - caddr_t io_spa; /* (WO) SPA space; 0-20:addr, 24-31:iodc_spa */ + u_int io_flex; /* (WO) HPA flex addr, LSB: bus master flag */ + u_int io_spa; /* (WO) SPA space; 0-20:addr, 24-31:iodc_spa */ u_int resv1[2]; /* (reserved) */ u_int io_command; /* (WO) module commands (see below) */ u_int io_status; /* (RO) error returns (see below) */ @@ -334,13 +323,13 @@ struct iomod { u_int io_test; /* (RO) self-test information */ /* ARS (Auxiliary Register Set) */ u_int io_err_sadd; /* (RO) slave bus error or memory error addr */ - caddr_t chain_addr; /* start address of chain RAM */ + u_int chain_addr; /* start address of chain RAM */ u_int sub_mask_clr; /* ignore intrpts on sub-channel (bitmask) */ u_int sub_mask_set; /* service intrpts on sub-channel (bitmask) */ u_int diagnostic; /* diagnostic use (reserved) */ u_int resv2[2]; /* (reserved) */ - caddr_t nmi_address; /* address to send data to when NMI detected */ - caddr_t nmi_data; /* NMI data to be sent */ + u_int nmi_address; /* address to send data to when NMI detected */ + u_int nmi_data; /* NMI data to be sent */ u_int resv3[3]; /* (reserved) */ u_int io_mem_low; /* bottom of memory address range */ u_int io_mem_high; /* top of memory address range */ diff --git a/sys/arch/hppa/include/pdc.h b/sys/arch/hppa/include/pdc.h index 4edb4cedc5d..e0ba0f7862b 100644 --- a/sys/arch/hppa/include/pdc.h +++ b/sys/arch/hppa/include/pdc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.h,v 1.30 2004/10/26 21:27:08 mickey Exp $ */ +/* $OpenBSD: pdc.h,v 1.31 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1990 mt Xinu, Inc. All rights reserved. @@ -238,10 +238,33 @@ #define PDC_SOFT_POWER_INFO 0 /* get info about soft power switch */ #define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */ +#define PDC_PAT_CELL 64 /* cell operations */ +#define PDC_PAT_CELL_GETID 0 /* get cell id number */ +#define PDC_PAT_CELL_GETINFO 1 /* get cell info */ +#define PDC_PAT_CELL_MODULE 2 /* get module info */ +#define PDC_PAT_IOVIEW 0 +#define PDC_PAT_PAVIEW 1 + +#define PDC_PAT_CHASSIS 65 /* chassis log ops */ +#define PDC_PAT_CHASSIS_WRITE 0 +#define PDC_PAT_CHASSIS_READ 1 + +#define PDC_PAT_CPU 67 + +#define PDC_PAT_EVENT 68 + +#define PDC_PAT_HPMC 70 + #define PDC_PAT_IO 71 /* online services for IO modules */ #define PDC_PAT_IO_GET_PCI_RTSZ 15 #define PDC_PAT_IO_GET_PCI_RT 16 +#define PDC_PAT_MEM 72 + +#define PDC_PAT_NVRAM 73 + +#define PDC_PAT_PROTDOM 74 + #define PDC_MEMMAP 128 /* hp700: return page information */ #define PDC_MEMMAP_HPA 0 /* map module # to HPA */ @@ -272,7 +295,7 @@ struct iomod; typedef int (*pdcio_t)(int, int, ...); -typedef int (*iodcio_t)(struct iomod *, int, ...); +typedef int (*iodcio_t)(u_int, int, ...); /* * Commonly used PDC calls and the structures they return. @@ -409,7 +432,7 @@ struct pdc_coherence { /* PDC_CACHE, PDC_CACHE_SETCS */ }; struct pdc_hpa { /* PDC_HPA */ - hppa_hpa_t hpa; /* HPA of processor */ + u_int hpa; /* HPA of processor */ int filler1; u_int filler2[30]; }; @@ -514,6 +537,24 @@ struct pdc_sysmap_hpa { /* PDC_SYSMAP_HPA */ u_int filler[28]; }; +struct pdc_pat_cell_id { /* PDC_PAT_CELL_GETID */ + u_long id; /* cell id */ + u_long loc; /* cell location */ + u_long filler[14]; +}; + +struct pdc_pat_cell_module { /* PDC_PAT_CELL_MODULE */ + u_long chpa; /* config space HPA */ + u_long info; /* module info */ +#define PDC_PAT_CELL_MODTYPE(t) (((t) >> 56) & 0xff) +#define PDC_PAT_CELL_MODDVI(t) (((t) >> 48) & 0xff) +#define PDC_PAT_CELL_MODIOC(t) (((t) >> 40) & 0xff) +#define PDC_PAT_CELL_MODSIZE(t) (((t) & 0xffffff) << PAGE_SHIFT) + u_long loc; /* module location */ + struct device_path dp; /* module path */ + u_long pad[508]; /* cell module gedoens */ +}; + struct pdc_pat_io_num { /* PDC_PAT_IO */ u_int num; u_int filler[31]; @@ -633,9 +674,9 @@ struct pz_device { #define pz_bc pz_dp.dp_bc #define pz_mod pz_dp.dp_mod #define pz_layers pz_dp.dp_layers - struct iomod *pz_hpa; /* HPA base address of device */ - caddr_t pz_spa; /* SPA base address (zero if no SPA exists) */ - iodcio_t pz_iodc_io; /* entry point of device's driver routines */ + u_int pz_hpa; /* HPA base address of device */ + u_int pz_spa; /* SPA base address (zero if no SPA exists) */ + u_int pz_iodc_io; /* entry point of device's driver routines */ short pz_resv; /* (reserved) */ u_short pz_class; /* (see below) */ } pz_device_t; diff --git a/sys/arch/hppa/stand/boot/srt0.S b/sys/arch/hppa/stand/boot/srt0.S index 11073d524d7..9244481c72e 100644 --- a/sys/arch/hppa/stand/boot/srt0.S +++ b/sys/arch/hppa/stand/boot/srt0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: srt0.S,v 1.9 2004/04/07 18:24:20 mickey Exp $ */ +/* $OpenBSD: srt0.S,v 1.10 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -60,8 +60,9 @@ ; #define _LOCORE -#include <machine/iomod.h> #include <machine/asm.h> +#include <machine/cpu.h> +#include <machine/iomod.h> /* * This is the ending of the begin @@ -145,7 +146,7 @@ start * rtt - restart the box */ LEAF_ENTRY(_rtt) - ldil L%LBCAST_ADDR, %r25 + ldil L%HPPA_LBCAST, %r25 ldi CMD_RESET, %r26 stw %r26,R%iomod_command(%r25) forever ; Loop until bus reset takes effect. diff --git a/sys/arch/hppa/stand/libsa/itecons.c b/sys/arch/hppa/stand/libsa/itecons.c index 9e7514e41dc..5bee2a704a2 100644 --- a/sys/arch/hppa/stand/libsa/itecons.c +++ b/sys/arch/hppa/stand/libsa/itecons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: itecons.c,v 1.8 2004/04/07 18:24:20 mickey Exp $ */ +/* $OpenBSD: itecons.c,v 1.9 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -133,8 +133,8 @@ ite_init(cn) sizeof(struct pz_device)); } - cons_pzdev->pz_iodc_io = cniodc; - kbd_pzdev->pz_iodc_io = kyiodc; + cons_pzdev->pz_iodc_io = (u_int)cniodc; + kbd_pzdev->pz_iodc_io = (u_int)kyiodc; #ifdef DEBUG if (!kyiodc) printf("ite_init: no kbd\n"); diff --git a/sys/arch/hppa/stand/libsa/pdc.c b/sys/arch/hppa/stand/libsa/pdc.c index 172a7388d02..7c4b51123aa 100644 --- a/sys/arch/hppa/stand/libsa/pdc.c +++ b/sys/arch/hppa/stand/libsa/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.18 2004/04/07 18:24:20 mickey Exp $ */ +/* $OpenBSD: pdc.c,v 1.19 2005/04/07 00:21:51 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -155,7 +155,7 @@ iodcstrategy(devdata, rw, blk, size, buf, rsize) if (debug) printf("iodc: rewind "); #endif - if ((ret = (pzdev->pz_iodc_io)(pzdev->pz_hpa, + if ((ret = ((iodcio_t)pzdev->pz_iodc_io)(pzdev->pz_hpa, IODC_IO_READ, pzdev->pz_spa, pzdev->pz_layers, pdcbuf, 0, dp->buf, 0, 0)) < 0) { #ifdef DEBUG @@ -177,7 +177,7 @@ iodcstrategy(devdata, rw, blk, size, buf, rsize) dp->last_read = ret) { twiddle(); dp->last_blk += dp->last_read; - if ((ret = (pzdev->pz_iodc_io)(pzdev->pz_hpa, + if ((ret = ((iodcio_t)pzdev->pz_iodc_io)(pzdev->pz_hpa, IODC_IO_READ, pzdev->pz_spa, pzdev->pz_layers, pdcbuf, dp->last_blk, dp->buf, IODC_IOSIZ, IODC_IOSIZ)) < 0) { @@ -222,7 +222,7 @@ iodcstrategy(devdata, rw, blk, size, buf, rsize) */ for (; size; size -= ret, buf += ret, blk += ret, xfer += ret) { offset = blk & IOPGOFSET; - if ((ret = (pzdev->pz_iodc_io)(pzdev->pz_hpa, + if ((ret = ((iodcio_t)pzdev->pz_iodc_io)(pzdev->pz_hpa, (rw == F_READ? IODC_IO_READ: IODC_IO_WRITE), pzdev->pz_spa, pzdev->pz_layers, pdcbuf, blk - offset, dp->buf, IODC_IOSIZ, IODC_IOSIZ)) < 0) { @@ -279,7 +279,7 @@ pdc_findev(unit, class) printf("pdc_finddev(%d, %x)\n", unit, class); #endif iodc = (iodcio_t)(PAGE0->mem_free + IODC_MAXSIZE); - io = PAGE0->mem_boot.pz_hpa; + io = (struct iomod *)PAGE0->mem_boot.pz_hpa; /* quick hack for boot device */ if (PAGE0->mem_boot.pz_class == class && @@ -337,8 +337,8 @@ pdc_findev(unit, class) stp = IODC_INIT_FIRST; do { - if ((err = (iodc)(io, stp, io->io_spa, layers, - pdcbuf, 0, 0, 0, 0)) < 0) { + if ((err = (iodc)((u_int)io, stp, io->io_spa, + layers, pdcbuf, 0, 0, 0, 0)) < 0) { #ifdef DEBUG if (debug && err != PDC_ERR_EOD) printf("IODC_INIT_%s: %d\n", @@ -368,7 +368,7 @@ pdc_findev(unit, class) if (err >= 0) { /* init device */ - if (0 && (err = (iodc)(io, IODC_INIT_DEV, io->io_spa, + if (0 && (err = (iodc)((u_int)io, IODC_INIT_DEV, io->io_spa, layers, pdcbuf, 0, 0, 0, 0)) < 0) { #ifdef DEBUG if (debug) @@ -389,9 +389,9 @@ pdc_findev(unit, class) pz.pz_flags = 0; bcopy(layers, pz.pz_layers, sizeof(pz.pz_layers)); - pz.pz_hpa = io; + pz.pz_hpa = (u_int)io; /* XXX pz.pz_spa = io->io_spa; */ - pz.pz_iodc_io = iodc; + pz.pz_iodc_io = (u_int)iodc; pz.pz_class = class; return &pz; |