Add the general description for GPIO on JUNO board. Define
pin number 256 as power button function (for demo) in
this patch. However,JUNO has no GPIO controller in hardware,
Using GPIO event emulation which can trigger the GPIO action,
then test the GPIO-signal event model for ACPI.
Signed-off-by: Yi Li <yi.li(a)linaro.org>
---
ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl | 42 ++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
index 5bfd521..e4e9cad 100644
--- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
+++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
@@ -58,6 +58,48 @@ DefinitionBlock (
}
}
+ //GPIO controller description
+ Device (GPO0)
+ {
+ Name (_HID, "LNRO0009")
+ Name (_ADR, 0)
+ Name (_UID, 0)
+
+ Name (_CRS, ResourceTemplate () {
+ //GPIO Register Interface(demo,need to modify by the real h/w setting)
+ Memory32Fixed (ReadWrite, 0x1c010000, 0x1000)
+
+ //Interrupt vector 0x80 for GPIO controller(demo,need to modify by the real h/w setting)
+ Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive) {0x80}
+ })
+
+ Name (_AEI,ResourceTemplate () {
+ //Assume GPIO256 as PowerButton
+ GpioInt(Edge, ActiveLow, ExclusiveAndWake, PullUp, , " \\_SB.GPO0") {0x100}
+ })
+
+ //Handle all ACPI Events signaled by GPIO Controller GPO0
+ Method (_EVT, 0x1, Serialized)
+ {
+ //Arg0 - EventNumber. An Integer indicating the event number.
+ //(Controller-relative zero-based GPIO pin number) of the current event.
+ //Must be in the range 0x0000 - 0xffff.
+ Switch (ToInteger(Arg0))
+ {
+ //Pin number 256
+ Case (0x100)
+ {
+ //Notify OSPM the power button is pressed
+ Notify (PWRB, 0x80)
+ }
+ Default
+ {
+
+ }
+ }
+ }
+ }
+
//Power button device description
Device (PWRB)
{
--
1.7.9.5
Add the power button description on juno board, notify power
button with 0x80 value, the OS will detect the power button
is pressed, how to deal with the event which depends on OS's
policy. Usually the acpid deamon will call the specific
script to let OS shutdown.
Signed-off-by: Yi Li <yi.li(a)linaro.org>
---
ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
index bdee349..5bfd521 100644
--- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
+++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
@@ -58,6 +58,19 @@ DefinitionBlock (
}
}
+ //Power button device description
+ Device (PWRB)
+ {
+ Name (_HID, EISAID("PNP0C0C"))
+ Name (_ADR, 0)
+ Name (_UID, 0)
+
+ Method (_STA, 0x0, Notserialized)
+ {
+ Return (0x0F)
+ }
+ }
+
// apb_pclk
Device (CLK0) {
Name (_HID, "LNRO0008")
--
1.7.9.5
From: Al Stone <al.stone(a)linaro.org>
These patches are my best guess at initial ACPI tables for
XGene, in accordance with the new ACPI 5.1 specification.
These have not been fully tested yet but that process has
been started.
Al Stone (3):
APM / XGene: Minor cleanup of some of the basics
APM / XGene: Update core tables to replace ACPI 5.1 changes
APM / XGene: Add in empty SSDT for future use in developing complete
tables
platforms/APMXGene.acpi/APMXGene.manifest | 1 +
platforms/APMXGene.acpi/Apic.asl | 262 ++--
platforms/APMXGene.acpi/Dsdt.asl | 2215 ++++++++++++++++-------------
platforms/APMXGene.acpi/Facp.asl | 57 +-
platforms/APMXGene.acpi/Gtdt.asl | 87 +-
platforms/APMXGene.acpi/Rsdp.asl | 2 +-
platforms/APMXGene.acpi/Ssdt.asl | 21 +
platforms/APMXGene.acpi/Xsdt.asl | 10 +-
8 files changed, 1508 insertions(+), 1147 deletions(-)
create mode 100644 platforms/APMXGene.acpi/Ssdt.asl
--
1.9.3
Hello,
what is the current state of libacpica for aarch64? Are packages
available from Linaro (static libs and includes would be best)? Is it
available on which linaro trees? Is anything already in upstream
libacpica?
Thank you,
Claudio
APEI is currently implemented so that it depends on x86 hardware.
The primary dependency is that GHES uses the x86 NMI for hardware
error notification and MCE for memory error handling. These patches
remove that dependency.
Other APEI features such as error reporting via external IRQ, error
serialization, or error injection, do not require changes to use them
on non-x86 architectures.
The following patch set eliminates the APEI Kconfig x86 dependency
by making these changes:
- treat NMI notification as GHES architecture - HAVE_ACPI_APEI_NMI
- group and wrap around #ifdef CONFIG_HAVE_ACPI_APEI_NMI code which
is used only for NMI path
- identify architectural boxes and abstract it accordingly (tlb flush and MCE)
- rework ioremap for both IRQ and NMI context
NMI code is kept in ghes.c file since NMI and IRQ context are tightly coupled.
Note, these patches introduce no functional changes for x86. The NMI notification
feature is hard selected for x86. Architectures that want to use this
feature should also provide NMI code infrastructure.
V1->V2
- address Borislav's comment
- abstract arch-specific calls instead of wrapping into the #ifdef
V2->V3
- address Robert's comment
- disable ACPI_APEI_NMI selection so that it is hard selected by arch Kconfig
- rename ACPI_APEI_NMI to ARCH_HAS_ACPI_APEI_NMI
V3->V4
- do not abstract NMI calls for archs which do not support it
- merge some of patches to make review process easier
V4->V5
- markers for preprocessor statements (#else, #endif) around long code block
Tomasz Nowicki (3):
apei, mce: Factor out APEI architecture specific MCE calls.
acpi, apei, ghes: Make NMI error notification to be GHES architecture
extension.
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI
context.
arch/x86/Kconfig | 2 +
arch/x86/kernel/acpi/Makefile | 1 +
arch/x86/kernel/acpi/apei.c | 62 +++++++++++++++
drivers/acpi/apei/Kconfig | 8 +-
drivers/acpi/apei/apei-base.c | 13 ++++
drivers/acpi/apei/ghes.c | 173 +++++++++++++++++++++++++++---------------
drivers/acpi/apei/hest.c | 29 +------
include/acpi/apei.h | 4 +
include/linux/nmi.h | 4 +
9 files changed, 204 insertions(+), 92 deletions(-)
create mode 100644 arch/x86/kernel/acpi/apei.c
--
1.9.1
This patch set have no function change for x86 and ia64 and
just do some clean up to prepare for running ACPI on ARM64.
This patch set is splited out from the patch set [1]
"[PATCH v4 00/13] Enable ACPI on ARM64 in Kconfig" and hope it
can be merged first before ARM64 ACPI core patches.
[1]: https://lkml.org/lkml/2014/6/26/627
update from v2:
Don not select ACPI_LEGACY_TABLES_LOOKUP on IA64 which
is catched by Peter.
update from v1:
1. Drop "Make EC debugfs depend on X86 || IA64 in Kconfig";
2. Rename ACPI_SCAN_BIOS_NOT_EFI to ACPI_LEGACY_TABLES_LOOKUP
suggested by Rafael;
3. Rename ARCH_HAS_ACPI_PDC to ARCH_MIGHT_HAVE_ACPI_PDC suggested by Rafael;
4. Remove the help for ARCH_MIGHT_HAVE_ACPI_PDC because it can't be selected;
5. Rename acpi_arch_is_smp() to acpi_has_cpu_in_madt() to be more
explicit and easy understanding.
Graeme Gregory (2):
ACPI: ARM64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
Hanjun Guo (1):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
arch/ia64/Kconfig | 1 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 6 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/processor_core.c | 198 ---------------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++++++++
11 files changed, 235 insertions(+), 200 deletions(-)
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5
This patch set have no function change for x86 and ia64 and
just do some clean up to prepare for running ACPI on ARM64.
This patch set is splited out from the patch set [1]
"[PATCH v4 00/13] Enable ACPI on ARM64 in Kconfig" and hope it
can be merged first before ARM64 ACPI core patches.
[1]: https://lkml.org/lkml/2014/6/26/627
update from v1:
1. Drop "Make EC debugfs depend on X86 || IA64 in Kconfig";
2. Rename ACPI_SCAN_BIOS_NOT_EFI to ACPI_LEGACY_TABLES_LOOKUP
suggested by Rafael;
3. Rename ARCH_HAS_ACPI_PDC to ARCH_MIGHT_HAVE_ACPI_PDC suggested by Rafael;
4. Remove the help for ARCH_MIGHT_HAVE_ACPI_PDC because it can't be selected;
5. Rename acpi_arch_is_smp() to acpi_has_cpu_in_madt() to be more
explicit and easy understanding.
Graeme Gregory (2):
ACPI: ARM64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
Hanjun Guo (1):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
arch/ia64/Kconfig | 2 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 6 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/processor_core.c | 198 ---------------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++++++++
11 files changed, 236 insertions(+), 200 deletions(-)
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5