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

Stefan Roese
2016-05-03T13:01:31Z

Hi Bin,

thank you very much for this patch series. I've given the patchset
a quick review and tested it shortly on the BayTrail Congatec
board. And have seen no issues so far. Shutdown and reboot also
seem to work just fine. I'll definitely give it a more thorough
test in the next days / weeks.

I've sent you a few minor comments to some of the patches. But
please add my:

Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>

to all patches.

Thanks,
Stefan

On 02.05.2016 09:33, Bin Meng 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 only, no S3/S4 boot path support yet.
> * No ACPI global NVS support (this can be optional, but we may need it in
> the future to simplify ASL code logic when utilizing NVS variables).
> * No dynamic AML bytecodes insertion at run-time (this is optional as we
> can always describe the board in the static way).
> * All ACPI interrupts are routed to SCI for OS to handle. No legacy SMI
> implementation within U-Boot.
> * Install Ubuntu from U-Boot plus SeaBIOS does not work.
> * Install Windows 8.1/10 from U-Boot plus SeaBIOS does not work.
>
> 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.
>
> This series is available at u-boot-x86/acpi-working.
>
>
> Bin Meng (26):
> 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: Do not disable all errors/warnings/remarks when compiling ASL
> x86: acpi: Remove unneeded codes
> x86: acpi: Various changes to acpi_table.h
> x86: acpi: Reorder codes in acpi_table.h
> x86: acpi: Remove acpi_create_ssdt_generator()
> x86: acpi: Change fill_header()
> x86: acpi: Adjust orders in acpi_table.c
> x86: acpi: Change table write routine signature to use u32
> x86: acpi: Align FACS table to a 64 byte boundary
> x86: acpi: Add some generic ASL libraries
> 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 | 162 +++++++
> arch/x86/cpu/irq.c | 29 ++
> 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 | 447 ++++++++-----------
> .../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 | 34 ++
> .../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 | 311 ++++++-------
> 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 | 76 +++-
> doc/device-tree-bindings/misc/intel,irq-router.txt | 5 +
> include/configs/x86-common.h | 9 +-
> scripts/Makefile.lib | 8 +-
> 52 files changed, 2368 insertions(+), 491 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
>

Viele Gr??e,
Stefan

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de