diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-10-15 16:47:13 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-10-15 16:47:13 +0000 |
commit | ad425595dc30a55d88ff246cce5d4bfcb462359f (patch) | |
tree | 784e728bc4fa9ce9666cf5ccaa45ebf1cbe99dec /sys/dev/acpi | |
parent | e9161acbb7778a0b7859d81e35568dea741869c0 (diff) |
fix broken scope braces
added debug print to gasio
ok marco@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/dsdt.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index 0fe67ccfc27..f7ce66f4fb4 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.52 2006/10/15 15:28:32 jordan Exp $ */ +/* $OpenBSD: dsdt.c,v 1.53 2006/10/15 16:47:12 jordan Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> * @@ -409,6 +409,14 @@ aml_gasio(struct acpi_softc *sc, int type, uint64_t base, uint64_t length, type, base, length, bitpos, bitlen, size, mode==ACPI_IOREAD?"read":"write"); acpi_gasio(sc, mode, type, base+(bitpos>>3), (size>>3), (bitlen>>3), buf); +#ifdef ACPI_DEBUG + while (bitlen > 0) { + dnprintf(0,"%.2x ", *(uint8_t *)buf); + buf++; + bitlen -=8; + } + dnprintf(0,"\n"); +#endif } /* @@ -872,6 +880,7 @@ aml_fieldio(struct aml_scope *scope, struct aml_value *field, mask = 63; break; } + mask++; /* Get aligned bitpos/bitlength */ blen = ((bpos & mask) + blen + mask) & ~mask; @@ -1281,9 +1290,10 @@ aml_setvalue(struct aml_scope *scope, struct aml_value *lhs, _aml_setvalue(lhs, AML_OBJTYPE_STRING, rhs->length, rhs->v_string); else if (rhs->type == AML_OBJTYPE_BUFFER) _aml_setvalue(lhs, AML_OBJTYPE_STRING, rhs->length, rhs->v_buffer); - else if (rhs->type == AML_OBJTYPE_INTEGER) + else if (rhs->type == AML_OBJTYPE_INTEGER) { _aml_setvalue(lhs, AML_OBJTYPE_STRING, 10, NULL); snprintf(lhs->v_string, lhs->length, "%lld", rhs->v_integer); + } else { //aml_showvalue(rhs); aml_die("setvalue.str"); |