Nico Huber has posted comments on this change. ( https://review.coreboot.org/28876 )
Change subject: src/mb: Fix "CONFIG_DEFAULT_CONSOLE_LOGLEVEL > 8" if statement
......................................................................
Patch Set 2:
I have doubts this would compile at all. Please use a C `if` (no #if)
and fix errors if they occur.
Alternatively: Remove the dead code altogether.
--
To view, visit https://review.coreboot.org/28876
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: I318de3e7c807bb5b5efdf61fef387d34225a8149
Gerrit-Change-Number: 28876
Gerrit-PatchSet: 2
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 02 Oct 2018 16:09:39 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Raul Rangel has uploaded this change for review. ( 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>
---
M payloads/libpayload/arch/x86/Kconfig
M payloads/libpayload/arch/x86/exception.c
2 files changed, 32 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/28882/1
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: newchange
Gerrit-Change-Id: If4ed566ec284d69786c369f37e4e331d7f892c74
Gerrit-Change-Number: 28882
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/28877
Change subject: amd/stoneyridge: Prepare for vboot rebooting system
......................................................................
amd/stoneyridge: Prepare for vboot rebooting system
Implement the function vboot_platform_prepare_reboot() which is normally
a weak function.
The SlpTyp field of the PM1 register is not reset to its default value
when the APU restarts. This change prevents a failing condition if
vboot decides to reset the system instead of allowing an S3 resume to
continue.
TEST=Resume Grunt when vboot attempts a reset, verify a fresh boot instead
BUG=b:117089826
Change-Id: I6e0e3e541bad89ca5b23d6ddb6e5c0df7f762f10
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/soc/amd/stoneyridge/pmutil.c
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/28877/1
diff --git a/src/soc/amd/stoneyridge/pmutil.c b/src/soc/amd/stoneyridge/pmutil.c
index baabba5..2d603d0 100644
--- a/src/soc/amd/stoneyridge/pmutil.c
+++ b/src/soc/amd/stoneyridge/pmutil.c
@@ -32,3 +32,15 @@
return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())) == ACPI_S3;
}
+
+/* If vboot requests a system reset, modify the PM1 register so it will never be
+ * misinterpreted as an S3 resume. */
+void vboot_platform_prepare_reboot(void)
+{
+ uint32_t pm1;
+
+ pm1 = inw(pm_acpi_pm_cnt_blk());
+ pm1 &= ~SLP_TYP;
+ pm1 |= SLP_TYP_S5 << SLP_TYP_SHIFT;
+ outw(pm1, pm_acpi_pm_cnt_blk());
+}
--
To view, visit https://review.coreboot.org/28877
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e0e3e541bad89ca5b23d6ddb6e5c0df7f762f10
Gerrit-Change-Number: 28877
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28873
to look at the new patch set (#2).
Change subject: mb/emulation/spike-riscv: Implement mtime_init
......................................................................
mb/emulation/spike-riscv: Implement mtime_init
This patch lets spike boot to "Payload not loaded" again.
Because soc/ucb/riscv/ is does not represent a real SoC, but is a dummy
directory for emulators, and different emulators might have different
memory maps, I moved mtime_init to the mainboard-specific directories
for Spike and QEMU.
Change-Id: I080f7f81df752e25478bd277637bf894bbee4cb2
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
M src/mainboard/emulation/qemu-riscv/Makefile.inc
R src/mainboard/emulation/qemu-riscv/mtime.c
M src/mainboard/emulation/spike-riscv/Makefile.inc
A src/mainboard/emulation/spike-riscv/clint.c
M src/soc/ucb/riscv/Makefile.inc
5 files changed, 30 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/28873/2
--
To view, visit https://review.coreboot.org/28873
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I080f7f81df752e25478bd277637bf894bbee4cb2
Gerrit-Change-Number: 28873
Gerrit-PatchSet: 2
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>