[PATCH v3 19/29] acpi: Add a central location for table version numbers

Andy Shevchenko
2020-04-03T13:04:16Z

On Mon, Mar 30, 2020 at 05:12:55PM -0600, Simon Glass wrote:
> Each ACPI table has its own version number. Add the version numbers in a
> single function so we can keep them consistent and easily see what
> versions are supported.
>
> Start a new acpi_table file in a generic directory to house this function.
> We can move things over to this file from x86 as needed.

...

> +/* FADT TABLE Revision values */
> +#define ACPI_FADT_REV_ACPI_1_0 1
> +#define ACPI_FADT_REV_ACPI_2_0 3
> +#define ACPI_FADT_REV_ACPI_3_0 4
> +#define ACPI_FADT_REV_ACPI_4_0 4
> +#define ACPI_FADT_REV_ACPI_5_0 5
> +#define ACPI_FADT_REV_ACPI_6_0 6
> +
> +/* MADT TABLE Revision values */
> +#define ACPI_MADT_REV_ACPI_3_0 2
> +#define ACPI_MADT_REV_ACPI_4_0 3
> +#define ACPI_MADT_REV_ACPI_5_0 3
> +#define ACPI_MADT_REV_ACPI_6_0 5

Is it for real this fancy numbering? I don't remember spec by heart, perhaps
this needs to be elaborated in the comment.

...

> +/* Tables defined by ACPI and generated by U-Boot */
> +enum acpi_tables {

> + ACPITAB_BERT,
> + ACPITAB_DBG2,
> + ACPITAB_DMAR,
> + ACPITAB_DSDT,
> + ACPITAB_FACS,
> + ACPITAB_FADT,
> + ACPITAB_HEST,
> + ACPITAB_HPET,
> + ACPITAB_IVRS,
> + ACPITAB_MADT,
> + ACPITAB_MCFG,
> + ACPITAB_RSDP,
> + ACPITAB_RSDT,
> + ACPITAB_SLIT,
> + ACPITAB_SRAT,
> + ACPITAB_SSDT,
> + ACPITAB_TCPA,
> + ACPITAB_TPM2,
> + ACPITAB_XSDT,
> + ACPITAB_ECDT,

This should be cleaned according to uefi.org, i.e. not all above tables are
from ACPI spec. And thus, should be rather in the below section.

> +
> + /* Additional proprietary tables */
> + ACPITAB_VFCT,
> + ACPITAB_NHLT,
> + ACPITAB_SPMI,

Where is SPCR?

> +
> + ACPITAB_COUNT,
> +};

--
With Best Regards,
Andy Shevchenko