Add dumping of the ECDT table.

Courtesy of:	USENIX hall track
This commit is contained in:
Nate Lawson 2003-09-10 23:52:12 +00:00
parent 87ad0260ff
commit 55d7ff9ea2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119971
2 changed files with 29 additions and 0 deletions

View File

@ -337,6 +337,24 @@ acpi_handle_hpet(struct ACPIsdt *sdp)
printf(END_COMMENT);
}
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)
{
@ -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);

View File

@ -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);