diff options
| author | Tom Rini <[email protected]> | 2024-03-28 08:54:34 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-03-28 08:54:34 -0400 |
| commit | 24eb391e1ae4b8886e9db4f71417b44030325eb9 (patch) | |
| tree | 0fb5fd1d61e5ac3014212f16ba8998efdf1eb7ff /cmd | |
| parent | ab8d9ca3044acf51d8ff3bf3c4718c48f30ad606 (diff) | |
| parent | 6eca28b61af1835e70a6feb86f86a0b18b1708c6 (diff) | |
Merge tag 'acpi-next-20240328' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request acpi-next-20240328
ACPI:
* rename fields rename aslc_id, aslc_revision to match ACPI specification
* remove duplicate declaration of acpi_fill_header()
* document fields of HETP table
* MAINTAINERS: add include/acpi/ to ACPI
SMBIOS:
* provide wake-up type in SMBIOS table
* display wake-up type in smbios command
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/acpi.c | 2 | ||||
| -rw-r--r-- | cmd/smbios.c | 25 |
2 files changed, 24 insertions, 3 deletions
diff --git a/cmd/acpi.c b/cmd/acpi.c index 65caaa5c98e..928e5dc525e 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -32,7 +32,7 @@ static void dump_hdr(struct acpi_table_header *hdr) if (has_hdr) { printf(" v%02d %.6s %.8s %x %.4s %x\n", hdr->revision, hdr->oem_id, hdr->oem_table_id, hdr->oem_revision, - hdr->aslc_id, hdr->aslc_revision); + hdr->creator_id, hdr->creator_revision); } else { printf("\n"); } diff --git a/cmd/smbios.c b/cmd/smbios.c index 66f6b761378..d3bd8b12a67 100644 --- a/cmd/smbios.c +++ b/cmd/smbios.c @@ -14,6 +14,18 @@ DECLARE_GLOBAL_DATA_PTR; +static const char * const wakeup_type_strings[] = { + "Reserved", /* 0x00 */ + "Other", /* 0x01 */ + "Unknown", /* 0x02 */ + "APM Timer", /* 0x03 */ + "Modem Ring", /* 0x04 */ + "Lan Remote", /* 0x05 */ + "Power Switch", /* 0x06 */ + "PCI PME#", /* 0x07 */ + "AC Power Restored", /* 0x08 */ +}; + /** * smbios_get_string() - get SMBIOS string from table * @@ -72,6 +84,14 @@ void smbios_print_str(const char *label, void *table, u8 index) printf("\t%s: %s\n", label, smbios_get_string(table, index)); } +const char *smbios_wakeup_type_str(u8 wakeup_type) +{ + if (wakeup_type >= ARRAY_SIZE(wakeup_type_strings)) + /* Values over 0x08 are reserved. */ + wakeup_type = 0; + return wakeup_type_strings[wakeup_type]; +} + static void smbios_print_type1(struct smbios_type1 *table) { printf("System Information\n"); @@ -81,11 +101,12 @@ static void smbios_print_type1(struct smbios_type1 *table) smbios_print_str("Serial Number", table, table->serial_number); if (table->length >= 0x19) { printf("\tUUID: %pUl\n", table->uuid); - smbios_print_str("Wake Up Type", table, table->serial_number); + printf("\tWake-up Type: %s\n", + smbios_wakeup_type_str(table->wakeup_type)); } if (table->length >= 0x1b) { - smbios_print_str("Serial Number", table, table->serial_number); smbios_print_str("SKU Number", table, table->sku_number); + smbios_print_str("Family", table, table->family); } } |
