x86: quark: Add ACPI support
v2 cover x86: quark: Add ACPI support
This series adds basic ACPI support to Intel Quark platform, enables the support on the Intel Galileo board.
Testing was performed by booting Linux kernel from an SD card. All interrupts are routed to I/O APIC based on information provided in the ACPI tables, and typing 'reboot' from shell can successfully reboot to U-Boot.
This series is available at u-boot-x86/quark-acpi.
Changes in v2:
- Use __ASSEMBLY__ define
- Use __ASSEMBLY__ in device.h
Bin Meng (8):
x86: acpi: Create a common irqlinks ASL file
x86: acpi: Make irqroute.asl common
acpi: Pass -D__ASSEMBLY__ when compiling ASL files
x86: quark: Prepare device.h for inclusion by ASL
x86: quark: Add platform ASL files
x86: quark: Generate ACPI FADT/MADT tables
x86: galileo: Enable ACPI table generation
x86: baytrail: acpi: Fix I/O APIC ID in the MADT table
arch/x86/cpu/baytrail/acpi.c | 2 +-
arch/x86/cpu/quark/Makefile | 1 +
arch/x86/cpu/quark/acpi.c | 163 ++++++++++++++++++
.../asm/{arch-baytrail => }/acpi/irq_helper.h | 2 +-
.../asm/{arch-baytrail => }/acpi/irqlinks.asl | 33 ++--
.../asm/{arch-baytrail => }/acpi/irqroute.asl | 0
arch/x86/include/asm/arch-baytrail/acpi/lpc.asl | 23 ++-
.../asm/arch-baytrail/acpi/southcluster.asl | 2 +-
arch/x86/include/asm/arch-quark/acpi/irqroute.h | 15 ++
arch/x86/include/asm/arch-quark/acpi/lpc.asl | 125 ++++++++++++++
arch/x86/include/asm/arch-quark/acpi/platform.asl | 33 ++++
.../include/asm/arch-quark/acpi/sleepstates.asl | 10 ++
.../include/asm/arch-quark/acpi/southcluster.asl | 184 +++++++++++++++++++++
arch/x86/include/asm/arch-quark/device.h | 21 ++-
arch/x86/include/asm/arch-quark/iomap.h | 47 ++++++
arch/x86/include/asm/arch-quark/irq.h | 19 +++
board/intel/galileo/.gitignore | 3 +
board/intel/galileo/Makefile | 1 +
board/intel/galileo/acpi/mainboard.asl | 11 ++
board/intel/galileo/dsdt.asl | 14 ++
configs/galileo_defconfig | 1 +
doc/README.x86 | 5 +-
scripts/Makefile.lib | 2 +-
23 files changed, 685 insertions(+), 32 deletions(-)
create mode 100644 arch/x86/cpu/quark/acpi.c
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irq_helper.h (98%)
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqlinks.asl (92%)
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqroute.asl (100%)
create mode 100644 arch/x86/include/asm/arch-quark/acpi/irqroute.h
create mode 100644 arch/x86/include/asm/arch-quark/acpi/lpc.asl
create mode 100644 arch/x86/include/asm/arch-quark/acpi/platform.asl
create mode 100644 arch/x86/include/asm/arch-quark/acpi/sleepstates.asl
create mode 100644 arch/x86/include/asm/arch-quark/acpi/southcluster.asl
create mode 100644 arch/x86/include/asm/arch-quark/iomap.h
create mode 100644 arch/x86/include/asm/arch-quark/irq.h
create mode 100644 board/intel/galileo/.gitignore
create mode 100644 board/intel/galileo/acpi/mainboard.asl
create mode 100644 board/intel/galileo/dsdt.aslSignature · 1 line
1.8.2.1
PATCH v2 1/8 x86: acpi: Create a common irqlinks ASL file
Move the irqlinks.asl file currently in the BayTrail directory to a common place to be shared among all x86 platforms. As the PIRQ routing control programming interface is common to Intel chipsets, leave the common part in the common file, and move the platform specific part to the platform files.
---
Changes in v2: None
.../asm/{arch-baytrail => }/acpi/irqlinks.asl | 33 +++++++++-------------
arch/x86/include/asm/arch-baytrail/acpi/lpc.asl | 23 ++++++++++++++-
2 files changed, 35 insertions(+), 21 deletions(-)
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqlinks.asl (92%)arch/x86/include/asm/acpi/irqlinks.asl renamed from arch/x86/include/asm/arch-baytrail/acpi/irqlinks.asl +13 -20
@@ -7,26 +7,19 @@ * SPDX-License-Identifier: GPL-2.0+ */ -Scope (\) -{ - /* Intel Legacy Block */ - OperationRegion(ILBS, SystemMemory, ILB_BASE_ADDRESS, ILB_BASE_SIZE) - Field(ILBS, AnyAcc, NoLock, Preserve) { - Offset (0x8), - PRTA, 8, - PRTB, 8, - PRTC, 8, - PRTD, 8, - PRTE, 8, - PRTF, 8, - PRTG, 8, - PRTH, 8, - Offset (0x88), - , 3, - UI3E, 1, - UI4E, 1 - } -} +/* + * Intel chipset PIRQ routing control ASL description + * + * The programming interface is common to most Intel chipsets. But the PRTx + * registers may be mapped to different blocks. Some chipsets map them to LPC + * device (00:1f:00) PCI configuration space (like TunnelCreek, Quark), while + * some newer Atom SoCs (like BayTrail, Braswell) map them to Intel Legacy + * Block (ILB) memory space. + * + * This file defines 8 PCI IRQ link devices which corresponds to 8 PIRQ lines + * PIRQ A/B/C/D/E/F/G/H. To incorperate this file, the PRTx registers must be + * defined somewhere else in the platform's ASL files. + */ Device (LNKA) {
arch/x86/include/asm/arch-baytrail/acpi/lpc.asl +22 -1
@@ -10,6 +10,27 @@ /* Intel LPC Bus Device - 0:1f.0 */ +Scope (\) +{ + /* Intel Legacy Block */ + OperationRegion(ILBS, SystemMemory, ILB_BASE_ADDRESS, ILB_BASE_SIZE) + Field(ILBS, AnyAcc, NoLock, Preserve) { + Offset (0x8), + PRTA, 8, + PRTB, 8, + PRTC, 8, + PRTD, 8, + PRTE, 8, + PRTF, 8, + PRTG, 8, + PRTH, 8, + Offset (0x88), + , 3, + UI3E, 1, + UI4E, 1 + } +} + Device (LPCB) { Name(_ADR, 0x001f0000)
@@ -23,7 +44,7 @@ Device (LPCB) Offset(0x84) } - #include "irqlinks.asl" + #include <asm/acpi/irqlinks.asl> /* Firmware Hub */ Device (FWH)
Signature · 1 line
1.8.2.1
PATCH v2 1/8 x86: acpi: Create a common irqlinks ASL file
Quoted 8 lines · Bin Meng
Move the irqlinks.asl file currently in the BayTrail directory to a common place to be shared among all x86 platforms. As the PIRQ routing control programming interface is common to Intel chipsets, leave the common part in the common file, and move the platform specific part to the platform files.
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 9 lines
---
Changes in v2: None
.../asm/{arch-baytrail => }/acpi/irqlinks.asl | 33 +++++++++------------- arch/x86/include/asm/arch-baytrail/acpi/lpc.asl | 23 ++++++++++++++- 2 files changed, 35 insertions(+), 21 deletions(-) rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqlinks.asl (92%)
applied to u-boot-x86, thanks!
PATCH v2 2/8 x86: acpi: Make irqroute.asl common
In reply to Bin MengThe irqroute.asl file is already common enough to all x86 platforms. Platform ASL files need only provide a irqroute.h to describe how internal PCI devices and PCIe downstream port devices' INTx pins are routed to which PIRQ pin.
---
Changes in v2: None
arch/x86/include/asm/{arch-baytrail => }/acpi/irq_helper.h | 2 +-
arch/x86/include/asm/{arch-baytrail => }/acpi/irqroute.asl | 0
arch/x86/include/asm/arch-baytrail/acpi/southcluster.asl | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irq_helper.h (98%)
rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqroute.asl (100%)arch/x86/include/asm/acpi/irq_helper.h renamed from arch/x86/include/asm/arch-baytrail/acpi/irq_helper.h +1 -1
@@ -108,4 +108,4 @@ Device (prefix_ ## 0 ## func_) \ }/* SoC specific PIRQ route configuration */ -#include "irqroute.h" +#include <asm/arch/acpi/irqroute.h>
arch/x86/include/asm/acpi/irqroute.asl renamed from arch/x86/include/asm/arch-baytrail/acpi/irqroute.asl +0 -0
arch/x86/include/asm/arch-baytrail/acpi/southcluster.asl +1 -1
@@ -207,5 +207,5 @@ Device (PCI0) #include "xhci.asl" /* IRQ routing for each PCI device */ - #include "irqroute.asl" + #include <asm/acpi/irqroute.asl> }
Signature · 1 line
1.8.2.1
PATCH v2 2/8 x86: acpi: Make irqroute.asl common
Quoted 9 lines · Bin Meng
The irqroute.asl file is already common enough to all x86 platforms. Platform ASL files need only provide a
irqroute.hto describe how internal PCI devices and PCIe downstream port devices' INTx pins are routed to which PIRQ pin.Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>---
Quoted 9 lines
Changes in v2: None
arch/x86/include/asm/{arch-baytrail => }/acpi/irq_helper.h | 2 +- arch/x86/include/asm/{arch-baytrail => }/acpi/irqroute.asl | 0 arch/x86/include/asm/arch-baytrail/acpi/southcluster.asl | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename arch/x86/include/asm/{arch-baytrail => }/acpi/irq_helper.h (98%) rename arch/x86/include/asm/{arch-baytrail => }/acpi/irqroute.asl (100%)
applied to u-boot-x86, thanks!
PATCH v2 3/8 acpi: Pass -D__ASSEMBLY__ when compiling ASL files
In reply to Bin MengASL files may include various U-Boot header files, but IASL compiler does not understand any C language embedded in these header files. To reuse those header files for ASL compiling, use __ASSEMBLY__ in the header files to exclude everything that is not liked by IASL.
---
Changes in v2:
- Use __ASSEMBLY__ define
scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
@@ -325,7 +325,7 @@ $(obj)/%.S: $(src)/%.ttf # --------------------------------------------------------------------------- quiet_cmd_acpi_c_asl= ASL $< cmd_acpi_c_asl= \ - $(CPP) -x assembler-with-cpp -P $(UBOOTINCLUDE) -o $<.tmp $<; \ + $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \ iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null); \ mv $(patsubst %.asl,%.hex,$<) $@
Signature · 1 line
1.8.2.1
PATCH v2 3/8 acpi: Pass -D__ASSEMBLY__ when compiling ASL files
Quoted 8 lines · Bin Meng
ASL files may include various U-Boot header files, but IASL compiler does not understand any C language embedded in these header files. To reuse those header files for ASL compiling, use
__ASSEMBLY__in the header files to exclude everything that is not liked by IASL.Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 8 lines
---
Changes in v2:
- Use__ASSEMBLY__definescripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-x86, thanks!
PATCH v2 4/8 x86: quark: Prepare device.h for inclusion by ASL
In reply to Bin MengThere is a device.h for quark on-chip devices, mainly for definitions of internal PCI device numbers, but it's not ready to be included by ASL files. Update to use hex numbers for PCI dev and __ASSEMBLY__.
---
Changes in v2:
- Use __ASSEMBLY__ in device.h
arch/x86/include/asm/arch-quark/device.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
arch/x86/include/asm/arch-quark/device.h +15 -6
@@ -7,12 +7,17 @@#ifndef _QUARK_DEVICE_H_#define _QUARK_DEVICE_H_ -#include <pci.h> +/* +* Internal PCI device numbers within the SoC. +* +* Note it must start with 0x_ prefix, as the device number macro will be +* included in the ACPI ASL files (see irq_helper.h and irq_route.h). +*/ -#define QUARK_HOST_BRIDGE_DEV 0 +#define QUARK_HOST_BRIDGE_DEV 0x00#define QUARK_HOST_BRIDGE_FUNC 0 -#define QUARK_DEV_20 20 +#define QUARK_DEV_20 0x14#define QUARK_MMC_SDIO_FUNC 0#define QUARK_UART0_FUNC 1#define QUARK_USB_DEVICE_FUNC 2
@@ -22,18 +27,21 @@#define QUARK_EMAC0_FUNC 6#define QUARK_EMAC1_FUNC 7 -#define QUARK_DEV_21 21 +#define QUARK_DEV_21 0x15#define QUARK_SPI0_FUNC 0#define QUARK_SPI1_FUNC 1#define QUARK_I2C_GPIO_FUNC 2 -#define QUARK_DEV_23 23 +#define QUARK_DEV_23 0x17#define QUARK_PCIE0_FUNC 0#define QUARK_PCIE1_FUNC 1 -#define QUARK_LGC_BRIDGE_DEV 31 +#define QUARK_LGC_BRIDGE_DEV 0x1f#define QUARK_LGC_BRIDGE_FUNC 0 +#ifndef __ASSEMBLY__ +#include <pci.h> +#define QUARK_HOST_BRIDGE \ PCI_BDF(0, QUARK_HOST_BRIDGE_DEV, QUARK_HOST_BRIDGE_FUNC)#define QUARK_MMC_SDIO \
@@ -64,5 +72,6 @@ PCI_BDF(0, QUARK_DEV_23, QUARK_PCIE1_FUNC)#define QUARK_LEGACY_BRIDGE \ PCI_BDF(0, QUARK_LGC_BRIDGE_DEV, QUARK_LGC_BRIDGE_FUNC) +#endif /* __ASSEMBLY__ */ #endif /* _QUARK_DEVICE_H_ */
Signature · 1 line
1.8.2.1
PATCH v2 4/8 x86: quark: Prepare device.h for inclusion by ASL
Quoted 7 lines · Bin Meng
There is a
device.hfor quark on-chip devices, mainly for definitions of internal PCI device numbers, but it's not ready to be included by ASL files. Update to use hex numbers for PCI dev and__ASSEMBLY__.Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 8 lines
---
Changes in v2:
- Use__ASSEMBLY__indevice.harch/x86/include/asm/arch-quark/device.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
applied to u-boot-x86, thanks!
PATCH v2 5/8 x86: quark: Add platform ASL files
In reply to Bin MengThis adds basic quark platform ASL files. They are intended to be included in dsdt.asl of any board that is based on this platform.
---
Changes in v2: None
arch/x86/include/asm/arch-quark/acpi/irqroute.h | 15 ++ arch/x86/include/asm/arch-quark/acpi/lpc.asl | 125 ++++++++++++++ arch/x86/include/asm/arch-quark/acpi/platform.asl | 33 ++++ .../include/asm/arch-quark/acpi/sleepstates.asl | 10 ++ .../include/asm/arch-quark/acpi/southcluster.asl | 184 +++++++++++++++++++++ arch/x86/include/asm/arch-quark/iomap.h | 47 ++++++ arch/x86/include/asm/arch-quark/irq.h | 19 +++ 7 files changed, 433 insertions(+) create mode 100644 arch/x86/include/asm/arch-quark/acpi/irqroute.h create mode 100644 arch/x86/include/asm/arch-quark/acpi/lpc.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/platform.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/sleepstates.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/southcluster.asl create mode 100644 arch/x86/include/asm/arch-quark/iomap.h create mode 100644 arch/x86/include/asm/arch-quark/irq.h
arch/x86/include/asm/arch-quark/acpi/irqroute.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* Copyright (C) 2016, Bin Meng <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <asm/arch/device.h> + +#define PCI_DEV_PIRQ_ROUTES \ + PCI_DEV_PIRQ_ROUTE(QUARK_DEV_20, E, F, G, H), \ + PCI_DEV_PIRQ_ROUTE(QUARK_DEV_21, E, F, G, H), \ + PCI_DEV_PIRQ_ROUTE(QUARK_DEV_23, A, B, C, D) + +#define PCIE_BRIDGE_IRQ_ROUTES \ + PCIE_BRIDGE_DEV(RP, QUARK_DEV_23, A, B, C, D)
arch/x86/include/asm/arch-quark/acpi/lpc.asl new file +125 -0
125 lines not on this page · raw message
arch/x86/include/asm/arch-quark/acpi/platform.asl new file +33 -0
@@ -0,0 +1,33 @@ +/* + * Copyright (C) 2016, Bin Meng <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <asm/acpi/statdef.asl> +#include <asm/arch/iomap.h> +#include <asm/arch/irq.h> + +/* + * The _PTS method (Prepare To Sleep) is called before the OS is + * entering a sleep state. The sleep state number is passed in Arg0. + */ +Method(_PTS, 1) +{ +} + +/* The _WAK method is called on system wakeup */ +Method(_WAK, 1) +{ + Return (Package() {0, 0}) +} + +/* TODO: add CPU ASL support */ + +Scope (\_SB) +{ + #include "southcluster.asl" +} + +/* Chipset specific sleep states */ +#include "sleepstates.asl"
arch/x86/include/asm/arch-quark/acpi/sleepstates.asl new file +10 -0
@@ -0,0 +1,10 @@ +/* + * Copyright (C) 2016, Bin Meng <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +Name(\_S0, Package() {0x0, 0x0, 0x0, 0x0}) +Name(\_S3, Package() {0x5, 0x0, 0x0, 0x0}) +Name(\_S4, Package() {0x6, 0x0, 0x0, 0x0}) +Name(\_S5, Package() {0x7, 0x0, 0x0, 0x0})
arch/x86/include/asm/arch-quark/acpi/southcluster.asl new file +184 -0
184 lines not on this page · raw message
arch/x86/include/asm/arch-quark/iomap.h new file +47 -0
47 lines not on this page · raw message
arch/x86/include/asm/arch-quark/irq.h new file +19 -0
@@ -0,0 +1,19 @@ +/* +* Copyright (C) 2016 Bin Meng <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _QUARK_IRQ_H_ +#define _QUARK_IRQ_H_ + +#define PIRQA_APIC_IRQ 16 +#define PIRQB_APIC_IRQ 17 +#define PIRQC_APIC_IRQ 18 +#define PIRQD_APIC_IRQ 19 +#define PIRQE_APIC_IRQ 20 +#define PIRQF_APIC_IRQ 21 +#define PIRQG_APIC_IRQ 22 +#define PIRQH_APIC_IRQ 23 + +#endif /* _QUARK_IRQ_H_ */
Signature · 1 line
1.8.2.1
PATCH v2 5/8 x86: quark: Add platform ASL files
Quoted 9 lines · Bin Meng
This adds basic quark platform ASL files. They are intended to be included in dsdt.asl of any board that is based on this platform.
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 16 lines
arch/x86/include/asm/arch-quark/acpi/irqroute.h | 15 ++ arch/x86/include/asm/arch-quark/acpi/lpc.asl | 125 ++++++++++++++ arch/x86/include/asm/arch-quark/acpi/platform.asl | 33 ++++ .../include/asm/arch-quark/acpi/sleepstates.asl | 10 ++ .../include/asm/arch-quark/acpi/southcluster.asl | 184 +++++++++++++++++++++ arch/x86/include/asm/arch-quark/iomap.h | 47 ++++++ arch/x86/include/asm/arch-quark/irq.h | 19 +++ 7 files changed, 433 insertions(+) create mode 100644 arch/x86/include/asm/arch-quark/acpi/irqroute.h create mode 100644 arch/x86/include/asm/arch-quark/acpi/lpc.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/platform.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/sleepstates.asl create mode 100644 arch/x86/include/asm/arch-quark/acpi/southcluster.asl create mode 100644 arch/x86/include/asm/arch-quark/iomap.h create mode 100644 arch/x86/include/asm/arch-quark/irq.h
applied to u-boot-x86, thanks!
PATCH v2 6/8 x86: quark: Generate ACPI FADT/MADT tables
In reply to Bin MengGenerate quark platform-specific FADT/MADT tables.
---
Changes in v2: None
arch/x86/cpu/quark/Makefile | 1 + arch/x86/cpu/quark/acpi.c | 163 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 arch/x86/cpu/quark/acpi.c
arch/x86/cpu/quark/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-y += car.o dram.o irq.o msg_port.o quark.o obj-y += mrc.o mrc_util.o hte.o smc.o +obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi.o
arch/x86/cpu/quark/acpi.c new file +163 -0
163 lines not on this page · raw message
Signature · 1 line
1.8.2.1
PATCH v2 6/8 x86: quark: Generate ACPI FADT/MADT tables
Quoted 4 lines · Bin Meng
Generate quark platform-specific FADT/MADT tables.
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 9 lines
---
Changes in v2: None
arch/x86/cpu/quark/Makefile | 1 + arch/x86/cpu/quark/acpi.c | 163 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 arch/x86/cpu/quark/acpi.c
applied to u-boot-x86, thanks!
PATCH v2 7/8 x86: galileo: Enable ACPI table generation
In reply to Bin MengEnable ACPI table generation by creating a DSDT table.
---
Changes in v2: None
board/intel/galileo/.gitignore | 3 +++ board/intel/galileo/Makefile | 1 + board/intel/galileo/acpi/mainboard.asl | 11 +++++++++++ board/intel/galileo/dsdt.asl | 14 ++++++++++++++ configs/galileo_defconfig | 1 + doc/README.x86 | 5 ++++- 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 board/intel/galileo/.gitignore create mode 100644 board/intel/galileo/acpi/mainboard.asl create mode 100644 board/intel/galileo/dsdt.asl
board/intel/galileo/.gitignore new file +3 -0
@@ -0,0 +1,3 @@ +dsdt.aml +dsdt.asl.tmp +dsdt.c
board/intel/galileo/Makefile +1 -0
@@ -5,3 +5,4 @@ # obj-y += galileo.o start.o +obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
board/intel/galileo/acpi/mainboard.asl new file +11 -0
@@ -0,0 +1,11 @@ +/* + * Copyright (C) 2016, Bin Meng <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* Power Button */ +Device (PWRB) +{ + Name(_HID, EISAID("PNP0C0C")) +}
board/intel/galileo/dsdt.asl new file +14 -0
@@ -0,0 +1,14 @@ +/* + * Copyright (C) 2016, Bin Meng <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +DefinitionBlock("dsdt.aml", "DSDT", 2, "U-BOOT", "U-BOOTBL", 0x00010000) +{ + /* platform specific */ + #include <asm/arch/acpi/platform.asl> + + /* board specific */ + #include "acpi/mainboard.asl" +}
configs/galileo_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_TARGET_GALILEO=y CONFIG_ENABLE_MRC_CACHE=y CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y +CONFIG_GENERATE_ACPI_TABLE=y CONFIG_FIT=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y
doc/README.x86 +4 -1
@@ -1028,12 +1028,15 @@ Features that are optional: 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 +ACPI was initially enabled on BayTrail based boards. Testing was done by booting a pre-installed Ubuntu 14.04 from a SATA drive. Installing Ubuntu 14.04 and Windows 8.1/10 to a SATA drive and booting from there is also tested. Most devices seem to work correctly and the board can respond a reboot/shutdown command from the OS. +For other platform boards, ACPI support status can be checked by examining their +board defconfig files to see if CONFIG_GENERATE_ACPI_TABLE is set to y. + TODO List --------- - Audio
Signature · 1 line
1.8.2.1
PATCH v2 7/8 x86: galileo: Enable ACPI table generation
Quoted 8 lines · Bin Meng
Enable ACPI table generation by creating a DSDT table.
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>---
Changes in v2: None
Quoted 11 lines
board/intel/galileo/.gitignore | 3 +++ board/intel/galileo/Makefile | 1 + board/intel/galileo/acpi/mainboard.asl | 11 +++++++++++ board/intel/galileo/dsdt.asl | 14 ++++++++++++++ configs/galileo_defconfig | 1 + doc/README.x86 | 5 ++++- 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 board/intel/galileo/.gitignore create mode 100644 board/intel/galileo/acpi/mainboard.asl create mode 100644 board/intel/galileo/dsdt.asl
applied to u-boot-x86, thanks!
PATCH v2 8/8 x86: baytrail: acpi: Fix I/O APIC ID in the MADT table
In reply to Bin MengSo far this is hardcoded to 2, but it should really be read from the I/O APIC register.
---
Changes in v2: None
arch/x86/cpu/baytrail/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/baytrail/acpi.c +1 -1
@@ -155,7 +155,7 @@ u32 acpi_fill_madt(u32 current) current +=acpi_create_madt_lapics (current); current +=acpi_create_madt_ioapic ((struct acpi_madt_ioapic *)current, -2 ,IO_APIC_ADDR ,0 ); +io_apic_read (IO_APIC_ID ) >>24 ,IO_APIC_ADDR ,0 ); current +=acpi_create_madt_irq_overrides (current);
Signature · 1 line
1.8.2.1
PATCH v2 8/8 x86: baytrail: acpi: Fix I/O APIC ID in the MADT table
Quoted 6 lines · Bin Meng
So far this is hardcoded to 2, but it should really be read from the I/O APIC register.
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 7 lines
---
Changes in v2: None
arch/x86/cpu/baytrail/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-x86, thanks!