
On Sat, Sep 2, 2023 at 1:27 AM Simon Glass sjg@chromium.org wrote:
Each board has its own way of creating this table. Rather than calling the acpi_create_fadt() function for each one from a common acpi_write_fadt() function, just move the writer into the board-specific code.
Co-developed-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Signed-off-by: Simon Glass sjg@chromium.org Tested-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
(Now fixed - thank you Andy!)
Make another attempt to land this. It apparently breaks Edison but I cannot test that board, nor can I work out what is wrong with the code.
Previous test report is here:
https://lore.kernel.org/all/Yga9Z7sBFAeV64FV@smile.fi.intel.com/
Looking at the image, the method is definitely present:
$ nm /tmp/b/edison/u-boot |grep acpi_writer 0115fde0 D _u_boot_list_2_acpi_writer_2_0base 0115fdf0 D _u_boot_list_2_acpi_writer_2_1facs 0115fe00 D _u_boot_list_2_acpi_writer_2_3dsdt 0115fe10 D _u_boot_list_2_acpi_writer_2_4gnvs 0115fe20 D _u_boot_list_2_acpi_writer_2_5csrt 0115fe30 D _u_boot_list_2_acpi_writer_2_5fadt 0115fe40 D _u_boot_list_2_acpi_writer_2_5mcfg 0115fe50 D _u_boot_list_2_acpi_writer_2_5spcr 0115fe60 D _u_boot_list_2_acpi_writer_2_5tcpa 0115fe70 D _u_boot_list_2_acpi_writer_2_5tpm2 0115fe80 D _u_boot_list_2_acpi_writer_2_5x86 0115fe90 D _u_boot_list_2_acpi_writer_2_6ssdt 0115fea0 D _u_boot_list_2_acpi_writer_2_8dev
I wonder if the code in quark_write_fadt() is not being called?
'acpi list' shows what tables are installed. On minnowmax there is no difference with or without this patch. Perhaps someone with sharper eyes than me can figure this out?
The mechanism is that the functions to be called are put in a linker list, each element being declared using ACPI_WRITER(function_name).
Then acpi_write_all() is called to write each one. Debugging could be added to that function, perhaps?
Changes in v3:
- None (just added the tags since patchwork doesn't do Co-developed-by)
Changes in v2:
- Squash in the fix from Andy Shevchenko
arch/x86/cpu/apollolake/acpi.c | 17 +++++++++++++---- arch/x86/cpu/baytrail/acpi.c | 27 +++++++++++++++++++-------- arch/x86/cpu/quark/acpi.c | 27 +++++++++++++++++++-------- arch/x86/cpu/tangier/acpi.c | 27 +++++++++++++++++++-------- arch/x86/include/asm/acpi_table.h | 2 -- arch/x86/lib/acpi_table.c | 15 --------------- 6 files changed, 70 insertions(+), 45 deletions(-)
series applied to u-boot-x86/next, thanks!