[U-Boot] [PATCH v2 00/28] x86: Initial ACPI support for Intel BayTrail

Simon Glass sjg at chromium.org
Sat May 7 20:45:49 CEST 2016


Hi Bin,

On 7 May 2016 at 08:46, Bin Meng <bmeng.cn at gmail.com> wrote:
> This series introduces initial ACPI support for Intel BayTrail.
>
> Advanced Configuration and Power Interface (ACPI) aims to establish
> industry-standard interfaces enabling OS-directed configuration, power
> management, and thermal management of mobile, desktop, and server platforms.
>
> Linux can boot without ACPI with "acpi=off" command line parameter, but
> with ACPI the kernel gains the capabilities to handle power management.
> For Windows, ACPI is a must-have firmware feature since Windows Vista.
> CONFIG_GENERATE_ACPI_TABLE is the config option to turn on ACPI support in
> U-Boot. This requires Intel ACPI compiler to be installed on your host to
> compile ACPI DSDT table written in ASL format to AML format. You can get
> the compiler via "apt-get install iasl" if you are on Ubuntu or download
> the source from acpica website to compile one by yourself.
>
> Current ACPI support in U-Boot is not complete. More features will be added
> in the future. The status as of today is:
>
>  * Support generating RSDT, XSDT, FACS, FADT, MADT, MCFG tables.
>  * Support one static DSDT table only, compiled by Intel ACPI compiler.
>  * Support S0/S5, reboot and shutdown from OS.
>  * Support booting a pre-installed Ubuntu distribution via 'zboot' command.
>  * Support ACPI interrupts with SCI only.
>
> Features not supported so far (to make it a complete ACPI solution):
>  * S3 (Suspend to RAM), S4 (Suspend to Disk).
>  * Install and boot Ubuntu 14.04 (or above) from U-Boot with legacy interface.
>  * Install and boot Windows 8.1/10 from U-Boot with legacy interface.
>
> Features that are optional:
>  * ACPI global NVS support. We may need it to simplify ASL code logic if
>    utilizing NVS variables. Most likely we will need this sooner or later.
>  * Dynamic AML bytecodes insertion at run-time. We may need this to support
>    SSDT table generation and DSDT fix up.
>  * SMI support. Since U-Boot is a modern bootloader, we don't want to bring
>    those legacy stuff into U-Boot. ACPI spec allows a system that does not
>    support SMI (a legacy-free system).
>
> So far ACPI is enabled on BayTrail based boards. Testing was done by booting
> a pre-installed Ubuntu 14.04 from a SATA drive. Most devices seem to work
> correctly and the board can respond a reboot/shutdown command from Ubuntu.

It's great to see this - a big step forward!

A few general comments:
- when building, the Intel ACPI tools output some non-warning info -
can you quieten this down? It should not appear when 'make -s' is used
- is it OK to enable other tables along with ACPI? The docs seem to be
silent on this point
- for me Ubuntu does not offer an option in the GUI to restart...I can
do it from the command line. On my normal desktop I see a power button
in the top right. I wonder why this doesn't work on minnowmax?

