diff options
author | njl <njl@FreeBSD.org> | 2003-09-10 23:52:12 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2003-09-10 23:52:12 +0000 |
commit | e0b3f83077ff7109768b518dd965eaf6c96daa1f (patch) | |
tree | 385d3de804d2b10a27476bdd5190eb11e32f06c7 /usr.sbin | |
parent | 6dce2e8fe5317b2cf5deb33b817756dad7a491aa (diff) | |
download | FreeBSD-src-e0b3f83077ff7109768b518dd965eaf6c96daa1f.zip FreeBSD-src-e0b3f83077ff7109768b518dd965eaf6c96daa1f.tar.gz |
Add dumping of the ECDT table.
Courtesy of: USENIX hall track
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/acpi/acpidump/acpi.c | 20 | ||||
-rw-r--r-- | usr.sbin/acpi/acpidump/acpidump.h | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 92be215..830e93c 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -338,6 +338,24 @@ acpi_handle_hpet(struct ACPIsdt *sdp) } static void +acpi_handle_ecdt(struct ACPIsdt *sdp) +{ + struct ECDTbody *ecdt; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + ecdt = (struct ECDTbody *) sdp->body; + printf("\tEC_CONTROL="); + acpi_print_gas(&ecdt->ec_control); + printf("\n\tEC_DATA="); + acpi_print_gas(&ecdt->ec_data); + printf("\n\tUID=%#x, ", ecdt->uid); + printf("GPE_BIT=%#x\n", ecdt->gpe_bit); + printf("\tEC_ID=%s\n", ecdt->ec_id); + printf(END_COMMENT); +} + +static void acpi_print_sdt(struct ACPIsdt *sdp) { printf(" "); @@ -626,6 +644,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp) acpi_handle_apic(sdp); else if (!memcmp(sdp->signature, "HPET", 4)) acpi_handle_hpet(sdp); + else if (!memcmp(sdp->signature, "ECDT", 4)) + acpi_handle_ecdt(sdp); else { printf(BEGIN_COMMENT); acpi_print_sdt(sdp); diff --git a/usr.sbin/acpi/acpidump/acpidump.h b/usr.sbin/acpi/acpidump/acpidump.h index 783fc6d..0d13adc 100644 --- a/usr.sbin/acpi/acpidump/acpidump.h +++ b/usr.sbin/acpi/acpidump/acpidump.h @@ -284,6 +284,15 @@ struct HPETbody { u_int16_t clock_tick __packed; } __packed; +/* Embedded Controller Description Table */ +struct ECDTbody { + struct ACPIgas ec_control; /* Control register */ + struct ACPIgas ec_data; /* Data register */ + uint32_t uid; /* Same value as _UID in namespace */ + uint8_t gpe_bit; /* GPE bit for the EC */ + u_char ec_id[1]; /* Variable length name string */ +} __packed; + /* Find and map the RSD PTR structure and return it for parsing */ struct ACPIsdt *sdt_load_devmem(void); |