Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/i386/mca/mca_machdep.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/i386/mca/mca_machdep.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.34.18.4 retrieving revision 1.35 diff -u -p -r1.34.18.4 -r1.35 --- src/sys/arch/i386/mca/mca_machdep.c 2010/08/11 22:52:13 1.34.18.4 +++ src/sys/arch/i386/mca/mca_machdep.c 2008/04/28 20:23:24 1.35 @@ -1,4 +1,4 @@ -/* $NetBSD: mca_machdep.c,v 1.34.18.4 2010/08/11 22:52:13 yamt Exp $ */ +/* $NetBSD: mca_machdep.c,v 1.35 2008/04/28 20:23:24 martin Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.34.18.4 2010/08/11 22:52:13 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.35 2008/04/28 20:23:24 martin Exp $"); #include #include @@ -78,7 +78,7 @@ struct bios_config { #define FEATURE_DMA3 0x80 /* DMA channel 3 used by hard disk BIOS */ uint8_t feature2; uint8_t pad[9]; -} __packed; +} __attribute__ ((packed)); /* * Used to encode DMA channel into ISA DMA cookie. We use upper 4 bits of @@ -129,8 +129,7 @@ int MCA_system = 0; /* Used to kick MCA DMA controller */ #define DMA_CMD 0x18 /* command the controller */ #define DMA_EXEC 0x1A /* tell controller how to do things */ -static bus_space_handle_t dmacmdh, dmaexech; -static bus_space_tag_t dmaiot; +static bus_space_handle_t dmaiot, dmacmdh, dmaexech; /* * MCA DMA controller commands. The exact sense of individual bits @@ -158,7 +157,7 @@ static bus_space_tag_t dmaiot; * Map the MCA DMA controller registers. */ void -mca_attach_hook(device_t parent, device_t self, +mca_attach_hook(struct device *parent, struct device *self, struct mcabus_attach_args *mba) { dmaiot = mba->mba_iot; @@ -308,7 +307,7 @@ mca_busprobe(void) paddr = (regs.ES << 4) + regs.BX; scp = (struct bios_config *)ISA_HOLE_VADDR(paddr); - snprintb(buf, sizeof(buf), + bitmask_snprintf((scp->feature2 << 8) | scp->feature1, "\20" "\01MCA+ISA" "\02MCA" @@ -325,7 +324,8 @@ mca_busprobe(void) "\015MMF" "\016GPDF" "\017KBDF" - "\020DMA32\n", (scp->feature2 << 8) | scp->feature1); + "\020DMA32\n", + buf, sizeof(buf)); aprint_verbose("BIOS CFG: Model-SubM-Rev: %02x-%02x-%02x, 0x%s\n", scp->model, scp->submodel, scp->bios_rev, buf);