Skip to content

Commit

Permalink
efi_loader: helloworld: Output ACPI configuration table
Browse files Browse the repository at this point in the history
Output ACPI configuration table if it exists.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
lbmeng committed Jul 2, 2018
1 parent 86df34d commit 47cae01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/efi_loader/helloworld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 47cae01

Please sign in to comment.