Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/acpitools/acpidump Don't define GAS adddess ID cons...



details:   https://anonhg.NetBSD.org/src/rev/81611034c412
branches:  trunk
changeset: 826470:81611034c412
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Sep 07 04:40:56 2017 +0000

description:
Don't define GAS adddess ID constants in acpidump.h and use actypes.h's
definitions. No functional change.

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c     |  25 ++++++++++++++-----------
 usr.sbin/acpitools/acpidump/acpidump.h |  13 +------------
 2 files changed, 15 insertions(+), 23 deletions(-)

diffs (94 lines):

diff -r 87f8dc58522d -r 81611034c412 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Thu Sep 07 04:05:21 2017 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Thu Sep 07 04:40:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.25 2017/09/04 08:12:29 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.26 2017/09/07 04:40:56 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.25 2017/09/04 08:12:29 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.26 2017/09/07 04:40:56 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -211,7 +211,7 @@
 acpi_print_gas(ACPI_GENERIC_ADDRESS *gas)
 {
        switch(gas->SpaceId) {
-       case ACPI_GAS_MEMORY:
+       case ACPI_ADR_SPACE_SYSTEM_MEMORY:
                if (gas->BitWidth <= 32)
                        printf("0x%08x:%u[%u] (Memory)",
                            (u_int)gas->Address, gas->BitOffset,
@@ -221,28 +221,31 @@
                            (uintmax_t)gas->Address, gas->BitOffset,
                            gas->BitWidth);
                break;
-       case ACPI_GAS_IO:
+       case ACPI_ADR_SPACE_SYSTEM_IO:
                printf("0x%02x:%u[%u] (IO)", (u_int)gas->Address,
                    gas->BitOffset, gas->BitWidth);
                break;
-       case ACPI_GAS_PCI:
+       case ACPI_ADR_SPACE_PCI_CONFIG:
                printf("%x:%x+0x%x (PCI)", (uint16_t)(gas->Address >> 32),
                       (uint16_t)((gas->Address >> 16) & 0xffff),
                       (uint16_t)gas->Address);
                break;
        /* XXX How to handle these below? */
-       case ACPI_GAS_EMBEDDED:
+       case ACPI_ADR_SPACE_EC:
                printf("0x%x:%u[%u] (EC)", (uint16_t)gas->Address,
                       gas->BitOffset, gas->BitWidth);
                break;
-       case ACPI_GAS_SMBUS:
+       case ACPI_ADR_SPACE_SMBUS:
                printf("0x%x:%u[%u] (SMBus)", (uint16_t)gas->Address,
                       gas->BitOffset, gas->BitWidth);
                break;
-       case ACPI_GAS_CMOS:
-       case ACPI_GAS_PCIBAR:
-       case ACPI_GAS_DATATABLE:
-       case ACPI_GAS_FIXED:
+       case ACPI_ADR_SPACE_CMOS:
+       case ACPI_ADR_SPACE_PCI_BAR_TARGET:
+       case ACPI_ADR_SPACE_IPMI:
+       case ACPI_ADR_SPACE_GPIO:
+       case ACPI_ADR_SPACE_GSBUS:
+       case ACPI_ADR_SPACE_PLATFORM_COMM:
+       case ACPI_ADR_SPACE_FIXED_HARDWARE:
        default:
                printf("0x%016jx (SpaceID=%hhu)", (uintmax_t)gas->Address,
                    gas->SpaceId);
diff -r 87f8dc58522d -r 81611034c412 usr.sbin/acpitools/acpidump/acpidump.h
--- a/usr.sbin/acpitools/acpidump/acpidump.h    Thu Sep 07 04:05:21 2017 +0000
+++ b/usr.sbin/acpitools/acpidump/acpidump.h    Thu Sep 07 04:40:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpidump.h,v 1.6 2017/08/04 06:30:36 msaitoh Exp $ */
+/* $NetBSD: acpidump.h,v 1.7 2017/09/07 04:40:56 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1999 Doug Rabson
@@ -36,17 +36,6 @@
 #include <acpi_common.h>
 #include <dev/acpi/acpica.h>
 
-/* GAS address space ID constants. */
-#define        ACPI_GAS_MEMORY         0
-#define        ACPI_GAS_IO             1
-#define        ACPI_GAS_PCI            2
-#define        ACPI_GAS_EMBEDDED       3
-#define        ACPI_GAS_SMBUS          4
-#define        ACPI_GAS_CMOS           5
-#define        ACPI_GAS_PCIBAR         6
-#define        ACPI_GAS_DATATABLE      7
-#define        ACPI_GAS_FIXED          0x7f
-
 /* Subfields in the HPET Id member. */
 #define        ACPI_HPET_ID_HARDWARE_REV_ID    0x000000ff
 #define        ACPI_HPET_ID_COMPARATORS        0x00001f00



Home | Main Index | Thread Index | Old Index