[U-Boot] [PATCH v2 3/6] efi_loader: Install ACPI configuration tables

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Jun 27 16:48:56 UTC 2018


On 06/27/2018 12:16 PM, Bin Meng wrote:
> ACPI tables can be passed via EFI configuration table to an EFI
> application. This is only supported on x86 so far.
> 
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> 
> Changes in v2: None
> 
>  cmd/bootefi.c             |  5 +++++
>  include/efi_api.h         |  8 ++++++++
>  include/efi_loader.h      |  8 ++++++++
>  lib/efi_loader/Makefile   |  1 +
>  lib/efi_loader/efi_acpi.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 64 insertions(+)
>  create mode 100644 lib/efi_loader/efi_acpi.c
> 
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index f55a40d..cd755b6 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -61,6 +61,11 @@ efi_status_t efi_init_obj_list(void)
>  	if (ret != EFI_SUCCESS)
>  		goto out;
>  #endif
> +#ifdef CONFIG_GENERATE_ACPI_TABLE
> +	ret = efi_acpi_register();
> +	if (ret != EFI_SUCCESS)
> +		goto out;
> +#endif
>  #ifdef CONFIG_GENERATE_SMBIOS_TABLE
>  	ret = efi_smbios_register();
>  	if (ret != EFI_SUCCESS)
> diff --git a/include/efi_api.h b/include/efi_api.h
> index 094be6e..69dcbac 100644
> --- a/include/efi_api.h
> +++ b/include/efi_api.h
> @@ -286,6 +286,14 @@ struct efi_runtime_services {
>  	EFI_GUID(0xeb9d2d31, 0x2d88, 0x11d3,  \
>  		 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
>  
> +#define ACPI_TABLE_GUID \
> +	EFI_GUID(0xeb9d2d30, 0x2d88, 0x11d3, \
> +		 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)

This value is not used actually. The UEFI 2.7 spec mandates:
"ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID" (which is
identical to EFI_ACPI_20_TABLE_GUID).

As this value is deprecated and unused I would rather remove it.

> +
> +#define ACPI_20_TABLE_GUID \
> +	EFI_GUID(0x8868e871, 0xe4f1, 0x11d3, \
> +		 0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81)

The UEFI standard calls this value EFI_ACPI_20_TABLE_GUID or
EFI_ACPI_TABLE_GUID. Why should we give it another name in our code?

Best regards

Heinrich


More information about the U-Boot mailing list