-/* $OpenBSD: acpi.c,v 1.257 2014/04/25 14:37:06 mlarkin Exp $ */
+/* $OpenBSD: acpi.c,v 1.258 2014/05/21 02:14:07 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
acpi_matchhids(struct acpi_attach_args *aa, const char *hids[],
const char *driver)
{
-
if (aa->aaa_dev == NULL || aa->aaa_node == NULL)
return (0);
if (_acpi_matchhids(aa->aaa_dev, hids)) {
- dnprintf(5, "driver %s matches %s\n", driver, hids);
+ dnprintf(5, "driver %s matches at least one hid\n", driver);
return (1);
}
+
return (0);
}
#endif /* SMALL_KERNEL */
break;
}
if (size && addr) {
- dnprintf(50, "mapping: %.4x %.4x %s\n",
+ dnprintf(50, "mapping: %.4lx %.4lx %s\n",
addr, size, name);
/* Size and address exist; map register space */
-/* $OpenBSD: acpicpu.c,v 1.57 2010/07/21 19:35:15 deraadt Exp $ */
+/* $OpenBSD: acpicpu.c,v 1.58 2014/05/21 02:14:07 mlarkin Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
#ifdef ACPI_DEBUG
printf(": %s: ", sc->sc_devnode->name);
printf("\n: hdr:%x pblk:%x,%x duty:%x,%x pstate:%x "
- "(%d throttling states)\n", sc->sc_acpi->sc_fadt->hdr_revision,
+ "(%ld throttling states)\n", sc->sc_acpi->sc_fadt->hdr_revision,
sc->sc_pblk_addr, sc->sc_pblk_len, sc->sc_duty_off,
sc->sc_duty_wid, sc->sc_acpi->sc_fadt->pstate_cnt,
CPU_MAXSTATE(sc));
goto ffh;
}
- dnprintf(10, "_PCT(ctrl) : %02x %04x %02x %02x %02x %02x %016x\n",
+ dnprintf(10, "_PCT(ctrl) : %02x %04x %02x %02x %02x %02x %016llx\n",
sc->sc_pct.pct_ctrl.grd_descriptor,
sc->sc_pct.pct_ctrl.grd_length,
sc->sc_pct.pct_ctrl.grd_gas.address_space_id,
sc->sc_pct.pct_ctrl.grd_gas.access_size,
sc->sc_pct.pct_ctrl.grd_gas.address);
- dnprintf(10, "_PCT(status): %02x %04x %02x %02x %02x %02x %016x\n",
+ dnprintf(10, "_PCT(status): %02x %04x %02x %02x %02x %02x %016llx\n",
sc->sc_pct.pct_status.grd_descriptor,
sc->sc_pct.pct_status.grd_length,
sc->sc_pct.pct_status.grd_gas.address_space_id,
-/* $OpenBSD: acpiec.c,v 1.48 2013/07/02 18:37:47 kettenis Exp $ */
+/* $OpenBSD: acpiec.c,v 1.49 2014/05/21 02:14:07 mlarkin Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
*
u_int8_t val;
acpiec_wait(sc, EC_STAT_OBF, EC_STAT_OBF);
- dnprintf(40, "acpiec: read_data\n", (int)val);
val = bus_space_read_1(sc->sc_data_bt, sc->sc_data_bh, 0);
+ dnprintf(40, "acpiec: read_data %d\n", (int)val);
+
return (val);
}
/* XXX: todo - validate _CRS checksum? */
ecdtdone:
- dnprintf(10, "%s: Data: 0x%x, S/C: 0x%x\n",
+ dnprintf(10, "%s: Data: 0x%lx, S/C: 0x%lx\n",
DEVNAME(sc), ec_data, ec_sc);
if (ctype == GAS_SYSTEM_IOSPACE)
-/* $OpenBSD: atk0110.c,v 1.8 2014/02/21 16:25:57 deraadt Exp $ */
+/* $OpenBSD: atk0110.c,v 1.9 2014/05/21 02:14:07 mlarkin Exp $ */
/*
* Copyright (c) 2009 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>
}
if (aml_evalnode(sc->sc_acpi, n, 1, &req, &res)) {
- dprintf("%s: %s: %i: evaluation failed\n",
+ dprintf("%s: %s: %lld: evaluation failed\n",
DEVNAME(sc), n->name, i);
aml_freevalue(&res);
return (-1);
}
if (res.type != type) {
- dprintf("%s: %s: %i: not an integer: type %i\n",
+ dprintf("%s: %s: %lld: not an integer: type %i\n",
DEVNAME(sc), n->name, i, res.type);
aml_freevalue(&res);
return (-1);
if (sc->sc_mode) {
if (res.length < sizeof(ret)) {
- dprintf("%s: %s: %i: result buffer too small\n",
+ dprintf("%s: %s: %lld: result buffer too small\n",
DEVNAME(sc), n->name, i);
aml_freevalue(&res);
return (-1);
}
bcopy(res.v_buffer, &ret, sizeof(ret));
if (ret.flags == 0) {
- dprintf("%s: %s: %i: bad flags in result\n",
+ dprintf("%s: %s: %lld: bad flags in result\n",
DEVNAME(sc), n->name, i);
aml_freevalue(&res);
return (-1);
req.v_integer = i;
if (aml_evalnode(sc->sc_acpi, n, 1, &req, res)) {
- dprintf("%s: %s: %i: evaluation failed\n",
+ dprintf("%s: %s: %lld: evaluation failed\n",
DEVNAME(sc), n->name, i);
aml_freevalue(res);
return (-1);
}
if (res->type != AML_OBJTYPE_PACKAGE) {
- dprintf("%s: %s: %i: not a package: type %i\n",
+ dprintf("%s: %s: %lld: not a package: type %i\n",
DEVNAME(sc), n->name, i, res->type);
aml_freevalue(res);
return (-1);
-/* $OpenBSD: dsdt.c,v 1.208 2014/05/02 14:04:50 kettenis Exp $ */
+/* $OpenBSD: dsdt.c,v 1.209 2014/05/21 02:14:07 mlarkin Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
struct acpi_memblock *sptr;
sptr = malloc(size+sizeof(*sptr), M_ACPI, M_WAITOK | M_ZERO);
- dnprintf(99, "alloc: %x %s:%d\n", sptr, fn, line);
+ dnprintf(99, "alloc: %p %s:%d\n", sptr, fn, line);
acpi_nalloc += size;
sptr->size = size;
#ifdef ACPI_MEMDEBUG
LIST_REMOVE(sptr, link);
#endif
- dnprintf(99, "free: %x %s:%d\n", sptr, fn, line);
+ dnprintf(99, "free: %p %s:%d\n", sptr, fn, line);
free(sptr, M_ACPI);
}
}
struct aml_notify_data *pdata;
extern int acpi_poll_enabled;
- dnprintf(10, "aml_register_notify: %s %s %x\n",
+ dnprintf(10, "aml_register_notify: %s %s %p\n",
node->name, pnpid ? pnpid : "", proc);
pdata = acpi_os_malloc(sizeof(struct aml_notify_data));
case AML_OBJTYPE_BUFFERFIELD:
case AML_OBJTYPE_FIELDUNIT:
my_ret = aml_allocvalue(0,0,NULL);
- dnprintf(20,"quick: Convert Bufferfield to %c 0x%x\n",
+ dnprintf(20,"quick: Convert Bufferfield to %c %p\n",
ret_type, my_ret);
aml_rwfield(tmp, 0, tmp->v_field.bitlen, my_ret, ACPI_IOREAD);
break;
case AMLOP_NOTIFY:
/* Notify: Si */
rv = aml_gettgt(opargs[0], opcode);
- dnprintf(50,"Notifying: %s %x\n",
+ dnprintf(50,"Notifying: %s %llx\n",
aml_nodename(rv->node),
opargs[1]->v_integer);
aml_notify(rv->node, opargs[1]->v_integer);
memset(res, 0, sizeof(*res));
if (node == NULL || node->value == NULL)
return (ACPI_E_BADVALUE);
- dnprintf(12,"EVALNODE: %s %d\n", aml_nodename(node), acpi_nalloc);
+ dnprintf(12,"EVALNODE: %s %lx\n", aml_nodename(node), acpi_nalloc);
aml_error = 0;
xres = aml_eval(NULL, node->value, 't', argc, argv);
char nseg[AML_NAMESEG_LEN + 1];
int i;
- dnprintf(25,"Searchname: %s:%s = ", aml_nodename(root), vname);
+ dnprintf(25,"Searchname: %s:%s = ", aml_nodename(root), name);
while (*name == AMLOP_ROOTCHAR) {
root = &aml_root;
name++;