EINJ table is fully implemented in kernel and no changes were needed
to bring it up on armv7/8 arch.
Along with work on EINJ coulpe of steps were done like:
1. Expand bfapei tool so it can create blob which pretend h/w registers
for EINJ driver.
2. Filling address in EINJ table according to those in blob.
3. Trigger error using existing injection kernel mechanism.
See commit for more details.
Tomasz Nowicki (3):
bfapei: Move common functionality to separate function.
bfapei: Expand bfapei tool to EINJ table testing.
acpi, apei, einj: Fill in EINJ table according to address in EINJ
blobs.
platforms/exynos5250-arndale.acpi/einj.asl | 20 +++---
platforms/foundation-v8.acpi/einj.asl | 20 +++---
platforms/rtsm_ve-aemv8a.acpi/einj.asl | 20 +++---
tools/bfapei/bfapei.c | 101 ++++++++++++++++++++++------
tools/bfapei/bfapei.h | 30 +++++++--
tools/common/include/acpi.h | 57 ++++++++++++++++
6 files changed, 192 insertions(+), 56 deletions(-)
--
1.7.9.5
This patch set convert PMU driver to ACPI for ARMv8 arch. Despite driver is
initialized in early boot stage, no ACPI related actions are taken then. All PMU
resources coming from ACPI tables are use by others units once bus is enumerated.
Tomasz Nowicki (3):
ACPI, ARMv8: Whitelist armv8-pmu driver for ACPI.
armv8, dts: Move device resources to DSTD ACPI table.
armv8, pmu: Add the match table and pointers for ACPI probing to the
driver.
arch/arm64/boot/dts/foundation-v8-acpi.dts | 4 ++++
arch/arm64/boot/dts/rtsm_ve-aemv8a-acpi.dts | 4 ++++
arch/arm64/kernel/perf_event.c | 14 ++++++++++++++
drivers/acpi/acpi_platform.c | 1 +
4 files changed, 23 insertions(+)
--
1.7.9.5
ACPI spec define that devices can be notified with some well
defined values. Handlers from system list are called for
notify values within 0-0x7F. In turn, handlers from device list
are called for notify value greater than 0x80. Till now only system
handler could be called. Now we are able to notify devices with all
notify values range that means we can emulate SCI line e.g. to trigger
APCI errors.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
---
drivers/acpi/sci_emu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/sci_emu.c b/drivers/acpi/sci_emu.c
index 2f13ca1..08af8e9 100644
--- a/drivers/acpi/sci_emu.c
+++ b/drivers/acpi/sci_emu.c
@@ -55,7 +55,10 @@ static void sci_notify_client(char *acpi_name, u32 event)
*/
obj_desc = acpi_ns_get_attached_object(node);
if (obj_desc) {
- if (obj_desc->common_notify.notify_list[0]) {
+ if (((event <= ACPI_MAX_SYS_NOTIFY) &&
+ obj_desc->common_notify.notify_list[ACPI_SYSTEM_HANDLER_LIST]) ||
+ (((event > ACPI_MAX_SYS_NOTIFY) &&
+ obj_desc->common_notify.notify_list[ACPI_DEVICE_HANDLER_LIST]))) {
/*
* Release the lock and queue the item for later
* exectuion
--
1.7.9.5
From: Mark Rutland <mark.rutland(a)arm.com>
We currently do an ldr from GICC_CTLR to w0, then immediately overwrite
w0 with a mov. Reading the GICC_CTLR has no effect on the state of the
GIC, so there's no reason to do the ldr. It's also inconsistent with the
way we set the GICD_CTLR.
Fix this.
Signed-off-by: Mark Rutland <mark.rutland(a)arm.com>
---
boot.S | 1 -
1 file changed, 1 deletion(-)
diff --git a/boot.S b/boot.S
index a1f25e2..7c28e84 100644
--- a/boot.S
+++ b/boot.S
@@ -49,7 +49,6 @@ _start:
str w0, [x1], #4
2: ldr x1, =GIC_CPU_BASE // GICC_CTLR
- ldr w0, [x1]
mov w0, #3 // EnableGrp0 | EnableGrp1
str w0, [x1]
--
1.7.9.5
On hardware reduced platforms, there is no support for the following:
- PM Event and Control registers
- SCI interrupt (and handler)
- Fixed Events
- General Purpose Events (GPEs)
- Global Lock
- ACPI PM timer
- FACS table (Waking vectors and Global Lock)
but when FACP Hardware Reduced flag is set, ACPI drivers will still access
power management registers directly which will cause oops when system booted.
acpi_gbl_reduced_hardware is a global flag and can be used to prevent
misbehavior on hardware reduced platforms, and this flag is initialized at
the very beginning of the system boot when FADT is parsed, so we can use it
to prevent accessing PM registers.
There are still lots of other places to be fixed, this is the first patch
to fix hte bug we met when --cores=1;
I will finish a patch set and send to upstream if you guys have no
objections. I think we should start a discussion in ACPI mail list for
this bug on hardware reduced platforms now.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/acpica/hwregs.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 8d2e866..4c270c3 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -265,6 +265,11 @@ acpi_status acpi_hw_clear_acpi_status(void)
ACPI_FUNCTION_TRACE(hw_clear_acpi_status);
+ /* If Hardware Reduced flag is set, there are no GPEs */
+ if (acpi_gbl_reduced_hardware) {
+ return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
+ }
+
ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
ACPI_BITMASK_ALL_FIXED_STATUS,
ACPI_FORMAT_UINT64(acpi_gbl_xpm1a_status.address)));
@@ -305,6 +310,10 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
{
ACPI_FUNCTION_ENTRY();
+ if (acpi_gbl_reduced_hardware) {
+ return (NULL);
+ }
+
if (register_id > ACPI_BITREG_MAX) {
ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: 0x%X",
register_id));
@@ -337,6 +346,11 @@ acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control)
ACPI_FUNCTION_TRACE(hw_write_pm1_control);
+ /* If Hardware Reduced flag is set, there are no PM Control registers */
+ if (acpi_gbl_reduced_hardware) {
+ return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
+ }
+
status =
acpi_hw_write(pm1a_control, &acpi_gbl_FADT.xpm1a_control_block);
if (ACPI_FAILURE(status)) {
@@ -370,6 +384,11 @@ acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value)
ACPI_FUNCTION_TRACE(hw_register_read);
+ /* If Hardware Reduced flag is set, there are no PM Control registers */
+ if (acpi_gbl_reduced_hardware) {
+ return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
+ }
+
switch (register_id) {
case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */
@@ -465,6 +484,11 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
ACPI_FUNCTION_TRACE(hw_register_write);
+ /* If Hardware Reduced flag is set, there are no PM Control registers */
+ if (acpi_gbl_reduced_hardware) {
+ return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
+ }
+
switch (register_id) {
case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */
/*
--
1.7.9.5
Hi,
Update from my side:
- have got invitation letter to US Connect
- run ACPI kernel on RTSMv8 model, environment preparation
- now working on converting PMU driver to ACPI
Tomasz
Values set within all APEI tables have no hardware meaning and
are valid combining with kernel hacks. These changes allow only
to confirm that APEI tables (HEST, ERST, BERT) are supported by
kernel and no issues were observed on arm/arm64 architectures.
Tomasz Nowicki (6):
acpi, apei, ghes: Enable APEI firmware first mode by APEI bit.
acpi, apei, hed: Add Hardware Error Device (HED) to SB bus.
acpi, apei, einj: Fill ACPI tables to enable EINJ driver.
acpi, apei: Fix EINJ and HEST tables.
acpi, apei, bert: Point to the same error block status memory region
as HEST points.
acpi, apei, erst: Point to region where we can pretend registers,
persistent sotrage.
platforms/exynos5250-arndale.acpi/bert.asl | 4 +-
platforms/exynos5250-arndale.acpi/dsdt.asl | 27 +++++
platforms/exynos5250-arndale.acpi/einj.asl | 2 +-
platforms/exynos5250-arndale.acpi/erst.asl | 34 +++----
platforms/exynos5250-arndale.acpi/hest.asl | 148 +---------------------------
platforms/foundation-v8.acpi/bert.asl | 4 +-
platforms/foundation-v8.acpi/dsdt.asl | 27 +++++
platforms/foundation-v8.acpi/einj.asl | 2 +-
platforms/foundation-v8.acpi/erst.asl | 34 +++----
platforms/foundation-v8.acpi/hest.asl | 148 +---------------------------
10 files changed, 98 insertions(+), 332 deletions(-)
--
1.7.9.5
From: Al Stone <ahs3(a)redhat.com>
I should have sent these out for comment much sooner. Once these are
in good shape, the next steps are to send patches for verifying that
the pinconf code is working properly, connecting up the GPIO interrupts
using ACPI, and then conversion of all of the pin controllers for
Arndale (this patch converts one of four).
This patch puts most of the infrastructure in place so that in the
3.11 kernel the Arndale pin controllers can be converted from FDT to
ACPI. The changes in ASL are included in a separate patch. What this
allows is for the pin controllers to be described in either FDT or ACPI
for Arndale and -- in conjunction with the ASL changes -- shows how to
describe a Samsung controller in ACPI.
Changes for v2:
-- Add patch 6 which allows compilation regardless of whether
CONFIG_ACPI is used or not
Al Stone (6):
ACPI: ARM: arndale: remove GPZ GPIO definition from DT so it can be in
ACPI
ACPI: ARM: arndale: whitelist the samsung-pinctrl driver for ACPI
ACPI: make an error message a little clearer
ACPI: improve acpi_extract_package() utility
ACPI: ARM: arndale: enable ACPI in the Samsung pinctrl driver
ACPI: ARM: arndale: add CONFIG_ACPI ifdef's to pinctrl driver
arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 2 +
arch/arm/boot/dts/exynos5250.dtsi | 6 +-
drivers/acpi/acpi_platform.c | 3 +
drivers/acpi/osl.c | 2 +-
drivers/acpi/utils.c | 17 +-
drivers/pinctrl/pinctrl-samsung.c | 517 +++++++++++++++++++++++++++++-
drivers/pinctrl/pinctrl-samsung.h | 3 +
7 files changed, 536 insertions(+), 14 deletions(-)
--
1.8.3.1
This patch set is the kernel part of code for cpu hotplug.
I got a patch in upstream but not accepted by mainline, this patch
emulate an ACPI SCI interrupt to emulate a hot-plug event. Useful
for testing ACPI based hot-plug on systems that don't have the
necessary firmware support. With this patch, I can test the hot-add
and hot-remove repeatly.
This patch set is intended to close the cpu hotplug related cards
in JIRA, just for review purpose, *should not* pushed to our linaro
acpi.
I have created an acpi-hotplug-next branch in our git tree for these
patches.
This patch set includes 3 parts, the forst part is the kernel code,
and the second is the ASL code fix, the third part is the boot wrapper.
Hanjun Guo (4):
Revert "ARM64 / CPU hot-plug: Skeleton logic cpu online/offline for
cpu hot-plug"
ACPI: Enable SCI_EMULATE to manually simulate physical hotplug
testing
arm / ACPI: Remove __cpuinit and fix __init attribute location
arm: fix cpu hot add failure
Mark Rutland (6):
arm64: reorganise smp_enable_ops
arm64: factor out spin-table boot method
arm64: read enable-method for CPU0
arm64: add CPU_HOTPLUG infrastructure
arm64: add PSCI CPU_OFF-based hotplug support
HACK: arm64: dts: foundation: add PSCI data
arch/arm64/Kconfig | 2 +-
arch/arm64/boot/dts/foundation-v8.dts | 19 +--
arch/arm64/include/asm/irq.h | 1 +
arch/arm64/include/asm/smp.h | 46 +++++--
arch/arm64/kernel/cputable.c | 2 +-
arch/arm64/kernel/head.S | 12 +-
arch/arm64/kernel/irq.c | 61 +++++++++
arch/arm64/kernel/process.c | 7 ++
arch/arm64/kernel/smp.c | 222 ++++++++++++++++++---------------
arch/arm64/kernel/smp_psci.c | 54 ++++++--
arch/arm64/kernel/smp_spin_table.c | 85 ++++++++++++-
arch/arm64/kernel/vmlinux.lds.S | 1 -
drivers/acpi/Kconfig | 10 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/plat/arm/boot.c | 20 +--
drivers/acpi/sci_emu.c | 145 +++++++++++++++++++++
16 files changed, 538 insertions(+), 150 deletions(-)
create mode 100644 drivers/acpi/sci_emu.c
--
1.7.9.5
From: Al Stone <ahs3(a)redhat.com>
The first two patches in this series have been submitted before;
this series just combines all of the Arndale GPIO changes so far.
The last of the three converts yet another GPIO device to ACPI.
All that remains is to convert the final controller. To make that
work, the GIC and GIC combiner will need to work first and that I'm
still investigating.
Al Stone (3):
ACPI: ARM: arndale: move definition of GPZ GPIO from DT to ACPI
ACPI: ARM: arndale: convert GPIO controller 3 of 4 to ACPI
ACPI: ARM: arndale: convert GPIO controller 2 of 4 to ACPI
platforms/exynos5250-arndale.acpi/ssdt0.asl | 554 +++++++++++++++++++++++++++-
1 file changed, 553 insertions(+), 1 deletion(-)
--
1.8.3.1
Hi everyone,
I read the wiki about ACPI Table Prioritization:
https://wiki.linaro.org/LEG/Engineering/Kernel/ACPI/TablePriorities
and I noticed that CSRT is in the *Never Tables* priority, here I got
some different opinions.
Yes, CSRT or Core System Resources Table is a proprietary ACPI table
introduced by Microsoft, but This table can contain devices that are not in
the system DSDT table. In particular DMA controllers, Timer, interrupt might
be described here.
we can get DMA description from DMAR (DMA Remapping Table) tables on Intel platform,
but on ARM SoCs, there is no table to describe DMA, only CSRT is available.
Actually, the support code of CSRT in Linux kernel already have submitted
by Intel on Jan 17 this year, but only DMA is supported, still have something
more to do (if needed).
So, why not use the CSRT table to describe DMA?
Thanks
Hanjun
v1->v2: Return specific error value instead of just return -1, and
correct some grammar mistake in changelog.
For cpu hot add, evaluate _MAT or parse MADT will did twice to get
APIC id:
acpi_processor_add()
acpi_processor_get_info()
acpi_get_cpuid() will evaluate _MAT or parse MADT;
acpi_processor_hotadd_init()
acpi_map_lsapic() will evaluate _MAT again;
This patch set introduces apic_id in struct processor to save parsed
APIC id, and use it to remove the duplicated _MAT evaluation.
Further more, the new logical cpu number will be generated in
acpi_register_lapic(), this can be returned to remove the cpumask
allocation and operation to simplify _acpi_map_lsapic().
There are also some cleanups for the ACPI processor dirver code.
Hanjun Guo (2):
ACPI / processor: remove unnecessary if (!pr) check
ACPI / processor: Remove outdated comments
Jiang Liu (4):
ACPI / processor: Introduce apic_id in struct processor to save
parsed APIC id
ACPI / processor: use apic_id and remove duplicated _MAT evaluation
x86 / ACPI: simplify _acpi_map_lsapic()
ACPI / processor: remove some dead code in acpi_processor_get_info()
arch/ia64/kernel/acpi.c | 38 ++----------------
arch/x86/include/asm/mpspec.h | 2 +-
arch/x86/kernel/acpi/boot.c | 88 +++++++++--------------------------------
arch/x86/kernel/apic/apic.c | 8 ++--
drivers/acpi/acpi_processor.c | 22 +++--------
drivers/acpi/processor_core.c | 26 +++++++++---
include/acpi/processor.h | 3 ++
include/linux/acpi.h | 2 +-
8 files changed, 60 insertions(+), 129 deletions(-)
--
1.7.9.5
From: Al Stone <ahs3(a)redhat.com>
This adds another GPIO/pinctrl device to Arndale. In the process,
logic errors in the portions of the Samsung pinctrl driver that
were using ACPI were weeded out.
Al Stone (2):
ACPI: ARM: arndale: move GPIO controller 3 of 4 from FDT to ACPI
ACPI: ARM: arndale: Enable pinctrl for configuring many controllers
via ACPI
arch/arm/boot/dts/exynos5250-arndale.dts | 26 +++++++++++++++
arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 2 +-
arch/arm/boot/dts/exynos5250.dtsi | 6 ++--
drivers/pinctrl/pinctrl-samsung.c | 53 ++++++++++++++++---------------
4 files changed, 59 insertions(+), 28 deletions(-)
--
1.8.3.1