diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-18 00:28:38 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-18 00:28:38 +0000 |
commit | 567b8d71a84ccbfec00fb59d52dfd6867296f64d (patch) | |
tree | dfcd7958d893ae00faf51af7d859bc02ab0528b1 /sys/arch/pmax/dev | |
parent | d414ee5831ad97169bd77cf57b15b084f79e46f2 (diff) |
new cpureg.h from NetBSD plus modifications to use the changed macro names
Diffstat (limited to 'sys/arch/pmax/dev')
-rw-r--r-- | sys/arch/pmax/dev/bt478.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/cfb.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/dc_ds.c | 6 | ||||
-rw-r--r-- | sys/arch/pmax/dev/dc_ioasic.c | 6 | ||||
-rw-r--r-- | sys/arch/pmax/dev/dtop.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/fb_usrreq.c | 4 | ||||
-rw-r--r-- | sys/arch/pmax/dev/mfb.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/pm_ds.c | 10 | ||||
-rw-r--r-- | sys/arch/pmax/dev/sfb.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/sii.c | 2 | ||||
-rw-r--r-- | sys/arch/pmax/dev/sii_ds.c | 12 | ||||
-rw-r--r-- | sys/arch/pmax/dev/xcfb.c | 4 |
12 files changed, 27 insertions, 27 deletions
diff --git a/sys/arch/pmax/dev/bt478.c b/sys/arch/pmax/dev/bt478.c index 738e8f92ba8..5c2cb0538c1 100644 --- a/sys/arch/pmax/dev/bt478.c +++ b/sys/arch/pmax/dev/bt478.c @@ -202,7 +202,7 @@ bt478InitColorMap (fi) register VDACRegs *vdac = (VDACRegs *)(fi -> fi_vdac); register int i; - *(volatile char *)MACH_PHYS_TO_UNCACHED + *(volatile char *)MIPS_PHYS_TO_KSEG1 (KN01_PHYS_COLMASK_START) = 0xff; /* XXX */ wbflush(); diff --git a/sys/arch/pmax/dev/cfb.c b/sys/arch/pmax/dev/cfb.c index 870075c9fbd..439d0a08568 100644 --- a/sys/arch/pmax/dev/cfb.c +++ b/sys/arch/pmax/dev/cfb.c @@ -313,7 +313,7 @@ cfbinit(fi, cfbaddr, unit, silent) * mapped into the user's address space uncached. */ fi->fi_fbu = (struct fbuaccess *) - MACH_PHYS_TO_UNCACHED(MACH_CACHED_TO_PHYS(&cfbu)); + MIPS_PHYS_TO_KSEG1(MIPS_KSEG0_TO_PHYS(&cfbu)); /* This is glass-tty state but it's in the shared structure. Ick. */ fi->fi_fbu->scrInfo.max_row = 56; diff --git a/sys/arch/pmax/dev/dc_ds.c b/sys/arch/pmax/dev/dc_ds.c index c316c83a42d..0e29bde4b1a 100644 --- a/sys/arch/pmax/dev/dc_ds.c +++ b/sys/arch/pmax/dev/dc_ds.c @@ -49,11 +49,11 @@ dc_ds_consinit(dev) #if defined(DEBUG) && 1 /* XXX untested */ printf("dc_ds(%d,%d): serial console at 0x%x\n", minor(dev) >> 2, minor(dev) & 03, - MACH_PHYS_TO_UNCACHED(KN01_SYS_DZ)); + MIPS_PHYS_TO_KSEG1(KN01_SYS_DZ)); #endif /* let any pending PROM output from boot drain */ DELAY(100000); - dc_consinit(dev, (void *)MACH_PHYS_TO_UNCACHED(KN01_SYS_DZ)); + dc_consinit(dev, (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_DZ)); return (1); } @@ -93,7 +93,7 @@ dc_ds_attach(parent, self, aux) dcaddr = (caddr_t)ca->ca_addr; - (void) dcattach(sc, (void*)MACH_PHYS_TO_UNCACHED(dcaddr), + (void) dcattach(sc, (void*)MIPS_PHYS_TO_KSEG1(dcaddr), /* dtr/dsr mask: comm port only */ 1 << DCCOMM_PORT, /* rts/cts mask: none */ diff --git a/sys/arch/pmax/dev/dc_ioasic.c b/sys/arch/pmax/dev/dc_ioasic.c index e1d2d38a0a4..583131ee7cd 100644 --- a/sys/arch/pmax/dev/dc_ioasic.c +++ b/sys/arch/pmax/dev/dc_ioasic.c @@ -49,10 +49,10 @@ dc_ioasic_consinit(dev) #if defined(DEBUG) && 0 printf("dc_ioasic(%d,%d): serial console at 0x%x\n", minor(dev) >> 2, minor(dev) & 03, - MACH_PHYS_TO_UNCACHED(KN02_SYS_DZ)); + MIPS_PHYS_TO_KSEG1(KN02_SYS_DZ)); DELAY(100000); #endif - dc_consinit(dev, (void *)MACH_PHYS_TO_UNCACHED(KN02_SYS_DZ)); + dc_consinit(dev, (void *)MIPS_PHYS_TO_KSEG1(KN02_SYS_DZ)); return(1); } @@ -92,7 +92,7 @@ dc_ioasic_attach(parent, self, aux) dcaddr = (caddr_t)d->iada_addr; printf(" address %p", dcaddr); - (void) dcattach(sc, (void*)MACH_PHYS_TO_UNCACHED(dcaddr), + (void) dcattach(sc, (void*)MIPS_PHYS_TO_KSEG1(dcaddr), /* dtr/dsr mask */ (1<< DCPRINTER_PORT) + (1 << DCCOMM_PORT), #ifdef HW_FLOW_CONTROL /* rts/cts mask */ (1<< DCPRINTER_PORT) + (1 << DCCOMM_PORT), diff --git a/sys/arch/pmax/dev/dtop.c b/sys/arch/pmax/dev/dtop.c index f402dabe87f..c9057fa1995 100644 --- a/sys/arch/pmax/dev/dtop.c +++ b/sys/arch/pmax/dev/dtop.c @@ -251,7 +251,7 @@ dtopattach(parent, self, aux) int i; - sc->poll = (poll_reg_t)MACH_PHYS_TO_UNCACHED(XINE_REG_INTR); + sc->poll = (poll_reg_t)MIPS_PHYS_TO_KSEG1(XINE_REG_INTR); sc->data = (data_reg_t)d->iada_addr; for (i = 0; i < DTOP_MAX_DEVICES; i++) diff --git a/sys/arch/pmax/dev/fb_usrreq.c b/sys/arch/pmax/dev/fb_usrreq.c index b183c32c742..f312dd66ae8 100644 --- a/sys/arch/pmax/dev/fb_usrreq.c +++ b/sys/arch/pmax/dev/fb_usrreq.c @@ -252,9 +252,9 @@ fbmmap(dev, off, prot) len = mips_round_page(((vm_offset_t)fi->fi_fbu & PGOFSET) + sizeof(*fi->fi_fbu)); if (off < len) - return (int)mips_btop(MACH_CACHED_TO_PHYS(fi->fi_fbu) + off); + return (int)mips_btop(MIPS_KSEG0_TO_PHYS(fi->fi_fbu) + off); off -= len; if (off >= fi->fi_type.fb_size) return (-1); - return (int)mips_btop(MACH_UNCACHED_TO_PHYS(fi->fi_pixels) + off); + return (int)mips_btop(MIPS_KSEG1_TO_PHYS(fi->fi_pixels) + off); } diff --git a/sys/arch/pmax/dev/mfb.c b/sys/arch/pmax/dev/mfb.c index ac6123a6f67..535be032dd9 100644 --- a/sys/arch/pmax/dev/mfb.c +++ b/sys/arch/pmax/dev/mfb.c @@ -336,7 +336,7 @@ mfbinit(fi, mfbaddr, unit, silent) * mapped into the user's address space uncached. */ fi->fi_fbu = (struct fbuaccess *) - MACH_PHYS_TO_UNCACHED(MACH_CACHED_TO_PHYS(&mfbu)); + MIPS_PHYS_TO_KSEG1(MIPS_KSEG0_TO_PHYS(&mfbu)); /* This is glass-tty state but it's in the shared structure. Ick. */ fi->fi_fbu->scrInfo.max_row = 67; diff --git a/sys/arch/pmax/dev/pm_ds.c b/sys/arch/pmax/dev/pm_ds.c index 8435563d59d..64144ed32d8 100644 --- a/sys/arch/pmax/dev/pm_ds.c +++ b/sys/arch/pmax/dev/pm_ds.c @@ -162,16 +162,16 @@ pminit(fi, unit, cold_console_flag) /* Set address of frame buffer... */ fi->fi_unit = unit; - fi->fi_pixels = (caddr_t)MACH_PHYS_TO_UNCACHED(KN01_PHYS_FBUF_START); - fi->fi_base = (caddr_t)MACH_PHYS_TO_UNCACHED(KN01_SYS_PCC); - fi->fi_vdac = (caddr_t)MACH_PHYS_TO_UNCACHED(KN01_SYS_VDAC); + fi->fi_pixels = (caddr_t)MIPS_PHYS_TO_KSEG1(KN01_PHYS_FBUF_START); + fi->fi_base = (caddr_t)MIPS_PHYS_TO_KSEG1(KN01_SYS_PCC); + fi->fi_vdac = (caddr_t)MIPS_PHYS_TO_KSEG1(KN01_SYS_VDAC); /* check for no frame buffer */ if (badaddr((char *)fi->fi_pixels, 4)) return (0); /* Fill in the stuff that differs from monochrome to color. */ - if (*(volatile u_short *)MACH_PHYS_TO_UNCACHED(KN01_SYS_CSR) & + if (*(volatile u_short *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CSR) & KN01_CSR_MONO) { fi->fi_type.fb_depth = 1; } @@ -188,7 +188,7 @@ pminit(fi, unit, cold_console_flag) * XXX can go away when MI support for d_mmap entrypoints added. */ fi->fi_fbu = (struct fbuaccess *) - MACH_PHYS_TO_UNCACHED(MACH_CACHED_TO_PHYS(&pmu)); + MIPS_PHYS_TO_KSEG1(MIPS_KSEG0_TO_PHYS(&pmu)); fi->fi_glasstty = &pmfb; diff --git a/sys/arch/pmax/dev/sfb.c b/sys/arch/pmax/dev/sfb.c index cfb003811df..ac77d9884de 100644 --- a/sys/arch/pmax/dev/sfb.c +++ b/sys/arch/pmax/dev/sfb.c @@ -291,7 +291,7 @@ sfbinit(fi, base, unit, silent) * mapped into the user's address space uncached. */ fi->fi_fbu = (struct fbuaccess *) - MACH_PHYS_TO_UNCACHED(MACH_CACHED_TO_PHYS(&sfbu)); + MIPS_PHYS_TO_KSEG1(MIPS_KSEG0_TO_PHYS(&sfbu)); /* This is glass-tty state but it's in the shared structure. Ick. */ fi->fi_fbu->scrInfo.max_row = 67; diff --git a/sys/arch/pmax/dev/sii.c b/sys/arch/pmax/dev/sii.c index b010abfccd4..37df3adda90 100644 --- a/sys/arch/pmax/dev/sii.c +++ b/sys/arch/pmax/dev/sii.c @@ -239,7 +239,7 @@ old_siiattach(parent, self, aux) register struct confargs *ca = aux; register struct siisoftc *sc = (struct siisoftc *) self; - sc->sc_regs = (SIIRegs *)MACH_PHYS_TO_UNCACHED(ca->ca_addr); + sc->sc_regs = (SIIRegs *)MIPS_PHYS_TO_KSEG1(ca->ca_addr); sc->sc_flags = sc->sc_dev.dv_cfdata->cf_flags; siiattach(sc); diff --git a/sys/arch/pmax/dev/sii_ds.c b/sys/arch/pmax/dev/sii_ds.c index 5d5789bd3c3..53601cda2ba 100644 --- a/sys/arch/pmax/dev/sii_ds.c +++ b/sys/arch/pmax/dev/sii_ds.c @@ -43,7 +43,7 @@ struct cfattach sii_ds_ca = { /* define a safe address in the SCSI buffer for doing status & message DMA */ -#define SII_BUF_ADDR (MACH_PHYS_TO_UNCACHED(KN01_SYS_SII_B_START) \ +#define SII_BUF_ADDR (MIPS_PHYS_TO_KSEG1(KN01_SYS_SII_B_START) \ + SII_MAX_DMA_XFER_LENGTH * 14) /* @@ -64,10 +64,10 @@ sii_ds_match(parent, match, aux) /* XXX check for bad address, untested */ siiaddr = (void *)ca->ca_addr; - if (siiaddr != (void *)MACH_PHYS_TO_UNCACHED(KN01_SYS_SII)) { + if (siiaddr != (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_SII)) { printf("(siimatch: bad addr %x, substituting %x\n", - ca->ca_addr, MACH_PHYS_TO_UNCACHED(KN01_SYS_SII)); - siiaddr = (void *)MACH_PHYS_TO_UNCACHED(KN01_SYS_SII); + ca->ca_addr, MIPS_PHYS_TO_KSEG1(KN01_SYS_SII)); + siiaddr = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_SII); } if (badaddr(siiaddr, 4)) return (0); @@ -83,10 +83,10 @@ sii_ds_attach(parent, self, aux) register struct confargs *ca = aux; register struct siisoftc *sc = (struct siisoftc *) self; - sc->sc_regs = (SIIRegs *)MACH_PHYS_TO_UNCACHED(ca->ca_addr); + sc->sc_regs = (SIIRegs *)MIPS_PHYS_TO_KSEG1(ca->ca_addr); /* set up scsi buffer. XXX Why statically allocated? */ - sc->sc_buf = (void*)(MACH_PHYS_TO_UNCACHED(KN01_SYS_SII_B_START)); + sc->sc_buf = (void*)(MIPS_PHYS_TO_KSEG1(KN01_SYS_SII_B_START)); siiattach(sc); diff --git a/sys/arch/pmax/dev/xcfb.c b/sys/arch/pmax/dev/xcfb.c index e51d8d9a1ae..34aba63174d 100644 --- a/sys/arch/pmax/dev/xcfb.c +++ b/sys/arch/pmax/dev/xcfb.c @@ -243,7 +243,7 @@ xcfbinit(fi, base, unit, silent) * runs faster in cached address space, but the X server is going * to blow away the data cache whenever it updates the screen, so.. */ - base = (char *) MACH_PHYS_TO_UNCACHED(XINE_PHYS_CFB_START); + base = (char *) MIPS_PHYS_TO_KSEG1(XINE_PHYS_CFB_START); /* Fill in main frame buffer info struct. */ fi->fi_unit = unit; @@ -272,7 +272,7 @@ xcfbinit(fi, base, unit, silent) * mapped into the user's address space uncached. */ fi->fi_fbu = (struct fbuaccess *) - MACH_PHYS_TO_UNCACHED(MACH_CACHED_TO_PHYS(&xcfbu)); + MIPS_PHYS_TO_KSEG1(MIPS_KSEG0_TO_PHYS(&xcfbu)); /* This is glass-tty state but it's in the shared structure. Ick. */ fi->fi_fbu->scrInfo.max_row = 50; |