So, in ACPI 5.1, the GICC subtable of the MADT is 76 bytes long. In the
6.0 version of the spec, the GICC subtable is 80 bytes long. This causes
a problem in the code in linux-next, specifically on the APM Mustang. The
same problem could exist for any other ACPI tables on arm64 that are 5.1
tables that we are trying to read.
What happens is that the BAD_MADT_ENTRY() macro will fail in these cases,
even though the GICC subtable entry is perfectly valid according to the spec.
The macro fail because it compares the subtable length contained in the subtable
to the length of the struct in ACPICA. Unfortunately, that causes any 5.1
GICC items to be seen as invalid.
Whilst we try to straighten this out in the spec (this seems like something
pretty dumb that should not have happened), I've put together two alternative
solutions:
-- per Graeme's suggestion, we change it so that we only use ACPI >= 6.0
on arm64; my only objection to this is that it breaks APM Mustangs
that are already in use -- on the positive side, it's the simpler of
the two patches.
-- or, replace the use of BAD_MADT_ENTRY with a specific function that
works around the spec problem, at least until we straighten out what
the spec _should_ do; the downside here is that this may be a short
term fix, but on the positive side it keeps the change to the only
arch that's affected.
I've attached both patches. Opinions on which one to send upstream?
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone(a)linaro.org
-----------------------------------
On Tue, Jun 09, 2015 at 07:09:47PM +0100, Build bot for Mark Brown wrote:
> arm64-allmodconfig
> ERROR: "acpi_gpiochip_request_interrupts" [drivers/gpio/gpio-xgene-sb.ko] undefined!
> ERROR: "acpi_gpiochip_free_interrupts" [drivers/gpio/gpio-xgene-sb.ko] undefined!
Today's -next fails to build an arm64 allmodconfig due to commit
733cf014f02040b3ad (gpio: xgene: add ACPI support for APM X-Gene GPIO
standby driver) which adds ACPI support to the X-Gene standby driver
without either adding a dependency on ACPI or there being stubs in the
ACPI headers for the above functions in !ACPI configurations. My
instinct is that the stubs are going to be nicer since it'll save on
ifdefs in drivers which seems nicer.
From: Fu Wei <fu.wei(a)linaro.org>
This patchset update gtdt.asl for VExpress/AcpiTables/rtsm_ve-aemv8a
(1)Fix "Platform Timer Offset" value bug
(2)Add Memory-mapped GT and SBSA Generic Watchdog timer info
base on Foundation Model
Changelog:
v2: Add "ontributed-under: TianoCore Contribution Agreement 1.0"
for all patch
Add an explanation for the fix of "Platform Timer Offset"
value bug in the commit message.
v1: The first version upstream patchset to linaro mailing listf
for OpenPlatformPkg
Fu Wei (2):
Platforms/ARM: Fix "Platform Timer Offset" value bug in gtdt.asl
Platforms/ARM: update gtdt.asl for VExpress
.../VExpress/AcpiTables/rtsm_ve-aemv8a/gtdt.asl | 67 +++++++++++++++++-----
1 file changed, 53 insertions(+), 14 deletions(-)
--
1.9.1
From: "Jonathan (Zhixiong) Zhang" <zjzhang(a)codeaurora.org>
On a platform with APEI (ACPI Platform Error Interface) enabled, firmware
updates a memory region with hardware error record using nocache
attribute. When OS reads the region, since it maps the region with
cacahed attribute even though EFI memory map defines this region as
uncached, OS gets stale data and errorneously reports there is no new
HW error.
When ghes driver maps the memory region, it uses the cache attribute
according to EFI memory map, if EFI memory map feature is enabled
at runtime.
Since both arch/x86 and arc/ia64 implemented architecture agnostic EFI
memory map attribue lookup function efi_memattributes(), the code is
moved from arch/x86 and arch/ia64 into EFI subsystem. On top of that,
efi_remap() is added.
V2:
1. Rebased to v4.1-rc5.
2. Split removal of efi_mem_attributes() and creation of efi_ioremap()
into two patches.
Jonathan (Zhixiong) Zhang (3):
efi: arch, x86: arch, ia64: move efi_mem_attributes()
efi: add efi_remap()
acpi, apei: use EFI memmap to map GHES memory
arch/ia64/kernel/efi.c | 11 -----------
arch/x86/platform/efi/efi.c | 18 ------------------
drivers/acpi/apei/ghes.c | 13 +++++++++++++
drivers/firmware/efi/efi.c | 27 +++++++++++++++++++++++++++
include/linux/efi.h | 1 +
5 files changed, 41 insertions(+), 29 deletions(-)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Don't try to read the RSDP structure or RSDT/XSDT tables
from memory with the -c option. These are now provided
as files in /sysfs, and this allows acpidump to function
when /dev/mem is not available, which will be the case
for Aarch64 servers.
Signed-off-by: Roy Franz <roy.franz(a)linaro.org>
---
Graeme - all this is tested with your patch, which looks good. It takes
care of what acpidump needs from sysfs.
Al - this fixes acpidump. Are there other utilities that I need to look at
within acpica-tools?
This produces almost the same output with/without the "-c" option,
with the /sysfs files being used with "-c", with the following differences:
* Table address are 0x0 with -c, since we don't get them from the sysfs files
* the tables are listed in a different order.
I have verified with strace that no /dev/mem accesses are made with
"-c".
An issue that this patch doesn't address, is what should be the default,
and what should be done if /dev/mem is missing, or there but not readable.
source/os_specific/service_layers/oslinuxtbl.c | 87 +++++++++++++-------------
1 file changed, 43 insertions(+), 44 deletions(-)
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index e090a3c..95cc674 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -686,70 +686,69 @@ OslTableInitialize (
return (AE_OK);
}
+ if (!Gbl_DumpCustomizedTables)
+ {
/* Get RSDP from memory */
- Status = OslLoadRsdp ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ Status = OslLoadRsdp ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
- /* Get XSDT from memory */
+ /* Get XSDT from memory */
- if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
- {
- if (Gbl_Xsdt)
+ if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
{
- free (Gbl_Xsdt);
- Gbl_Xsdt = NULL;
+ if (Gbl_Xsdt)
+ {
+ free (Gbl_Xsdt);
+ Gbl_Xsdt = NULL;
+ }
+
+ Gbl_Revision = 2;
+ Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- Gbl_Revision = 2;
- Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
- if (ACPI_FAILURE (Status))
+ /* Get RSDT from memory */
+
+ if (Gbl_Rsdp.RsdtPhysicalAddress)
{
- return (Status);
+ if (Gbl_Rsdt)
+ {
+ free (Gbl_Rsdt);
+ Gbl_Rsdt = NULL;
+ }
+
+ Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- }
- /* Get RSDT from memory */
+ /* Get FADT from memory */
- if (Gbl_Rsdp.RsdtPhysicalAddress)
- {
- if (Gbl_Rsdt)
+ if (Gbl_Fadt)
{
- free (Gbl_Rsdt);
- Gbl_Rsdt = NULL;
+ free (Gbl_Fadt);
+ Gbl_Fadt = NULL;
}
- Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- }
- /* Get FADT from memory */
-
- if (Gbl_Fadt)
- {
- free (Gbl_Fadt);
- Gbl_Fadt = NULL;
- }
-
- Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- if (!Gbl_DumpCustomizedTables)
- {
/* Add mandatory tables to global table list first */
-
Status = OslAddTableToList (ACPI_RSDP_NAME, 0);
if (ACPI_FAILURE (Status))
{
--
1.9.1
This patch series introduce support for _CCA object, which is currently
used mainly by ARM64 platform to specify DMA coherency attribute for
devices when booting with ACPI.
A copy of ACPIv6 can be found here:
http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
This patch also introduces a new APIS:
1. acpi_check_dma() as part of ACPI API.
2. device_dma_is_coherent() as part of unified device property API.
This simplifies the logic in device drivers to determine device coherency
attribute regardless of booting with DT vs ACPI.
This has been tested on AMD-Seattle platform, which implements _CCA
object as described in the AMD Opteron A1100 Series Processor ACPI Porting Guide:
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI…
Changes from V4 (https://lkml.org/lkml/2015/5/15/669):
* Patch1:
- Move the arch_setup_dma_ops() call from acpi_create_platform_device()
to acpi_bind_one() to support other bus types (per Rafael).
- Rename acpi_device_flags.is_coherent to acpi_device_flags.coherent_dma.
(per Rafael)
- Refactor acpi_dma_is_supported() and acpi_dma_is_coherent() to
acpi_check_dma() to simplify the new interface.
- Only support _CCA=1 for now. See acpi_check_dma() (per Arnd and Catalin)
* Patch2:
- Add acked-by Catalin.
* Patch3:
- Use ACPI_COMPANION() instead of acpi_node().
- Remove has_acpi_companion() check since already done by acpi_node().
(per Will)
* Remove the patch "Generic function for setting up PCI device DMA coherency"
introduced in V4. (per Bjorn)
Changes from V3 (https://lkml.org/lkml/2015/5/7/1004):
* Remove ARCH64_SUPPORT_ACPI_CCA_ZERO and just use CONFIG_ARM64.
(per Catalin and Rafael)
* Do not need to call arch_setup_dma_ops() for acpi_device->dev.
(per Rafael)
* [3/6] (New) We also need to call arch_setup_dma_ops() for pci
devices and check the CCA of the host bridge. Similar logic
exists for OF. So, I refactor of_pci_dma_configure() to
the more generic version pci_dma_configure(), and add support
for ACPI.
Changes from V2 (https://lkml.org/lkml/2015/5/5/510):
* Reword ACPI_MUST_HAVE_CCA to ACPI_CCA_REQUIRED (per Rafael)
* Reword ACPI_SUPPORT_CCA_ZERO to ARCH64_SUPPORT_ACPI_CCA_ZERO
(per Rafael and Arnd)
* Misc code styling clean up (per Rafael)
* Only print missing _CCA warning message in debug mode.
* Refactor logic in acpi_setup_device_dma() into
if acpi_dma_is_supported() then call arch_setup_dma_ops().
* Do not allocate device dma_mask if !acpi_dma_is_supported()
(per Arnd).
* Re-use the dummy functions with the same signature.
Changes from V1 (https://lkml.org/lkml/2015/4/29/290):
* Remove supports for 32-bit ARM since doesn't currently
supporting ACPI (Per Catalin suggestions.)
* Do not call arch_setup_dma_ops() and when _CCA is missing.
(per Arnd suggestion)
* Add CONFIG_ACPI_SUPPORT_CCA_ZERO kernel config flag to
allow architectures to specify the behavior when _CCA=0.
* Add dummy_dma_ops for ARM64 (per Catalin suggestions).
* Fixed build error when ACPI is not configured by defining
acpi_dma_is_coherent() for when CONFIG_ACPI is not set.
* Introduce device_dma_is_coherent().
* Use device_dma_is_coherent in crypto/ccp and amd-xgbe driver.
Changes from RFC: (https://lkml.org/lkml/2015/4/1/389)
* New logic for deriving and propagating coherent attribute from
parent devices. (by Mark)
* Introducing acpi_dma_is_coherent() API (Per Tom suggestion)
* Introducing CONFIG_ACPI_MUST_HAVE_CCA kernel configuration.
* Rebased to linux-4.1-rc1
Suravee Suthikulpanit (5):
ACPI / scan: Parse _CCA and setup device coherency
arm64 : Introduce support for ACPI _CCA object
device property: Introduces device_dma_is_coherent()
crypto: ccp - Unify coherency checking logic with
device_dma_is_coherent()
amd-xgbe: Unify coherency checking logic with device_dma_is_coherent()
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/dma-mapping.h | 18 +++++-
arch/arm64/mm/dma-mapping.c | 92 +++++++++++++++++++++++++++++++
drivers/acpi/Kconfig | 3 +
drivers/acpi/acpi_platform.c | 2 +-
drivers/acpi/glue.c | 5 ++
drivers/acpi/scan.c | 35 ++++++++++++
drivers/base/property.c | 14 +++++
drivers/crypto/ccp/ccp-platform.c | 60 +-------------------
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +--------
include/acpi/acpi_bus.h | 37 ++++++++++++-
include/linux/acpi.h | 5 ++
include/linux/property.h | 2 +
13 files changed, 212 insertions(+), 89 deletions(-)
--
2.1.0
The leg-kernel release has been made and tagged as leg-20150603.0
This is based on mainline kernel v4.1-rc6
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link:
http://git.linaro.org/leg/acpi/leg-kernel.git/commit/6fad3ac6a73d6ec7f1c664…
Notes :-
1) Contains first draft of exporting RSDP, RSDT, XSDT tables patch for
the no /dev/mem project
2) Contains V6 of the SBSA Watchdog driver patches.
3) Kludge/fix for Redhat OS login issues.
4) Support for booting on qemu virt machine type.