[PATCH v2 28/35] acpi: Record the items added to SSDT
Wolfgang Wallner
wolfgang.wallner at br-automation.com
Thu Jun 4 13:54:06 CEST 2020
Hi Simon,
-----"Simon Glass" <sjg at chromium.org> schrieb: -----
> Betreff: [PATCH v2 28/35] acpi: Record the items added to SSDT
>
> It is useful to be able to control the order of data written to the SSDT
> so that we can compare the output against known-good kernel dumps.
>
> Add code to record each item that is added along with the device that
> added it. That allows us to reorder things later if needed.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
> Changes in v1:
> - Generalise the ACPI function recursion with acpi_recurse_method()
>
> drivers/core/acpi.c | 83 ++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 79 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
> index 4497b5cb2f..fa16be8154 100644
> --- a/drivers/core/acpi.c
> +++ b/drivers/core/acpi.c
> @@ -9,12 +9,21 @@
> #define LOG_CATEOGRY LOGC_ACPI
>
> #include <common.h>
> +#include <malloc.h>
> #include <dm.h>
> #include <log.h>
> #include <dm/acpi.h>
> #include <dm/device-internal.h>
> #include <dm/root.h>
>
> +#define MAX_ITEMS 100
Nit: How about MAX_ACPI_ITEMS?
> +
> +/* Type of table that we collected */
> +enum gen_type_t {
> + TYPE_NONE,
> + TYPE_SSDT,
> +};
> +
> /* Type of method to call */
> enum method_t {
> METHOD_WRITE_TABLES,
[snip]
Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
More information about the U-Boot
mailing list