Nico Huber has posted comments on this change. ( https://review.coreboot.org/28909 )
Change subject: nb/intel/{gm45,i945,pineview}: Use macro instead of GGC address
......................................................................
Patch Set 2:
>> (1 comment)
>
> regarding the datasheet, it is 16bits.
The register read was already 16 bits. That has nothing to do with
the variable you store the value in.
>
> by the way, there is a conflict with this change :
> https://review.coreboot.org/#/c/coreboot/+/17645/
> so maybe I have to keep only changes related to pineview and i945.
Doesn't matter. 17645 needs an update anyway.
--
To view, visit https://review.coreboot.org/28909
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I233e835180fd445961b6deb74ea7afc2821c236e
Gerrit-Change-Number: 28909
Gerrit-PatchSet: 2
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 04 Oct 2018 15:28:11 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/28882 )
Change subject: libpayload/x86/exception: Add ability to ignore unknown interrupts
......................................................................
libpayload/x86/exception: Add ability to ignore unknown interrupts
This will make enabling the APIC safer by ignoring unknown interrupts
and not halting the system. Once all interrupt sources have been found
and handled DIE_ON_UNKNOWN_INTERRUPT can be set if desired.
BUG=b:116777191
TEST=Booted grunt, halted the kernel, and pushed the power button while
in S5. Verified that depthcharge logged the unknown exception.
APIC Init Started
APIC Configured
Ignoring interrupt vector 39
Change-Id: If4ed566ec284d69786c369f37e4e331d7f892c74
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Reviewed-on: https://review.coreboot.org/28882
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Martin Roth <martinroth(a)google.com>
---
M payloads/libpayload/arch/x86/Kconfig
M payloads/libpayload/arch/x86/exception.c
2 files changed, 32 insertions(+), 3 deletions(-)
Approvals:
build bot (Jenkins): Verified
Martin Roth: Looks good to me, approved
diff --git a/payloads/libpayload/arch/x86/Kconfig b/payloads/libpayload/arch/x86/Kconfig
index cbb21cb..129ff5f 100644
--- a/payloads/libpayload/arch/x86/Kconfig
+++ b/payloads/libpayload/arch/x86/Kconfig
@@ -37,4 +37,21 @@
config ENABLE_APIC
bool "Enables the Local APIC"
+choice
+ prompt "Interrupt Handling"
+ default LOG_UNKNOWN_INTERRUPTS if ENABLE_APIC
+ default DIE_ON_UNKNOWN_INTERRUPT
+
+config IGNORE_UNKNOWN_INTERRUPTS
+ bool "Ignore unknown user defined interrupts"
+
+config LOG_UNKNOWN_INTERRUPTS
+ bool "Logs unknown user defined interrupts to the console"
+
+config DIE_ON_UNKNOWN_INTERRUPT
+ bool "Die if an unknown user defined interrupt is encountered"
+
+endchoice
+
+
endif
diff --git a/payloads/libpayload/arch/x86/exception.c b/payloads/libpayload/arch/x86/exception.c
index 1fa1304..983a9f3 100644
--- a/payloads/libpayload/arch/x86/exception.c
+++ b/payloads/libpayload/arch/x86/exception.c
@@ -171,9 +171,14 @@
if (handlers[vec]) {
handlers[vec](vec);
- if (IS_ENABLED(CONFIG_LP_ENABLE_APIC))
- apic_eoi(vec);
- return;
+ goto success;
+ } else if (vec >= EXC_COUNT
+ && IS_ENABLED(CONFIG_LP_IGNORE_UNKNOWN_INTERRUPTS)) {
+ goto success;
+ } else if (vec >= EXC_COUNT
+ && IS_ENABLED(CONFIG_LP_LOG_UNKNOWN_INTERRUPTS)) {
+ printf("Ignoring interrupt vector %u\n", vec);
+ goto success;
}
die_if(vec >= EXC_COUNT || !names[vec], "Bad exception vector %u\n",
@@ -181,7 +186,14 @@
dump_exception_state();
dump_stack(exception_state->regs.esp, 512);
+ /* We don't call apic_eoi because we don't want to ack the interrupt and
+ allow another interrupt to wake the processor. */
halt();
+ return;
+
+success:
+ if (IS_ENABLED(CONFIG_LP_ENABLE_APIC))
+ apic_eoi(vec);
}
void exception_init(void)
--
To view, visit https://review.coreboot.org/28882
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If4ed566ec284d69786c369f37e4e331d7f892c74
Gerrit-Change-Number: 28882
Gerrit-PatchSet: 3
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>