]> git.sur5r.net Git - u-boot/commitdiff
efi_loader: helloworld: Output ACPI configuration table
authorBin Meng <bmeng.cn@gmail.com>
Thu, 28 Jun 2018 03:38:04 +0000 (20:38 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 2 Jul 2018 01:23:28 +0000 (09:23 +0800)
Output ACPI configuration table if it exists.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/helloworld.c

index 046b46a2c1b38c87da074b5892147f887dbb3733..3b8de5b4ea76b1d39eaaaad2d7d8ded30d0972bc 100644 (file)
@@ -14,6 +14,7 @@
 
 static const efi_guid_t loaded_image_guid = LOADED_IMAGE_GUID;
 static const efi_guid_t fdt_guid = EFI_FDT_GUID;
+static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID;
 static const efi_guid_t smbios_guid = SMBIOS_TABLE_GUID;
 
 static int hw_memcmp(const void *buf1, const void *buf2, size_t length)
@@ -79,6 +80,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
                if (!hw_memcmp(&systable->tables[i].guid, &fdt_guid,
                               sizeof(efi_guid_t)))
                        con_out->output_string(con_out, L"Have device tree\n");
+               if (!hw_memcmp(&systable->tables[i].guid, &acpi_guid,
+                              sizeof(efi_guid_t)))
+                       con_out->output_string(con_out, L"Have ACPI 2.0 table\n");
                if (!hw_memcmp(&systable->tables[i].guid, &smbios_guid,
                               sizeof(efi_guid_t)))
                        con_out->output_string(con_out, L"Have SMBIOS table\n");