Use aprint_*().

This commit is contained in:
thorpej 2006-02-19 14:59:22 +00:00
parent 1f082bb8d2
commit a9beff9534
30 changed files with 337 additions and 275 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: npx_acpi.c,v 1.10 2005/12/11 12:17:40 christos Exp $ */
/* $NetBSD: npx_acpi.c,v 1.11 2006/02/19 14:59:22 thorpej Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: npx_acpi.c,v 1.10 2005/12/11 12:17:40 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: npx_acpi.c,v 1.11 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -88,7 +88,8 @@ npx_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_irq *irq;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -99,7 +100,7 @@ npx_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -107,7 +108,7 @@ npx_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -115,7 +116,7 @@ npx_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}
@ -129,10 +130,10 @@ npx_acpi_attach(struct device *parent, struct device *self, void *aux)
IPL_NONE, (int (*)(void *))npxintr, NULL);
break;
case NPX_EXCEPTION:
printf("%s: using exception 16\n", sc->sc_dev.dv_xname);
aprint_verbose("%s: using exception 16\n", sc->sc_dev.dv_xname);
break;
case NPX_BROKEN:
printf("%s: error reporting broken; not using\n",
aprint_error("%s: error reporting broken; not using\n",
sc->sc_dev.dv_xname);
sc->sc_type = NPX_NONE;
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sony_acpi.c,v 1.2 2005/12/13 16:54:21 christos Exp $ */
/* $NetBSD: sony_acpi.c,v 1.3 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sony_acpi.c,v 1.2 2005/12/13 16:54:21 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sony_acpi.c,v 1.3 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -216,7 +216,8 @@ sony_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_attach_args *aa = aux;
ACPI_STATUS rv;
printf(": Sony Miscellaneous Controller\n");
aprint_naive(": Sony Miscellaneous Controller\n");
aprint_normal(": Sony Miscellaneous Controller\n");
sc->sc_node = aa->aa_node;
@ -225,7 +226,7 @@ sony_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_node->ad_handle, 1, sony_walk_cb, sc, NULL);
#ifdef DIAGNOSTIC
if (ACPI_FAILURE(rv))
printf("%s: Cannot walk ACPI namespace (%d)\n",
aprint_error("%s: Cannot walk ACPI namespace (%d)\n",
sc->sc_dev.dv_xname, rv);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: spic_acpi.c,v 1.13 2005/12/11 12:17:40 christos Exp $ */
/* $NetBSD: spic_acpi.c,v 1.14 2006/02/19 14:59:22 thorpej Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: spic_acpi.c,v 1.13 2005/12/11 12:17:40 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: spic_acpi.c,v 1.14 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -95,7 +95,8 @@ spic_acpi_attach(struct device *parent, struct device *self, void *aux)
ACPI_STATUS rv;
printf(": Sony Programmable I/O Controller\n");
aprint_naive(": Sony Programmable I/O Controller\n");
aprint_normal(": Sony Programmable I/O Controller\n");
sc->sc_node = aa->aa_node;
@ -108,19 +109,19 @@ spic_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_spic.sc_iot = aa->aa_iot;
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find io resource\n",
aprint_error("%s: unable to find io resource\n",
sc->sc_spic.sc_dev.dv_xname);
goto out;
}
if (bus_space_map(sc->sc_spic.sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_spic.sc_ioh) != 0) {
printf("%s: unable to map data register\n",
aprint_error("%s: unable to map data register\n",
sc->sc_spic.sc_dev.dv_xname);
goto out;
}
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_spic.sc_dev.dv_xname);
/* XXX unmap */
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vald_acpi.c,v 1.21 2005/12/11 12:17:40 christos Exp $ */
/* $NetBSD: vald_acpi.c,v 1.22 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.21 2005/12/11 12:17:40 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.22 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -194,7 +194,8 @@ vald_acpi_attach(struct device *parent, struct device *self, void *aux)
ACPI_STATUS rv;
UINT32 value, result;
printf(": Toshiba VALD\n");
aprint_naive(": Toshiba VALD\n");
aprint_normal(": Toshiba VALD\n");
sc->sc_node = aa->aa_node;
@ -202,20 +203,22 @@ vald_acpi_attach(struct device *parent, struct device *self, void *aux)
rv = acpi_eval_integer(ACPI_ROOT_OBJECT, "\\_SB_.ADP1._PSR",
&sc->sc_ac_status);
if (ACPI_FAILURE(rv))
printf("%s: Unable to evaluate _PSR: %s\n",
aprint_error("%s: Unable to evaluate _PSR: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
else
printf("AC adaptor status %sconnected\n",
aprint_verbose("%s: AC adaptor %sconnected\n",
sc->sc_dev.dv_xname,
(sc->sc_ac_status == 0 ? "not ": ""));
/* Get LCD backlight status. */
rv = vald_acpi_ghci_get(sc, GHCI_BACKLIGHT, &value, &result);
if (ACPI_SUCCESS(rv)) {
if (result != 0)
printf("%s: can't get backlight status error=%d\n",
aprint_error("%s: can't get backlight status error=%d\n",
sc->sc_dev.dv_xname, result);
else
printf("LCD backlight status %s\n",
aprint_verbose("%s: LCD backlight %s\n",
sc->sc_dev.dv_xname,
((value == GHCI_ON) ? "on" : "off"));
}
@ -223,12 +226,12 @@ vald_acpi_attach(struct device *parent, struct device *self, void *aux)
rv = vald_acpi_ghci_set(sc, GHCI_SYSTEM_EVENT_FIFO, GHCI_ENABLE,
&result);
if (ACPI_SUCCESS(rv) && result != 0)
printf("%s: can't enable SystemEventFIFO error=%d\n",
aprint_error("%s: can't enable SystemEventFIFO error=%d\n",
sc->sc_dev.dv_xname, result);
rv = vald_acpi_ghci_set(sc, GHCI_HOTKEY_EVENT, GHCI_ENABLE, &result);
if (ACPI_SUCCESS(rv) && result != 0)
printf("%s: can't enable HotkeyEvent error=%d\n",
aprint_error("%s: can't enable HotkeyEvent error=%d\n",
sc->sc_dev.dv_xname, result);
/* Check SystemFIFO events. */
@ -245,7 +248,7 @@ vald_acpi_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, vald_acpi_notify_handler, sc);
if (ACPI_FAILURE(rv))
printf("%s: can't install DEVICE NOTIFY handler: %s\n",
aprint_error("%s: can't install DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
}

View File

@ -1,7 +1,7 @@
/* $NetBSD: vesa_text.c,v 1.6 2005/12/11 12:17:40 christos Exp $ */
/* $NetBSD: vesa_text.c,v 1.7 2006/02/19 14:59:22 thorpej Exp $ */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vesa_text.c,v 1.6 2005/12/11 12:17:40 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: vesa_text.c,v 1.7 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -49,11 +49,12 @@ vesatext_attach(parent, dev, aux)
struct vesabiosdev_attach_args *vaa = aux;
int i;
aprint_naive("\n");
aprint_normal(": VESA text device\n");
sc->sc_modes = malloc(vaa->vbaa_nmodes * sizeof(int),
M_DEVBUF, M_NOWAIT);
sc->sc_nmodes = vaa->vbaa_nmodes;
for (i = 0; i < vaa->vbaa_nmodes; i++)
sc->sc_modes[i] = vaa->vbaa_modes[i];
printf("\n");
}

View File

@ -1,7 +1,7 @@
/* $NetBSD: vesabios.c,v 1.14 2006/02/18 19:07:11 jmcneill Exp $ */
/* $NetBSD: vesabios.c,v 1.15 2006/02/19 14:59:22 thorpej Exp $ */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vesabios.c,v 1.14 2006/02/18 19:07:11 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: vesabios.c,v 1.15 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -36,9 +36,7 @@ static int vesabios_print(void *, const char *);
static int vbegetinfo(struct vbeinfoblock **);
static void vbefreeinfo(struct vbeinfoblock *);
#ifdef VESABIOSVERBOSE
static const char *mm2txt(unsigned int);
#endif
CFATTACH_DECL(vesabios, sizeof(struct device),
vesabios_match, vesabios_attach, NULL, NULL);
@ -114,7 +112,6 @@ vbeprobe()
return (1);
}
#ifdef VESABIOSVERBOSE
static const char *
mm2txt(mm)
unsigned int mm;
@ -136,7 +133,6 @@ mm2txt(mm)
snprintf(buf, sizeof(buf), "unknown memory model %d", mm);
return (buf);
}
#endif
static void
vesabios_attach(parent, dev, aux)
@ -157,24 +153,28 @@ vesabios_attach(parent, dev, aux)
struct modeinfoblock *mi;
struct vesabiosdev_attach_args vbaa;
if (vbegetinfo(&vi))
if (vbegetinfo(&vi)) {
printf("\n");
panic("vesabios_attach: disappeared");
}
aprint_naive("\n");
aprint_normal(": version %d.%d",
vi->VbeVersion >> 8, vi->VbeVersion & 0xff);
printf(": version %d.%d", vi->VbeVersion >> 8, vi->VbeVersion & 0xff);
res = kvm86_bios_read(FAR2FLATPTR(vi->OemVendorNamePtr),
name, sizeof(name));
if (res > 0) {
name[res - 1] = 0;
printf(", %s", name);
aprint_normal(", %s", name);
res = kvm86_bios_read(FAR2FLATPTR(vi->OemProductNamePtr),
name, sizeof(name));
if (res > 0) {
name[res - 1] = 0;
printf(" %s", name);
aprint_normal(" %s", name);
}
}
printf("\n");
aprint_normal("\n");
nmodes = 0;
modeptr = FAR2FLATPTR(vi->VideoModePtr);
@ -194,7 +194,8 @@ vesabios_attach(parent, dev, aux)
buf = kvm86_bios_addpage(0x2000);
if (!buf) {
printf("vesabios_attach: kvm86_bios_addpage(0x2000) failed\n");
aprint_error("%s: kvm86_bios_addpage(0x2000) failed\n",
dev->dv_xname);
return;
}
for (i = 0; i < nmodes; i++) {
@ -207,38 +208,32 @@ vesabios_attach(parent, dev, aux)
res = kvm86_bioscall(0x10, &tf);
if (res || tf.tf_eax != 0x004f) {
printf("vbecall: res=%d, ax=%x\n", res, tf.tf_eax);
printf("error getting info for mode %04x\n", modes[i]);
aprint_error("%s: vbecall: res=%d, ax=%x\n",
dev->dv_xname, res, tf.tf_eax);
aprint_error("%s: error getting info for mode %04x\n",
dev->dv_xname, modes[i]);
continue;
}
mi = (struct modeinfoblock *)buf;
#ifdef VESABIOSVERBOSE
printf("VESA mode %04x: attributes %04x",
modes[i], mi->ModeAttributes);
#endif
aprint_verbose("%s: VESA mode %04x: attributes %04x",
sc->sc_dev.dv_xname, modes[i], mi->ModeAttributes);
if (!(mi->ModeAttributes & 1)) {
#ifdef VESABIOSVERBOSE
printf("\n");
#endif
aprint_verbose("\n");
continue;
}
if (mi->ModeAttributes & 0x10) {
/* graphics */
#ifdef VESABIOSVERBOSE
printf(", %dx%d %dbbp %s\n",
aprint_verbose(", %dx%d %dbbp %s\n",
mi->XResolution, mi->YResolution,
mi->BitsPerPixel, mm2txt(mi->MemoryModel));
#endif
if (mi->ModeAttributes & 0x80) {
/* flat buffer */
rastermodes[nrastermodes++] = modes[i];
}
} else {
/* text */
#ifdef VESABIOSVERBOSE
printf(", text %dx%d\n",
aprint_verbose(", text %dx%d\n",
mi->XResolution, mi->YResolution);
#endif
if (!(mi->ModeAttributes & 0x20)) /* VGA compatible */
textmodes[ntextmodes++] = modes[i];
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vesafb.c,v 1.3 2006/02/19 03:04:37 jmcneill Exp $ */
/* $NetBSD: vesafb.c,v 1.4 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 2006 Jared D. McNeill <jmcneill@invisible.ca>
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vesafb.c,v 1.3 2006/02/19 03:04:37 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: vesafb.c,v 1.4 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -204,9 +204,13 @@ vesafb_attach(parent, dev, aux)
struct wsemuldisplaydev_attach_args aa;
bus_space_handle_t h;
aprint_naive("\n");
aprint_normal(": VESA frame buffer\n");
buf = kvm86_bios_addpage(0x2000);
if (!buf) {
aprint_error("vesafb_attach: kvm86_bios_addpage(0x2000) failed\n");
aprint_error("%s: kvm86_bios_addpage(0x2000) failed\n",
sc->sc_dev.dv_xname);
return;
}
sc->sc_buf = buf;
@ -231,7 +235,8 @@ vesafb_attach(parent, dev, aux)
res = kvm86_bioscall(0x10, &tf);
if (res || tf.tf_eax != 0x004f) {
aprint_error("vbecall: res=%d, ax=%x\n", res, tf.tf_eax);
aprint_error("%s: vbecall: res=%d, ax=%x\n",
sc->sc_dev.dv_xname, res, tf.tf_eax);
goto out;
}
mi = (struct modeinfoblock *)buf;
@ -245,7 +250,8 @@ vesafb_attach(parent, dev, aux)
}
if (i == vaa->vbaa_nmodes) {
aprint_error("%s: no supported mode found\n", sc->sc_dev.dv_xname);
aprint_error("%s: no supported mode found\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -270,7 +276,8 @@ vesafb_attach(parent, dev, aux)
&vesafb_accessops);
sc->sc_vd.init_screen = vesafb_init_screen;
aprint_normal(": fb %dx%dx%d @0x%x%s\n", mi->XResolution, mi->YResolution,
aprint_normal("%s: fb %dx%dx%d @0x%x%s\n", sc->sc_dev.dv_xname,
mi->XResolution, mi->YResolution,
mi->BitsPerPixel, mi->PhysBasePtr,
(sc->sc_pm == 1 ? " (VBE/PM)" : ""));
@ -278,7 +285,8 @@ vesafb_attach(parent, dev, aux)
mi->YResolution * mi->BytesPerScanLine,
BUS_SPACE_MAP_LINEAR, &h);
if (res) {
aprint_error("framebuffer mapping failed\n");
aprint_error("%s: framebuffer mapping failed\n",
sc->sc_dev.dv_xname);
goto out;
}
sc->sc_bits = bus_space_vaddr(X86_BUS_SPACE_MEM, h);
@ -507,7 +515,8 @@ vesafb_init(struct vesafb_softc *sc)
res = kvm86_bioscall(0x10, &tf);
if (res || (tf.tf_eax & 0xffff) != 0x004f) {
aprint_error("vbecall: res=%d, ax=%x\n", res, tf.tf_eax);
aprint_error("%s: vbecall: res=%d, ax=%x\n",
sc->sc_dev.dv_xname, res, tf.tf_eax);
return;
}
@ -519,7 +528,8 @@ vesafb_init(struct vesafb_softc *sc)
res = kvm86_bioscall(0x10, &tf);
if (res || (tf.tf_eax & 0xffff) != 0x004f) {
aprint_error("vbecall: res=%d, ax=%x\n", res, tf.tf_eax);
aprint_error("%s: vbecall: res=%d, ax=%x\n",
sc->sc_dev.dv_xname, res, tf.tf_eax);
return;
}
@ -603,7 +613,8 @@ vesafb_set_palette(struct vesafb_softc *sc, int reg,
res = kvm86_bioscall(0x10, &tf);
if (res || (tf.tf_eax & 0xffff) != 0x004f)
aprint_error("vbecall: res=%d, ax=%x\n", res, tf.tf_eax);
aprint_error("%s: vbecall: res=%d, ax=%x\n",
sc->sc_dev.dv_xname, res, tf.tf_eax);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: eisa_machdep.c,v 1.25 2005/12/11 12:17:41 christos Exp $ */
/* $NetBSD: eisa_machdep.c,v 1.26 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.25 2005/12/11 12:17:41 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.26 2006/02/19 14:59:22 thorpej Exp $");
#include "ioapic.h"
@ -149,26 +149,24 @@ int
eisa_intr_map(eisa_chipset_tag_t ec, u_int irq, eisa_intr_handle_t *ihp)
{
if (irq >= NUM_LEGACY_IRQS) {
printf("eisa_intr_map: bad IRQ %d\n", irq);
aprint_error("eisa_intr_map: bad IRQ %d\n", irq);
*ihp = -1;
return 1;
}
if (irq == 2) {
printf("eisa_intr_map: changed IRQ 2 to IRQ 9\n");
aprint_verbose("eisa_intr_map: changed IRQ 2 to IRQ 9\n");
irq = 9;
}
#if NIOAPIC > 0
if (mp_busses != NULL) {
if (intr_find_mpmapping(mp_eisa_bus, irq, ihp) == 0 ||
intr_find_mpmapping(mp_isa_bus, irq, ihp) == 0) {
*ihp |= irq;
return 0;
} else
printf("eisa_intr_map: no MP mapping found\n");
aprint_verbose("eisa_intr_map: no MP mapping found\n");
}
printf("eisa_intr_map: no MP mapping found\n");
#endif
*ihp = irq;
@ -220,7 +218,7 @@ eisa_intr_establish(eisa_chipset_tag_t ec, eisa_intr_handle_t ih,
if (ih & APIC_INT_VIA_APIC) {
pic = (struct pic *)ioapic_find(APIC_IRQ_APIC(ih));
if (pic == NULL) {
printf("eisa_intr_establish: bad ioapic %d\n",
aprint_error("eisa_intr_establish: bad ioapic %d\n",
APIC_IRQ_APIC(ih));
return NULL;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: apm.c,v 1.88 2005/12/11 12:17:41 christos Exp $ */
/* $NetBSD: apm.c,v 1.89 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.88 2005/12/11 12:17:41 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.89 2006/02/19 14:59:22 thorpej Exp $");
#include "apm.h"
#if NAPM > 1
@ -986,22 +986,24 @@ apm_set_ver(self)
apm_minver = 0;
}
ok:
printf("Power Management spec V%d.%d", apm_majver, apm_minver);
aprint_normal("%s: Power Management spec V%d.%d", self->sc_dev.dv_xname,
apm_majver, apm_minver);
apm_inited = 1;
if (apminfo.apm_detail & APM_IDLE_SLOWS) {
#ifdef DIAGNOSTIC
/* not relevant often */
printf(" (slowidle)");
aprint_verbose(" (slowidle)");
#endif
/* leave apm_do_idle at its user-configured setting */
} else
apm_do_idle = 0;
#ifdef DIAGNOSTIC
if (apminfo.apm_detail & APM_BIOS_PM_DISABLED)
printf(" (BIOS mgmt disabled)");
aprint_verbose(" (BIOS mgmt disabled)");
if (apminfo.apm_detail & APM_BIOS_PM_DISENGAGED)
printf(" (BIOS managing devices)");
aprint_verbose(" (BIOS managing devices)");
#endif
aprint_normal("\n");
}
static int
@ -1130,7 +1132,8 @@ apmattach(parent, self, aux)
char bits[128];
#endif
printf(": ");
aprint_naive(": Power management\n");
aprint_normal(": Advanced Power Management BIOS\n");
memset(&regs, 0, sizeof(struct bioscallregs));
regs.AX = APM_BIOS_FN(APM_INSTALLATION_CHECK);
@ -1138,7 +1141,8 @@ apmattach(parent, self, aux)
#ifdef APM_USE_KVM86
res = kvm86_bioscall_simple(APM_SYSTEM_BIOS, &regs);
if (res) {
printf("apm_attach: kvm86 error\n");
aprint_error("%s: kvm86 error (APM_INSTALLATION_CHECK)\n",
apmsc->sc_dev.dv_xname);
goto bail_disconnected;
}
#else
@ -1159,7 +1163,8 @@ apmattach(parent, self, aux)
#ifdef APM_USE_KVM86
res = kvm86_bioscall_simple(APM_SYSTEM_BIOS, &regs);
if (res) {
printf("apm_attach: kvm86 error\n");
printf("%s: kvm86 error (APM_DISCONNECT)\n",
apmsc->sc_dev.dv_xname);
goto bail_disconnected;
}
#else
@ -1169,7 +1174,7 @@ apmattach(parent, self, aux)
DPRINTF(APMDEBUG_ATTACH, ("\n%s: ", apmsc->sc_dev.dv_xname));
if ((apminfo.apm_detail & APM_32BIT_SUPPORTED) == 0) {
printf("no 32-bit APM support");
aprint_error("%s: no 32-bit APM support\n");
goto bail_disconnected;
}
@ -1182,7 +1187,8 @@ apmattach(parent, self, aux)
#ifdef APM_USE_KVM86
res = kvm86_bioscall_simple(APM_SYSTEM_BIOS, &regs);
if (res) {
printf("apm_attach: kvm86 error\n");
aprint_error("%s: kvm86 error (APM_32BIT_CONNECT)\n",
apmsc->sc_dev.dv_xname);
goto bail_disconnected;
}
#else
@ -1281,7 +1287,8 @@ apmattach(parent, self, aux)
apminfo.apm_code32_seg_base >= IOM_END) {
DPRINTF(APMDEBUG_ATTACH, ("code32 segment starts outside ISA hole [%x]\n%s: ",
apminfo.apm_code32_seg_base, apmsc->sc_dev.dv_xname));
printf("bogus 32-bit code segment start");
aprint_error("%s: bogus 32-bit code segment start\n",
apmsc->sc_dev.dv_xname);
goto bail;
}
if (apminfo.apm_code32_seg_base +
@ -1291,7 +1298,8 @@ apmattach(parent, self, aux)
apminfo.apm_code32_seg_base + apminfo.apm_code32_seg_len - 1,
apmsc->sc_dev.dv_xname));
#if 0
printf("bogus 32-bit code segment size");
aprint_error("%s: bogus 32-bit code segment size\n",
apmsc->sc_dev.dv_xname);
goto bail;
#else
apminfo.apm_code32_seg_len =
@ -1302,7 +1310,8 @@ apmattach(parent, self, aux)
apminfo.apm_code16_seg_base >= IOM_END) {
DPRINTF(APMDEBUG_ATTACH, ("code16 segment starts outside ISA hole [%x]\n%s: ",
apminfo.apm_code16_seg_base, apmsc->sc_dev.dv_xname));
printf("bogus 16-bit code segment start");
aprint_error("%s: bogus 16-bit code segment start\n",
apmsc->sc_dev.dv_xname);
goto bail;
}
if (apminfo.apm_code16_seg_base +
@ -1316,7 +1325,8 @@ apmattach(parent, self, aux)
* give up since we may have to trash the
* 32bit segment length otherwise.
*/
printf("bogus 16-bit code segment size");
aprint_error("%s: bogus 16-bit code segment size\n",
apmsc->sc_dev.dv_xname);
goto bail;
}
/*
@ -1376,7 +1386,8 @@ apmattach(parent, self, aux)
apminfo.apm_data_seg_base,
apminfo.apm_data_seg_base + apminfo.apm_data_seg_len,
apmsc->sc_dev.dv_xname));
printf("data segment unavailable");
aprint_error("%s: data segment unavailable\n",
apmsc->sc_dev.dv_xname);
goto bail;
}
@ -1427,7 +1438,8 @@ apmattach(parent, self, aux)
if (_x86_memio_map(X86_BUS_SPACE_MEM,
apminfo.apm_data_seg_base,
apminfo.apm_data_seg_len, 0, &memh)) {
printf("couldn't map data segment");
aprint_error("%s: couldn't map data segment\n",
apmsc->sc_dev.dv_xname);
goto bail;
}
DPRINTF(APMDEBUG_ATTACH,
@ -1462,7 +1474,6 @@ apmattach(parent, self, aux)
apmsc->sc_dev.dv_xname));
apm_set_ver(apmsc); /* prints version info */
printf("\n");
if (apm_minver >= 2)
apm_get_capabilities(&regs);
@ -1533,7 +1544,8 @@ bail:
DPRINTF(APMDEBUG_ATTACH, ("\n%s: ", apmsc->sc_dev.dv_xname));
DPRINTF_BIOSRETURN(regs, bits);
bail_disconnected:
printf("\n%s: kernel APM support disabled\n", apmsc->sc_dev.dv_xname);
aprint_normal("%s: kernel APM support disabled\n",
apmsc->sc_dev.dv_xname);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: bios32.c,v 1.9 2005/12/26 19:23:59 perry Exp $ */
/* $NetBSD: bios32.c,v 1.10 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.9 2005/12/26 19:23:59 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.10 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -114,12 +114,12 @@ bios32_init()
entry = *(uint32_t *)(p + 4);
printf("BIOS32 rev. %d found at 0x%lx\n",
aprint_normal("BIOS32 rev. %d found at 0x%lx\n",
*(p + 8), entry);
if (entry < BIOS32_START ||
entry >= BIOS32_END) {
printf("BIOS32 entry point outside "
aprint_error("BIOS32 entry point outside "
"allowable range\n");
entry = 0;
}
@ -158,8 +158,8 @@ bios32_service(service, e, ei)
entry = ebx + edx;
if (entry < BIOS32_START || entry >= BIOS32_END) {
printf("bios32: entry point for service %c%c%c%c is outside "
"allowable range\n",
aprint_error("BIOS32: entry point for service %c%c%c%c is "
"outside allowable range\n",
service & 0xff,
(service >> 8) & 0xff,
(service >> 16) & 0xff,

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.26 2005/12/26 19:23:59 perry Exp $ */
/* $NetBSD: cpu.c,v 1.27 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.26 2005/12/26 19:23:59 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.27 2006/02/19 14:59:22 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -229,7 +229,7 @@ cpu_vm_init(struct cpu_info *ci)
*/
if (ncolors <= uvmexp.ncolors)
return;
printf("%s: %d page colors\n", ci->ci_dev->dv_xname, ncolors);
aprint_verbose("%s: %d page colors\n", ci->ci_dev->dv_xname, ncolors);
uvm_page_recolor(ncolors);
}
@ -253,11 +253,14 @@ cpu_attach(parent, self, aux)
* structure, otherwise use the primary's.
*/
if (caa->cpu_role == CPU_ROLE_AP) {
aprint_naive(": Application Processor\n");
ci = malloc(sizeof(*ci), M_DEVBUF, M_WAITOK);
memset(ci, 0, sizeof(*ci));
#if defined(MULTIPROCESSOR)
if (cpu_info[cpunum] != NULL)
if (cpu_info[cpunum] != NULL) {
printf("\n");
panic("cpu at apic id %d already attached?", cpunum);
}
cpu_info[cpunum] = ci;
#endif
#ifdef TRAPLOG
@ -265,9 +268,12 @@ cpu_attach(parent, self, aux)
M_DEVBUF, M_WAITOK);
#endif
} else {
aprint_naive(": %s Processor\n",
caa->cpu_role == CPU_ROLE_SP ? "Single" : "Boot");
ci = &cpu_info_primary;
#if defined(MULTIPROCESSOR)
if (cpunum != lapic_cpu_number()) {
printf("\n");
panic("%s: running CPU is at apic %d"
" instead of at expected %d",
sc->sc_dev.dv_xname, lapic_cpu_number(), cpunum);
@ -296,10 +302,12 @@ cpu_attach(parent, self, aux)
kstack = uvm_km_alloc(kernel_map, USPACE, 0, UVM_KMF_WIRED);
if (kstack == 0) {
if (caa->cpu_role != CPU_ROLE_AP) {
printf("\n");
panic("cpu_attach: unable to allocate idle stack for"
" primary");
}
printf("%s: unable to allocate idle stack\n",
aprint_normal("\n");
aprint_error("%s: unable to allocate idle stack\n",
sc->sc_dev.dv_xname);
return;
}
@ -320,11 +328,9 @@ cpu_attach(parent, self, aux)
/* further PCB init done later. */
printf(": ");
switch (caa->cpu_role) {
case CPU_ROLE_SP:
printf("(uniprocessor)\n");
aprint_normal(": (uniprocessor)\n");
ci->ci_flags |= CPUF_PRESENT | CPUF_SP | CPUF_PRIMARY;
cpu_intr_init(ci);
identifycpu(ci);
@ -333,7 +339,7 @@ cpu_attach(parent, self, aux)
break;
case CPU_ROLE_BP:
printf("apid %d (boot processor)\n", caa->cpu_number);
aprint_normal(": apid %d (boot processor)\n", caa->cpu_number);
ci->ci_flags |= CPUF_PRESENT | CPUF_BSP | CPUF_PRIMARY;
cpu_intr_init(ci);
identifycpu(ci);
@ -356,7 +362,8 @@ cpu_attach(parent, self, aux)
/*
* report on an AP
*/
printf("apid %d (application processor)\n", caa->cpu_number);
aprint_normal(": apid %d (application processor)\n",
caa->cpu_number);
#if defined(MULTIPROCESSOR)
cpu_intr_init(ci);
@ -369,11 +376,12 @@ cpu_attach(parent, self, aux)
cpu_info_list->ci_next = ci;
}
#else
printf("%s: not started\n", sc->sc_dev.dv_xname);
aprint_normal("%s: not started\n", sc->sc_dev.dv_xname);
#endif
break;
default:
printf("\n");
panic("unknown processor type??\n");
}
cpu_vm_init(ci);
@ -382,9 +390,9 @@ cpu_attach(parent, self, aux)
#if defined(MULTIPROCESSOR)
if (mp_verbose) {
printf("%s: kstack at 0x%lx for %d bytes\n",
aprint_verbose("%s: kstack at 0x%lx for %d bytes\n",
sc->sc_dev.dv_xname, kstack, USPACE);
printf("%s: idle pcb at %p, idle sp at 0x%x\n",
aprint_verbose("%s: idle pcb at %p, idle sp at 0x%x\n",
sc->sc_dev.dv_xname, pcb, pcb->pcb_esp);
}
#endif
@ -519,7 +527,7 @@ cpu_init_idle_pcbs()
}
void
cpu_start_secondary (ci)
cpu_start_secondary(ci)
struct cpu_info *ci;
{
struct pcb *pcb;
@ -533,7 +541,7 @@ cpu_start_secondary (ci)
ci->ci_flags |= CPUF_AP;
printf("%s: starting\n", ci->ci_dev->dv_xname);
aprint_normal("%s: starting\n", ci->ci_dev->dv_xname);
CPU_STARTUP(ci);
@ -544,7 +552,8 @@ cpu_start_secondary (ci)
delay(10);
}
if (! (ci->ci_flags & CPUF_PRESENT)) {
printf("%s: failed to become ready\n", ci->ci_dev->dv_xname);
aprint_error("%s: failed to become ready\n",
ci->ci_dev->dv_xname);
#if defined(MPDEBUG) && defined(DDB)
printf("dropping into debugger; continue from here to resume boot\n");
Debugger();
@ -566,7 +575,7 @@ cpu_boot_secondary(ci)
delay(10);
}
if (! (ci->ci_flags & CPUF_RUNNING)) {
printf("%s: failed to start\n", ci->ci_dev->dv_xname);
aprint_error("%s: failed to start\n", ci->ci_dev->dv_xname);
#if defined(MPDEBUG) && defined(DDB)
printf("dropping into debugger; continue from here to resume boot\n");
Debugger();
@ -623,7 +632,8 @@ cpu_hatch(void *v)
lapic_tpr = 0;
enable_intr();
printf("%s: CPU %ld running\n",ci->ci_dev->dv_xname, ci->ci_cpuid);
aprint_normal("%s: CPU %ld running\n", ci->ci_dev->dv_xname,
ci->ci_cpuid);
#if defined(I586_CPU) || defined(I686_CPU)
if (ci->ci_feature_flags & CPUID_TSC)
cc_microset(ci);

View File

@ -1,4 +1,4 @@
/* $NetBSD: identcpu.c,v 1.28 2006/02/03 02:37:57 xtraeme Exp $ */
/* $NetBSD: identcpu.c,v 1.29 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.28 2006/02/03 02:37:57 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.29 2006/02/19 14:59:22 thorpej Exp $");
#include "opt_cputype.h"
#include "opt_enhanced_speedstep.h"
@ -554,7 +554,7 @@ disable_tsc(struct cpu_info *ci)
{
if (cpu_feature & CPUID_TSC) {
cpu_feature &= ~CPUID_TSC;
printf("WARNING: broken TSC disabled\n");
aprint_error("WARNING: broken TSC disabled\n");
}
}
@ -1046,11 +1046,13 @@ transmeta_cpu_info(struct cpu_info *ci)
{
u_int eax, ebx, ecx, edx, nreg = 0;
/* XXX aprint_verbose()? */
CPUID(0x80860000, eax, ebx, ecx, edx);
nreg = eax;
if (nreg >= 0x80860001) {
CPUID(0x80860001, eax, ebx, ecx, edx);
printf("%s: Processor revision %u.%u.%u.%u\n",
aprint_normal("%s: Processor revision %u.%u.%u.%u\n",
ci->ci_dev->dv_xname,
(ebx >> 24) & 0xff,
(ebx >> 16) & 0xff,
@ -1059,7 +1061,7 @@ transmeta_cpu_info(struct cpu_info *ci)
}
if (nreg >= 0x80860002) {
CPUID(0x80860002, eax, ebx, ecx, edx);
printf("%s: Code Morphing Software Rev: %u.%u.%u-%u-%u\n",
aprint_normal("%s: Code Morphing Software Rev: %u.%u.%u-%u-%u\n",
ci->ci_dev->dv_xname, (ebx >> 24) & 0xff,
(ebx >> 16) & 0xff,
(ebx >> 8) & 0xff,
@ -1085,14 +1087,14 @@ transmeta_cpu_info(struct cpu_info *ci)
info.regs[i].ecx, info.regs[i].edx);
}
info.text[64] = 0;
printf("%s: %s\n", ci->ci_dev->dv_xname, info.text);
aprint_normal("%s: %s\n", ci->ci_dev->dv_xname, info.text);
}
if (nreg >= 0x80860007) {
crusoe_longrun = tmx86_get_longrun_mode();
tmx86_get_longrun_status(&crusoe_frequency,
&crusoe_voltage, &crusoe_percentage);
printf("%s: LongRun mode: %d <%dMHz %dmV %d%%>\n",
aprint_normal("%s: LongRun mode: %d <%dMHz %dmV %d%%>\n",
ci->ci_dev->dv_xname,
crusoe_longrun, crusoe_frequency, crusoe_voltage,
crusoe_percentage);
@ -1244,14 +1246,15 @@ identifycpu(struct cpu_info *ci)
*name ? " " : "", name,
*brand ? " " : "", brand,
classnames[class]);
printf("%s: %s", cpuname, cpu_model);
aprint_normal("%s: %s", cpuname, cpu_model);
if (ci->ci_tsc_freq != 0)
printf(", %qd.%02qd MHz", (ci->ci_tsc_freq + 4999) / 1000000,
aprint_normal(", %qd.%02qd MHz",
(ci->ci_tsc_freq + 4999) / 1000000,
((ci->ci_tsc_freq + 4999) / 10000) % 100);
if (ci->ci_signature != 0)
printf(", id 0x%x", ci->ci_signature);
printf("\n");
aprint_normal(", id 0x%x", ci->ci_signature);
aprint_normal("\n");
if (ci->ci_info)
(*ci->ci_info)(ci);
@ -1270,34 +1273,34 @@ identifycpu(struct cpu_info *ci)
if ((ci->ci_feature_flags & CPUID_MASK1) != 0) {
bitmask_snprintf(ci->ci_feature_flags,
feature_str[0], buf, sizeof(buf));
printf("%s: features %s\n", cpuname, buf);
aprint_verbose("%s: features %s\n", cpuname, buf);
}
if ((ci->ci_feature_flags & CPUID_MASK2) != 0) {
bitmask_snprintf(ci->ci_feature_flags,
feature_str[1], buf, sizeof(buf));
printf("%s: features %s\n", cpuname, buf);
aprint_verbose("%s: features %s\n", cpuname, buf);
}
if ((ci->ci_feature_flags & CPUID_MASK3) != 0) {
bitmask_snprintf(ci->ci_feature_flags,
feature_str[2], buf, sizeof(buf));
printf("%s: features %s\n", cpuname, buf);
aprint_verbose("%s: features %s\n", cpuname, buf);
}
}
if (ci->ci_feature2_flags) {
bitmask_snprintf(ci->ci_feature2_flags,
CPUID2_FLAGS, buf, sizeof(buf));
printf("%s: features2 %s\n", cpuname, buf);
aprint_verbose("%s: features2 %s\n", cpuname, buf);
}
if (ci->ci_feature3_flags) {
bitmask_snprintf(ci->ci_feature3_flags,
CPUID_FLAGS4, buf, sizeof(buf));
printf("%s: features3 %s\n", cpuname, buf);
aprint_verbose("%s: features3 %s\n", cpuname, buf);
}
if (*cpu_brand_string != '\0')
printf("%s: \"%s\"\n", cpuname, cpu_brand_string);
aprint_normal("%s: \"%s\"\n", cpuname, cpu_brand_string);
x86_print_cacheinfo(ci);
@ -1305,18 +1308,18 @@ identifycpu(struct cpu_info *ci)
if (rdmsr(MSR_MISC_ENABLE) & (1 << 3)) {
if ((cpu_feature2 & CPUID2_TM2) &&
(rdmsr(MSR_THERM2_CTL) & (1 << 16)))
printf("%s: using thermal monitor 2\n",
aprint_normal("%s: using thermal monitor 2\n",
cpuname);
else
printf("%s: using thermal monitor 1\n",
aprint_normal("%s: using thermal monitor 1\n",
cpuname);
} else
printf("%s: running without thermal monitor!\n",
aprint_normal("%s: running without thermal monitor!\n",
cpuname);
}
if (ci->ci_cpuid_level >= 3 && (ci->ci_feature_flags & CPUID_PN)) {
printf("%s: serial number %04X-%04X-%04X-%04X-%04X-%04X\n",
aprint_verbose("%s: serial number %04X-%04X-%04X-%04X-%04X-%04X\n",
cpuname,
ci->ci_cpu_serial[0] / 65536, ci->ci_cpu_serial[0] % 65536,
ci->ci_cpu_serial[1] / 65536, ci->ci_cpu_serial[1] % 65536,
@ -1333,34 +1336,34 @@ identifycpu(struct cpu_info *ci)
#endif
#ifndef I686_CPU
case CPUCLASS_686:
printf(n_support, "Pentium Pro");
aprint_error(n_support, "Pentium Pro");
#ifdef I586_CPU
printf(n_lower, "i586");
aprint_error(n_lower, "i586");
cpu_class = CPUCLASS_586;
break;
#endif
#endif
#ifndef I586_CPU
case CPUCLASS_586:
printf(n_support, "Pentium");
aprint_error(n_support, "Pentium");
#ifdef I486_CPU
printf(n_lower, "i486");
aprint_error(n_lower, "i486");
cpu_class = CPUCLASS_486;
break;
#endif
#endif
#ifndef I486_CPU
case CPUCLASS_486:
printf(n_support, "i486");
aprint_error(n_support, "i486");
#ifdef I386_CPU
printf(n_lower, "i386");
aprint_error(n_lower, "i386");
cpu_class = CPUCLASS_386;
break;
#endif
#endif
#ifndef I386_CPU
case CPUCLASS_386:
printf(n_support, "i386");
aprint_error(n_support, "i386");
panic("no appropriate CPU class available");
#endif
default:
@ -1394,12 +1397,12 @@ identifycpu(struct cpu_info *ci)
if (cpu == CPU_486DLC) {
#ifndef CYRIX_CACHE_WORKS
printf("WARNING: CYRIX 486DLC CACHE UNCHANGED.\n");
aprint_error("WARNING: CYRIX 486DLC CACHE UNCHANGED.\n");
#else
#ifndef CYRIX_CACHE_REALLY_WORKS
printf("WARNING: CYRIX 486DLC CACHE ENABLED IN HOLD-FLUSH MODE.\n");
aprint_error("WARNING: CYRIX 486DLC CACHE ENABLED IN HOLD-FLUSH MODE.\n");
#else
printf("WARNING: CYRIX 486DLC CACHE ENABLED.\n");
aprint_error("WARNING: CYRIX 486DLC CACHE ENABLED.\n");
#endif
#endif
}
@ -1430,7 +1433,7 @@ identifycpu(struct cpu_info *ci)
if (rdmsr(MSR_MISC_ENABLE) & (1 << 16))
est_init(ci);
else
printf("%s: Enhanced SpeedStep disabled by BIOS\n",
aprint_normal("%s: Enhanced SpeedStep disabled by BIOS\n",
cpuname);
}
#endif /* ENHANCED_SPEEDSTEP */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.61 2006/02/16 10:28:01 kochi Exp $ */
/* $NetBSD: mainbus.c,v 1.62 2006/02/19 14:59:22 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.61 2006/02/16 10:28:01 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.62 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -190,7 +190,8 @@ mainbus_attach(parent, self, aux)
#endif
int mpacpi_active = 0;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
#ifdef MPBIOS
mpbios_present = mpbios_probe(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ahc_isa.c,v 1.28 2005/12/26 19:23:59 perry Exp $ */
/* $NetBSD: ahc_isa.c,v 1.29 2006/02/19 14:59:22 thorpej Exp $ */
/*
* Product specific probe and attach routines for:
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.28 2005/12/26 19:23:59 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.29 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -210,16 +210,16 @@ ahc_isa_idstring(bus_space_tag_t iot, bus_space_handle_t ioh, char *idstring)
/* Check for device existence */
if (EISA_VENDID_NODEV(vid)) {
#if 0
printf("ahc_isa_idstring: no device at 0x%lx\n",
aprint_error("ahc_isa_idstring: no device at 0x%lx\n",
ioh); /* XXX knows about ioh guts */
printf("\t(0x%x, 0x%x)\n", vid[0], vid[1]);
aprint_error("\t(0x%x, 0x%x)\n", vid[0], vid[1]);
#endif
return (0);
}
/* And check that the firmware didn't biff something badly */
if (EISA_VENDID_IDDELAY(vid)) {
printf("ahc_isa_idstring: BIOS biffed it at 0x%lx\n",
aprint_error("ahc_isa_idstring: BIOS biffed it at 0x%lx\n",
ioh); /* XXX knows about ioh guts */
return (0);
}
@ -264,7 +264,7 @@ ahc_isa_match(struct isa_attach_args *ia, bus_addr_t iobase)
* be common on machines configured to look for
* ahc_eisa and ahc_isa.
*/
printf("ahc_isa_match: can't map I/O space for 0x%x\n",
aprint_error("ahc_isa_match: can't map I/O space for 0x%x\n",
iobase);
#endif
return (0);
@ -285,7 +285,7 @@ ahc_isa_match(struct isa_attach_args *ia, bus_addr_t iobase)
if (ia->ia_irq[0].ir_irq != ISA_UNKNOWN_IRQ &&
ia->ia_irq[0].ir_irq != irq) {
printf("ahc_isa_match: irq mismatch (kernel %d, card %d)\n",
aprint_error("ahc_isa_match: irq mismatch (kernel %d, card %d)\n",
ia->ia_irq[0].ir_irq, irq);
return (0);
}
@ -378,26 +378,28 @@ ahc_isa_attach(struct device *parent, struct device *self, void *aux)
char idstring[EISA_IDSTRINGLEN];
u_char intdef;
aprint_naive(": SCSI controller\n");
if (bus_space_map(iot, ia->ia_io[0].ir_addr, ia->ia_io[0].ir_size,
0, &ioh)) {
printf(": can't map i/o space\n");
aprint_error(": can't map i/o space\n");
return;
}
if (!ahc_isa_idstring(iot, ioh, idstring)) {
printf(": can't read ID string\n");
aprint_error(": can't read ID string\n");
goto free_io;
}
if ((irq = ahc_aic77xx_irq(iot, ioh)) < 0) {
printf(": ahc_aic77xx_irq failed\n");
aprint_error(": ahc_aic77xx_irq failed\n");
goto free_io;
}
if (strcmp(idstring, "ADP7756") == 0) {
printf(": %s\n", EISA_PRODUCT_ADP7756);
aprint_normal(": %s\n", EISA_PRODUCT_ADP7756);
} else if (strcmp(idstring, "ADP7757") == 0) {
printf(": %s\n", EISA_PRODUCT_ADP7757);
aprint_normal(": %s\n", EISA_PRODUCT_ADP7757);
} else {
printf(": unknown device type %s\n", idstring);
aprint_error(": unknown device type %s\n", idstring);
goto free_io;
}
@ -437,7 +439,7 @@ ahc_isa_attach(struct device *parent, struct device *self, void *aux)
ahc->ih = isa_intr_establish(ia->ia_ic, irq,
intrtype, IPL_BIO, ahc_intr, ahc);
if (ahc->ih == NULL) {
printf("%s: couldn't establish %s interrupt\n",
aprint_error("%s: couldn't establish %s interrupt\n",
ahc->sc_dev.dv_xname, intrtypestr);
goto free_io;
}
@ -447,7 +449,7 @@ ahc_isa_attach(struct device *parent, struct device *self, void *aux)
* usefull for debugging irq problems
*/
if (bootverbose) {
printf("%s: Using %s interrupts\n",
aprint_verbose("%s: Using %s interrupts\n",
ahc->sc_dev.dv_xname, intrtypestr);
}
@ -492,23 +494,24 @@ aha2840_load_seeprom(struct ahc_softc *ahc)
sd.sd_DI = DI_2840;
if (bootverbose)
printf("%s: Reading SEEPROM...", ahc_name(ahc));
aprint_verbose("%s: Reading SEEPROM...", ahc_name(ahc));
have_seeprom = read_seeprom(&sd, (uint16_t *)&sc,
/*start_addr*/0, sizeof(sc)/2);
if (have_seeprom) {
if (verify_seeprom_cksum(&sc) == 0) {
if(bootverbose)
printf ("checksum error\n");
aprint_verbose ("checksum error\n");
have_seeprom = 0;
} else if (bootverbose) {
printf("done.\n");
aprint_verbose("done.\n");
}
}
if (!have_seeprom) {
if (bootverbose)
printf("%s: No SEEPROM available\n", ahc_name(ahc));
aprint_verbose("%s: No SEEPROM available\n",
ahc_name(ahc));
ahc->flags |= AHC_USEDEFAULTS;
} else {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.89 2005/12/24 20:07:10 perry Exp $ */
/* $NetBSD: clock.c,v 1.90 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.89 2005/12/24 20:07:10 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.90 2006/02/19 14:59:22 thorpej Exp $");
/* #define CLOCKDEBUG */
/* #define CLOCK_PARANOIA */
@ -578,7 +578,8 @@ sysbeepmatch(struct device *parent, struct cfdata *match, void *aux)
void
sysbeepattach(struct device *parent, struct device *self, void *aux)
{
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
ppicookie = ((struct pcppi_attach_args *)aux)->pa_cookie;
ppi_attached = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lms.c,v 1.47 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: lms.c,v 1.48 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles M. Hannum.
@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.47 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.48 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -142,10 +142,11 @@ lmsattach(struct device *parent, struct device *self, void *aux)
bus_space_handle_t ioh;
struct wsmousedev_attach_args a;
printf("\n");
aprint_naive(": Mouse\n");
aprint_normal(": Logitech Mouse\n");
if (bus_space_map(iot, ia->ia_io[0].ir_addr, LMS_NPORTS, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mms.c,v 1.44 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: mms.c,v 1.45 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles M. Hannum.
@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.44 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.45 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -133,10 +133,11 @@ mmsattach(struct device *parent, struct device *self, void *aux)
bus_space_handle_t ioh;
struct wsmousedev_attach_args a;
printf("\n");
aprint_naive(": Mouse\n");
aprint_normal(": Microsoft Mouse\n");
if (bus_space_map(iot, ia->ia_io[0].ir_addr, MMS_NPORTS, 0, &ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: npx.c,v 1.110 2005/12/26 19:23:59 perry Exp $ */
/* $NetBSD: npx.c,v 1.111 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.110 2005/12/26 19:23:59 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.111 2006/02/19 14:59:22 thorpej Exp $");
#if 0
#define IPRINTF(x) printf x
@ -298,7 +298,7 @@ void npxinit(struct cpu_info *ci)
fninit();
if (npx586bug1(4195835, 3145727) != 0) {
i386_fpu_fdivbug = 1;
printf("%s: WARNING: Pentium FDIV bug detected!\n",
aprint_normal("%s: WARNING: Pentium FDIV bug detected!\n",
ci->ci_dev->dv_xname);
}
lcr0(rcr0() | (CR0_TS));

View File

@ -1,4 +1,4 @@
/* $NetBSD: npx_isa.c,v 1.10 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: npx_isa.c,v 1.11 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: npx_isa.c,v 1.10 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: npx_isa.c,v 1.11 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -143,8 +143,10 @@ npx_isa_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = ia->ia_iot;
aprint_naive("\n");
aprint_normal("\n");
if (bus_space_map(sc->sc_iot, 0xf0, 16, 0, &sc->sc_ioh)) {
printf("\n");
panic("npxattach: unable to map I/O space");
}
@ -152,16 +154,16 @@ npx_isa_attach(struct device *parent, struct device *self, void *aux)
switch (sc->sc_type) {
case NPX_INTERRUPT:
printf("\n");
lcr0(rcr0() & ~CR0_NE);
sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq,
IST_EDGE, IPL_NONE, (int (*)(void *))npxintr, 0);
break;
case NPX_EXCEPTION:
printf(": using exception 16\n");
aprint_verbose("%s: using exception 16\n", sc->sc_dev.dv_xname);
break;
case NPX_BROKEN:
printf(": error reporting broken; not using\n");
aprint_error("%s: error reporting broken; not using\n",
sc->sc_dev.dv_xname);
sc->sc_type = NPX_NONE;
return;
case NPX_NONE:

View File

@ -1,4 +1,4 @@
/* $NetBSD: mca_machdep.c,v 1.27 2005/12/26 19:24:00 perry Exp $ */
/* $NetBSD: mca_machdep.c,v 1.28 2006/02/19 14:59:22 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.27 2005/12/26 19:24:00 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.28 2006/02/19 14:59:22 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -334,7 +334,7 @@ mca_busprobe(void)
"\020DMA32\n",
buf, sizeof(buf));
printf("BIOS CFG: Model-SubM-Rev: %02x-%02x-%02x, 0x%s\n",
aprint_normal("BIOS CFG: Model-SubM-Rev: %02x-%02x-%02x, 0x%s\n",
scp->model, scp->submodel, scp->bios_rev, buf);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: elan520.c,v 1.13 2005/12/26 19:24:00 perry Exp $ */
/* $NetBSD: elan520.c,v 1.14 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.13 2005/12/26 19:24:00 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.14 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -242,19 +242,21 @@ elansc_attach(struct device *parent, struct device *self, void *aux)
uint16_t data;
#endif
printf(": AMD Elan SC520 System Controller\n");
aprint_naive(": System Controller\n");
aprint_normal(": AMD Elan SC520 System Controller\n");
sc->sc_memt = pa->pa_memt;
if (bus_space_map(sc->sc_memt, MMCR_BASE_ADDR, PAGE_SIZE, 0,
&sc->sc_memh) != 0) {
printf("%s: unable to map registers\n", sc->sc_dev.dv_xname);
aprint_error("%s: unable to map registers\n",
sc->sc_dev.dv_xname);
return;
}
rev = bus_space_read_2(sc->sc_memt, sc->sc_memh, MMCR_REVID);
cpuctl = bus_space_read_1(sc->sc_memt, sc->sc_memh, MMCR_CPUCTL);
printf("%s: product %d stepping %d.%d, CPU clock %s\n",
aprint_normal("%s: product %d stepping %d.%d, CPU clock %s\n",
sc->sc_dev.dv_xname,
(rev & REVID_PRODID) >> REVID_PRODID_SHIFT,
(rev & REVID_MAJSTEP) >> REVID_MAJSTEP_SHIFT,
@ -284,7 +286,8 @@ elansc_attach(struct device *parent, struct device *self, void *aux)
*/
ressta = bus_space_read_1(sc->sc_memt, sc->sc_memh, MMCR_RESSTA);
if (ressta & RESSTA_WDT_RST_DET)
printf("%s: WARNING: LAST RESET DUE TO WATCHDOG EXPIRATION!\n",
aprint_error(
"%s: WARNING: LAST RESET DUE TO WATCHDOG EXPIRATION!\n",
sc->sc_dev.dv_xname);
bus_space_write_1(sc->sc_memt, sc->sc_memh, MMCR_RESSTA, ressta);
@ -297,7 +300,7 @@ elansc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_smw.smw_tickle = elansc_wdog_tickle;
sc->sc_smw.smw_period = 32; /* actually 32.54 */
if (sysmon_wdog_register(&sc->sc_smw) != 0)
printf("%s: unable to register watchdog with sysmon\n",
aprint_error("%s: unable to register watchdog with sysmon\n",
sc->sc_dev.dv_xname);
/* Set up the watchdog registers with some defaults. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: geode.c,v 1.3 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: geode.c,v 1.4 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 2005 David Young. All rights reserved.
@ -76,7 +76,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: geode.c,v 1.3 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: geode.c,v 1.4 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -235,13 +235,15 @@ geode_wdog_attach(struct device *parent, struct device *self, void *aux)
uint32_t cba;
uint8_t wdsts;
printf(": AMD Geode SC1100 Watchdog Timer\n");
aprint_naive(": Watchdog Timer\n");
aprint_normal(": AMD Geode SC1100 Watchdog Timer\n");
cba = pci_conf_read(pa->pa_pc, pa->pa_tag, SC1100_XBUS_CBA_SCRATCHPAD);
sc->sc_iot = pa->pa_iot;
if (bus_space_map(sc->sc_iot, (bus_addr_t)cba, SC1100_GCB_SIZE, 0,
&sc->sc_ioh) != 0) {
printf("%s: unable to map registers\n", sc->sc_dev.dv_xname);
aprint_error("%s: unable to map registers\n",
sc->sc_dev.dv_xname);
return;
}
@ -258,7 +260,8 @@ geode_wdog_attach(struct device *parent, struct device *self, void *aux)
wdsts));
if (wdsts & SC1100_WDSTS_WDRST)
printf("%s: WARNING: LAST RESET DUE TO WATCHDOG EXPIRATION!\n",
aprint_error(
"%s: WARNING: LAST RESET DUE TO WATCHDOG EXPIRATION!\n",
sc->sc_dev.dv_xname);
/* reset WDOVF by writing 1 to it */
@ -274,7 +277,7 @@ geode_wdog_attach(struct device *parent, struct device *self, void *aux)
sc->sc_smw.smw_tickle = geode_wdog_tickle;
sc->sc_smw.smw_period = 32;
if (sysmon_wdog_register(&sc->sc_smw) != 0)
printf("%s: unable to register watchdog with sysmon\n",
aprint_error("%s: unable to register watchdog with sysmon\n",
sc->sc_dev.dv_xname);
/* cancel any pending countdown */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ichlpcib.c,v 1.11 2005/12/26 19:24:00 perry Exp $ */
/* $NetBSD: ichlpcib.c,v 1.12 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.11 2005/12/26 19:24:00 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.12 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -160,7 +160,7 @@ tcotimer_configure(struct lpcib_softc *sc, struct pci_attach_args *pa)
lpcib_tcotimer_tick_to_second(LPCIB_TCOTIMER_MAX_TICK);
if (sysmon_wdog_register(&sc->sc_smw)) {
printf("%s: unable to register TCO timer"
aprint_error("%s: unable to register TCO timer"
"as a sysmon watchdog device.\n",
sc->sc_dev.dv_xname);
return;
@ -174,7 +174,7 @@ tcotimer_configure(struct lpcib_softc *sc, struct pci_attach_args *pa)
if (pci_mapreg_map(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0,
&sc->sc_iot, &sc->sc_ioh, NULL, NULL)) {
sysmon_wdog_unregister(&sc->sc_smw);
printf("%s: can't map i/o space; "
aprint_error("%s: can't map i/o space; "
"TCO timer disabled\n", sc->sc_dev.dv_xname);
return;
}
@ -204,7 +204,7 @@ tcotimer_configure(struct lpcib_softc *sc, struct pci_attach_args *pa)
pcireg = pci_conf_read(pa->pa_pc, pa->pa_tag,
LPCIB_PCI_GEN_STA);
if (pcireg & LPCIB_PCI_GEN_STA_NO_REBOOT) {
printf("%s: TCO timer reboot disabled by hardware; "
aprint_error("%s: TCO timer reboot disabled by hardware; "
"hope SMBIOS properly handles it.\n",
sc->sc_dev.dv_xname);
ioreg |= LPCIB_SMI_EN_TCO_EN;
@ -214,7 +214,8 @@ tcotimer_configure(struct lpcib_softc *sc, struct pci_attach_args *pa)
if (ioreg & LPCIB_SMI_EN_GBL_SMI_EN)
bus_space_write_4(sc->sc_iot, sc->sc_ioh, LPCIB_SMI_EN, ioreg);
printf("%s: TCO (watchdog) timer configured.\n", sc->sc_dev.dv_xname);
aprint_verbose("%s: TCO (watchdog) timer configured.\n",
sc->sc_dev.dv_xname);
return;
}
@ -343,9 +344,9 @@ speedstep_configure(struct lpcib_softc *sc, struct pci_attach_args *pa)
/* XXX save the sc for IO tag/handle */
speedstep_cookie = sc;
printf("%s: SpeedStep enabled\n", sc->sc_dev.dv_xname);
aprint_verbose("%s: SpeedStep enabled\n", sc->sc_dev.dv_xname);
} else
printf("%s: No SpeedStep\n", sc->sc_dev.dv_xname);
aprint_verbose("%s: No SpeedStep\n", sc->sc_dev.dv_xname);
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: p64h2apic.c,v 1.8 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: p64h2apic.c,v 1.9 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: p64h2apic.c,v 1.8 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: p64h2apic.c,v 1.9 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -89,8 +89,12 @@ p64h2attach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
char devinfo[256];
aprint_naive("\n");
aprint_normal("\n");
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class));
aprint_normal("%s: %s (rev. 0x%02x)\n", sc->sc_dev.dv_xname, devinfo,
PCI_REVISION(pa->pa_class));
sc->sc_tag = pa->pa_tag;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pceb.c,v 1.16 2005/12/11 12:17:43 christos Exp $ */
/* $NetBSD: pceb.c,v 1.17 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.16 2005/12/11 12:17:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.17 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -106,14 +106,15 @@ pcebattach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
char devinfo[256];
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/*
* Just print out a description and defer configuration
* until all PCI devices have been attached.
*/
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
aprint_normal("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
PCI_REVISION(pa->pa_class));
config_defer(self, pceb_callback);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pchb.c,v 1.58 2006/02/12 18:16:01 tron Exp $ */
/* $NetBSD: pchb.c,v 1.59 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.58 2006/02/12 18:16:01 tron Exp $");
__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.59 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -112,7 +112,9 @@ pchbattach(struct device *parent, struct device *self, void *aux)
pcitag_t tag;
int doattach, attachflags, has_agp;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
doattach = 0;
has_agp = 0;
attachflags = pa->pa_flags;
@ -123,7 +125,7 @@ pchbattach(struct device *parent, struct device *self, void *aux)
*/
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
aprint_normal("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
PCI_REVISION(pa->pa_class));
switch (PCI_VENDOR(pa->pa_id)) {
case PCI_VENDOR_SERVERWORKS:
@ -152,7 +154,7 @@ pchbattach(struct device *parent, struct device *self, void *aux)
buses. */
break;
default:
printf("%s: unknown ServerWorks chip ID 0x%04x; trying to attach PCI buses behind it\n", self->dv_xname, PCI_PRODUCT(pa->pa_id));
aprint_error("%s: unknown ServerWorks chip ID 0x%04x; trying to attach PCI buses behind it\n", self->dv_xname, PCI_PRODUCT(pa->pa_id));
/* FALLTHROUGH */
case PCI_PRODUCT_SERVERWORKS_CNB20_LE_AGP:
case PCI_PRODUCT_SERVERWORKS_CNB30_LE_PCI:
@ -202,7 +204,7 @@ pchbattach(struct device *parent, struct device *self, void *aux)
bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag,
I82443BX_SDRAMC_REG);
if ((bcreg & 0x0300) != 0x0100) {
printf("%s: fixing Idle/Pipeline DRAM "
aprint_verbose("%s: fixing Idle/Pipeline DRAM "
"Leadoff Timing\n", self->dv_xname);
bcreg &= ~0x0300;
bcreg |= 0x0100;
@ -218,15 +220,16 @@ pchbattach(struct device *parent, struct device *self, void *aux)
pbnum = PCISET_PCI_BUS_NUMBER(bcreg);
switch (bdnum & PCISET_BRIDGETYPE_MASK) {
default:
printf("%s: bdnum=%x (reserved)\n",
aprint_error("%s: bdnum=%x (reserved)\n",
self->dv_xname, bdnum);
break;
case PCISET_TYPE_COMPAT:
printf("%s: Compatibility PB (bus %d)\n",
self->dv_xname, pbnum);
aprint_verbose(
"%s: Compatibility PB (bus %d)\n",
self->dv_xname, pbnum);
break;
case PCISET_TYPE_AUX:
printf("%s: Auxiliary PB (bus %d)\n",
aprint_verbose("%s: Auxiliary PB (bus %d)\n",
self->dv_xname, pbnum);
/*
* This host bridge has a second PCI bus.
@ -243,8 +246,9 @@ pchbattach(struct device *parent, struct device *self, void *aux)
bcreg &= ~I82424_BCTL_CPUPCI_POSTEN;
pci_conf_write(pa->pa_pc, pa->pa_tag,
I82424_CPU_BCTL_REG, bcreg);
printf("%s: disabled CPU-PCI write posting\n",
self->dv_xname);
aprint_verbose(
"%s: disabled CPU-PCI write posting\n",
self->dv_xname);
}
break;
case PCI_PRODUCT_INTEL_82451NX_PXB:

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcib.c,v 1.39 2006/02/17 06:57:18 wiz Exp $ */
/* $NetBSD: pcib.c,v 1.40 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.39 2006/02/17 06:57:18 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.40 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -190,14 +190,15 @@ pcibattach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
char devinfo[256];
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/*
* Just print out a description and defer configuration
* until all PCI devices have been attached.
*/
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
aprint_normal("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
PCI_REVISION(pa->pa_class));
config_defer(self, pcib_callback);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcibios.c,v 1.31 2005/12/26 19:24:00 perry Exp $ */
/* $NetBSD: pcibios.c,v 1.32 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.31 2005/12/26 19:24:00 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.32 2006/02/19 14:59:23 thorpej Exp $");
#include "opt_pcibios.h"
#include "opt_pcifixup.h"
@ -173,10 +173,9 @@ pcibios_init(void)
return;
}
printf("PCI BIOS rev. %d.%d found at 0x%lx\n", rev_maj, rev_min >> 4,
ei.bei_entry);
#ifdef PCIBIOSVERBOSE
printf("pcibios: config mechanism %s%s, special cycles %s%s, "
aprint_normal("PCI BIOS rev. %d.%d found at 0x%lx\n",
rev_maj, rev_min >> 4, ei.bei_entry);
aprint_verbose("pcibios: config mechanism %s%s, special cycles %s%s, "
"last bus %d\n",
mech1 ? "[1]" : "[x]",
mech2 ? "[2]" : "[x]",
@ -184,8 +183,6 @@ pcibios_init(void)
scmech2 ? "[2]" : "[x]",
pcibios_max_bus);
#endif
/*
* The PCI BIOS tells us the config mechanism; fill it in now
* so that pci_mode_detect() doesn't have to look for it.
@ -211,7 +208,7 @@ pcibios_init(void)
switch (rv) {
case -1:
/* Non-fatal error. */
printf("Warning: unable to fix up PCI interrupt "
aprint_error("Warning: unable to fix up PCI interrupt "
"routing\n");
break;
@ -259,22 +256,23 @@ pcibios_pir_init(void)
for (i = 0; i < tablesize; i++)
cksum += *(unsigned char *)(p + i);
printf("PCI IRQ Routing Table rev. %d.%d found at 0x%lx, "
aprint_normal(
"PCI IRQ Routing Table rev. %d.%d found at 0x%lx, "
"size %d bytes (%d entries)\n", rev_maj, rev_min, pa,
tablesize, (tablesize - 32) / 16);
if (cksum != 0) {
printf("pcibios_pir_init: bad IRQ table checksum\n");
aprint_error("pcibios_pir_init: bad IRQ table checksum\n");
continue;
}
if (tablesize < 32 || (tablesize % 16) != 0) {
printf("pcibios_pir_init: bad IRQ table size\n");
aprint_error("pcibios_pir_init: bad IRQ table size\n");
continue;
}
if (rev_maj != 1 || rev_min != 0) {
printf("pcibios_pir_init: unsupported IRQ table "
aprint_error("pcibios_pir_init: unsupported IRQ table "
"version\n");
continue;
}
@ -286,13 +284,13 @@ pcibios_pir_init(void)
pcibios_pir_table = malloc(tablesize - 32, M_DEVBUF,
M_NOWAIT);
if (pcibios_pir_table == NULL) {
printf("pcibios_pir_init: no memory for $PIR\n");
aprint_error("pcibios_pir_init: no memory for $PIR\n");
return;
}
memcpy(pcibios_pir_table, p + 32, tablesize - 32);
pcibios_pir_table_nentries = (tablesize - 32) / 16;
printf("PCI Interrupt Router at %03d:%02d:%01d",
aprint_verbose("PCI Interrupt Router at %03d:%02d:%01d",
pcibios_pir_header.router_bus,
PIR_DEVFUNC_DEVICE(pcibios_pir_header.router_devfunc),
PIR_DEVFUNC_FUNCTION(pcibios_pir_header.router_devfunc));
@ -301,11 +299,11 @@ pcibios_pir_init(void)
if (devinfo) {
pci_devinfo(pcibios_pir_header.compat_router,
0, 0, devinfo, 256);
printf(" (%s compatible)", devinfo);
aprint_verbose(" (%s compatible)", devinfo);
free(devinfo, M_DEVBUF);
}
}
printf("\n");
aprint_verbose("\n");
pcibios_print_exclirq();
#ifdef PCIBIOS_LIBRETTO_FIXUP
@ -332,19 +330,19 @@ pcibios_pir_init(void)
pcibios_pir_table = malloc(pcibios_pir_table_nentries *
sizeof(*pcibios_pir_table), M_DEVBUF, M_NOWAIT);
if (pcibios_pir_table == NULL) {
printf("pcibios_pir_init: no memory for $PIR\n");
aprint_error("pcibios_pir_init: no memory for $PIR\n");
return;
}
if (pcibios_get_intr_routing(pcibios_pir_table,
&pcibios_pir_table_nentries,
&pcibios_pir_header.exclusive_irq) != PCIBIOS_SUCCESS) {
printf("No PCI IRQ Routing information available.\n");
aprint_normal("No PCI IRQ Routing information available.\n");
free(pcibios_pir_table, M_DEVBUF);
pcibios_pir_table = NULL;
pcibios_pir_table_nentries = 0;
return;
}
printf("PCI BIOS has %d Interrupt Routing table entries\n",
aprint_verbose("PCI BIOS has %d Interrupt Routing table entries\n",
pcibios_pir_table_nentries);
pcibios_print_exclirq();
@ -473,11 +471,11 @@ pcibios_return_code(uint16_t ax, const char *func)
break;
default:
printf("%s: unknown return code 0x%x\n", func, rv);
aprint_error("%s: unknown return code 0x%x\n", func, rv);
return (rv);
}
printf("%s: %s\n", func, errstr);
aprint_error("%s: %s\n", func, errstr);
return (rv);
}
@ -487,12 +485,12 @@ pcibios_print_exclirq(void)
int i;
if (pcibios_pir_header.exclusive_irq) {
printf("PCI Exclusive IRQs:");
aprint_verbose("PCI Exclusive IRQs:");
for (i = 0; i < 16; i++) {
if (pcibios_pir_header.exclusive_irq & (1 << i))
printf(" %d", i);
aprint_verbose(" %d", i);
}
printf("\n");
aprint_verbose("\n");
}
}
@ -623,7 +621,7 @@ pcibios_biosroute(int bus, int device, int func, int pin, int irq)
uint16_t ax, bx, cx;
int rv;
printf("pcibios_biosroute: b,d,f=%d,%d,%d pin=%x irq=%d\n",
aprint_debug("pcibios_biosroute: b,d,f=%d,%d,%d pin=%x irq=%d\n",
bus, device, func, pin+0xa, irq);
bx = (bus << 8) | (device << 3) | func;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcic_pci_machdep.c,v 1.4 2005/12/11 12:17:44 christos Exp $ */
/* $NetBSD: pcic_pci_machdep.c,v 1.5 2006/02/19 14:59:23 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcic_pci_machdep.c,v 1.4 2005/12/11 12:17:44 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcic_pci_machdep.c,v 1.5 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -64,7 +64,8 @@ pcic_pci_machdep_pcic_intr_establish(struct pcic_softc *sc, int (*fct)(void *))
if (isa_intr_alloc(NULL, PCIC_CSC_INTR_IRQ_VALIDMASK &
pcic_isa_intr_alloc_mask, IST_EDGE, &(sc->irq)))
return (NULL);
printf("%s: interrupting at irq %d\n", sc->dev.dv_xname, sc->irq);
aprint_normal("%s: interrupting at irq %d\n", sc->dev.dv_xname,
sc->irq);
return (isa_intr_establish(NULL, sc->irq, IST_EDGE, IPL_TTY,
fct, sc));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcmb.c,v 1.12 2005/12/11 12:17:44 christos Exp $ */
/* $NetBSD: pcmb.c,v 1.13 2006/02/19 14:59:23 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.12 2005/12/11 12:17:44 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.13 2006/02/19 14:59:23 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -88,14 +88,15 @@ pcmbattach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
char devinfo[256];
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/*
* Just print out a description and defer configuration
* until all PCI devices have been attached.
*/
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
aprint_normal("%s: %s (rev. 0x%02x)\n", self->dv_xname, devinfo,
PCI_REVISION(pa->pa_class));
config_defer(self, pcmb_callback);