>
> This series is available at u-boot-x86/acpi-working.
>
> Changes in v2:
> - Change to use IS_ENABLED()
> - Change commit subject per review comments
> - Update commit message to mention the reason of adding __packed
> - Update the commit message per review comments
> - Change 'orders' to 'order' in the commit subject
> - Correct wrong indention in acpi_create_madt_lapics()
> - Update several more places to use u32 in acpi_table.c
> - Add comments before the 64 byte alignment for FACS
> - New patch to clean up table header revisions
> - New patch to return table length in acpi_create_madt_lapics()
> - Reserve IRQ3 and IRQ4 in the IRQ links to support external SuperIO
>   chipset serial ports
> - Fix SIO1 and SIO2 interrupt mapping in irqroute.h
> - Use existing macros in FADT whenever possible
> - Rename acpi_madt_irq_overrides() to acpi_create_madt_irq_overrides()
>   for consistency, and make it static
> - Return table length in acpi_create_madt_irq_overrides() so that the
>   code logic in acpi_fill_madt() looks consistent (eg: current += ...)
> - Update support board list, adding Congatec QEVAL 2.0 & conga-QA3/E3845
> - Update ACPI support status in more details: what's supported,
>   what's not supported, what's optional.
>
> Bin Meng (28):
>   x86: Drop asm/acpi.h
>   x86: Fix build warning in tables.c when CONFIG_SEABIOS
>   x86: acpi: Fix compiler warnings in write_acpi_tables()
>   x86: irq: Reserve IRQ9 for ACPI in PIC mode
>   x86: irq: Enable SCI on IRQ9
>   x86: dts: Update to include ACTL register details
>   acpi: Change build log for ASL files
>   acpi: Explicitly spell out dsdt.c in the make rule
>   acpi: Specify U-Boot include path for ASL files
>   acpi: Output all errors/warnings/remarks when compiling ASL
>   x86: acpi: Remove unused codes
>   x86: acpi: Various changes to acpi_table.h
>   x86: acpi: Reorder code in acpi_table.h
>   x86: acpi: Remove acpi_create_ssdt_generator()
>   x86: acpi: Change fill_header()
>   x86: acpi: Adjust order in acpi_table.c
>   x86: acpi: Use u32 in table write routines
>   x86: acpi: Align FACS table to a 64 byte boundary
>   x86: acpi: Clean up table header revisions
>   x86: acpi: Add some generic ASL libraries
>   x86: acpi: Return table length in acpi_create_madt_lapics()
>   x86: baytrail: Add platform ASL files
>   x86: baytrail: Generate ACPI FADT/MADT tables
>   x86: baytrail: Enable ACPI table generation for all boards
>   x86: baytrail: Add .gitignore for ACPI enabled boards
>   x86: Remove acpi=off boot parameter when ACPI is on
>   x86: doc: Minor update for accuracy
>   x86: doc: Document ACPI support
>
>  arch/x86/cpu/baytrail/Makefile                     |   1 +
>  arch/x86/cpu/baytrail/acpi.c                       | 163 +++++++
>  arch/x86/cpu/irq.c                                 |  30 ++
>  arch/x86/cpu/ivybridge/lpc.c                       |   1 -
>  arch/x86/cpu/ivybridge/model_206ax.c               |   1 -
>  arch/x86/cpu/ivybridge/northbridge.c               |   1 -
>  arch/x86/dts/bayleybay.dts                         |   1 +
>  arch/x86/dts/conga-qeval20-qa3-e3845.dts           |   1 +
>  arch/x86/dts/crownbay.dts                          |   1 +
>  arch/x86/dts/galileo.dts                           |   1 +
>  arch/x86/dts/minnowmax.dts                         |   1 +
>  arch/x86/dts/qemu-x86_q35.dts                      |   2 +
>  arch/x86/include/asm/acpi.h                        |  24 -
>  arch/x86/include/asm/acpi/debug.asl                | 136 ++++++
>  arch/x86/include/asm/acpi/globutil.asl             | 113 +++++
>  arch/x86/include/asm/acpi/statdef.asl              |  82 ++++
>  arch/x86/include/asm/acpi_table.h                  | 443 ++++++++-----------
>  .../include/asm/arch-baytrail/acpi/irq_helper.h    | 111 +++++
>  .../include/asm/arch-baytrail/acpi/irqlinks.asl    | 489 +++++++++++++++++++++
>  .../include/asm/arch-baytrail/acpi/irqroute.asl    |  48 ++
>  arch/x86/include/asm/arch-baytrail/acpi/irqroute.h |  27 ++
>  arch/x86/include/asm/arch-baytrail/acpi/lpc.asl    | 121 +++++
>  .../include/asm/arch-baytrail/acpi/platform.asl    |  33 ++
>  .../include/asm/arch-baytrail/acpi/sleepstates.asl |  13 +
>  .../asm/arch-baytrail/acpi/southcluster.asl        | 211 +++++++++
>  arch/x86/include/asm/arch-baytrail/acpi/usb.asl    |  34 ++
>  arch/x86/include/asm/arch-baytrail/acpi/xhci.asl   |  31 ++
>  arch/x86/include/asm/arch-baytrail/device.h        |  74 ++++
>  arch/x86/include/asm/arch-baytrail/iomap.h         |  70 +++
>  arch/x86/include/asm/arch-baytrail/irq.h           |  86 ++++
>  arch/x86/include/asm/irq.h                         |   4 +
>  arch/x86/lib/acpi_table.c                          | 342 +++++++-------
>  arch/x86/lib/tables.c                              |   1 +
>  board/congatec/conga-qeval20-qa3-e3845/.gitignore  |   3 +
>  board/congatec/conga-qeval20-qa3-e3845/Makefile    |   1 +
>  .../conga-qeval20-qa3-e3845/acpi/mainboard.asl     |  13 +
>  board/congatec/conga-qeval20-qa3-e3845/dsdt.asl    |  14 +
>  board/intel/bayleybay/.gitignore                   |   3 +
>  board/intel/bayleybay/Makefile                     |   1 +
>  board/intel/bayleybay/acpi/mainboard.asl           |  11 +
>  board/intel/bayleybay/dsdt.asl                     |  14 +
>  board/intel/minnowmax/.gitignore                   |   3 +
>  board/intel/minnowmax/Makefile                     |   1 +
>  board/intel/minnowmax/acpi/mainboard.asl           |  11 +
>  board/intel/minnowmax/dsdt.asl                     |  14 +
>  configs/bayleybay_defconfig                        |   1 +
>  configs/conga-qeval20-qa3-e3845_defconfig          |   1 +
>  configs/minnowmax_defconfig                        |   1 +
>  doc/README.x86                                     |  85 +++-
>  doc/device-tree-bindings/misc/intel,irq-router.txt |   5 +
>  include/configs/x86-common.h                       |   9 +-
>  scripts/Makefile.lib                               |   8 +-
>  52 files changed, 2388 insertions(+), 508 deletions(-)
>  create mode 100644 arch/x86/cpu/baytrail/acpi.c
>  delete mode 100644 arch/x86/include/asm/acpi.h
>  create mode 100644 arch/x86/include/asm/acpi/debug.asl
>  create mode 100644 arch/x86/include/asm/acpi/globutil.asl
>  create mode 100644 arch/x86/include/asm/acpi/statdef.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/irq_helper.h
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/irqlinks.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/irqroute.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/irqroute.h
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/lpc.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/platform.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/sleepstates.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/southcluster.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/usb.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/acpi/xhci.asl
>  create mode 100644 arch/x86/include/asm/arch-baytrail/device.h
>  create mode 100644 arch/x86/include/asm/arch-baytrail/iomap.h
>  create mode 100644 arch/x86/include/asm/arch-baytrail/irq.h
>  create mode 100644 board/congatec/conga-qeval20-qa3-e3845/.gitignore
>  create mode 100644 board/congatec/conga-qeval20-qa3-e3845/acpi/mainboard.asl
>  create mode 100644 board/congatec/conga-qeval20-qa3-e3845/dsdt.asl
>  create mode 100644 board/intel/bayleybay/.gitignore
>  create mode 100644 board/intel/bayleybay/acpi/mainboard.asl
>  create mode 100644 board/intel/bayleybay/dsdt.asl
>  create mode 100644 board/intel/minnowmax/.gitignore
>  create mode 100644 board/intel/minnowmax/acpi/mainboard.asl
>  create mode 100644 board/intel/minnowmax/dsdt.asl
>
> --
> 1.8.2.1
>


More information about the U-Boot mailing list