
3 Apr
2020
3 Apr
'20
3:39 p.m.
On Mon, Mar 30, 2020 at 05:13:05PM -0600, Simon Glass wrote:
It is useful to dump ACPI tables in U-Boot to see what has been generated. Add a command to handle this.
To allow the command to find the tables, add a position into the global data.
Support subcommands to list and dump the tables.
...
+static void dump_hdr(struct acpi_table_header *hdr) +{
- bool has_hdr = memcmp(hdr->signature, "FACS", ACPI_NAME_LEN);
I believe more than one table has the same header structure. Either this function is incorrectly called (should be dump_facs_hdr() or alike), or you need to make it better, i.e. generic.
- printf("%.*s %08lx %06x", ACPI_NAME_LEN, hdr->signature,
(ulong)map_to_sysmem(hdr), hdr->length);
- if (has_hdr) {
printf(" (v%02d %.6s %.8s %u %.4s %d)\n", hdr->revision,
hdr->oem_id, hdr->oem_table_id, hdr->oem_revision,
hdr->aslc_id, hdr->aslc_revision);
- } else {
printf("\n");
- }
+}
--
With Best Regards,
Andy Shevchenko