mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add dumping of the ECDT table.
Courtesy of: USENIX hall track
This commit is contained in:
parent
87ad0260ff
commit
55d7ff9ea2
2 changed files with 29 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue