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