summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-04-03 09:30:56 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-04 05:40:02 -0700
commit748c3872b3226b8b65ec7c16fa0b81a1e5d5517b (patch)
treebf493779f133b0f8b2b3ca7be24e6683c1dba531
parent574e131187492b0e5ba1af06d9a6baee22a2302e (diff)
downloadchrome-ec-748c3872b3226b8b65ec7c16fa0b81a1e5d5517b.tar.gz
minute-ia: clean up comments about ISR=0 bug
According to Intel, ISR=0 is actually the intended behavior, so these scary comments linking to buganizer can be cleaned up. BUG=b:28444630 BRANCH=none TEST=make buildall -j Change-Id: I877556f1719826cb72eee39e4d14e2c10412c7a9 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1550706 Reviewed-by: Raul E Rangel <rrangel@chromium.org>
-rw-r--r--core/minute-ia/interrupts.c16
-rw-r--r--core/minute-ia/task.c2
2 files changed, 8 insertions, 10 deletions
diff --git a/core/minute-ia/interrupts.c b/core/minute-ia/interrupts.c
index ed455e699f..07ee42713e 100644
--- a/core/minute-ia/interrupts.c
+++ b/core/minute-ia/interrupts.c
@@ -109,11 +109,9 @@ static const irq_desc_t system_irqs[] = {
* exception_panic were pushed by the hardware when the exception was
* called.
*
- * This is done since the ISR appears to be zero when exceptions are
- * handled (b:128444630). A more ideal solution would be to use
- * get_current_interrupt_vector from exception_panic. A fix for this
- * *might* involve a closer investigation of the flags passed to
- * set_interrupt_gate.
+ * This is done since interrupt vectors 0-31 bypass the APIC ISR register
+ * and go directly to the CPU core, so get_current_interrupt_vector
+ * cannot be used.
*/
#define DEFINE_EXN_HANDLER(vector) \
void __keep exception_panic_##vector(void); \
@@ -159,9 +157,11 @@ void set_interrupt_gate(uint8_t num, isr_handler_t func, uint8_t flags)
}
/**
- * This procedure gets the current interrupt vector number, and should
- * only be called from an interrupt vector context. Note that it may
- * fail under some cases (see b:128444630).
+ * This procedure gets the current interrupt vector number using the
+ * APIC ISR register, and should only be called from an interrupt
+ * vector context. Note that vectors 0-31, as well as software
+ * triggered interrupts (using "int n") bypass the APIC, and this
+ * routine will not work for that.
*
* Returns an integer in range 0-255 upon success, or 256 (0x100)
* upon failure.
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 140c6dd85d..c344b55179 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -276,8 +276,6 @@ void __keep task_start_irq_handler(void *unused)
* pre-empted.
*/
uint32_t t = get_time().le.lo;
-
- /* ISR is occasionally zero, see b:128444630 */
uint32_t vector = get_current_interrupt_vector();
int irq = VEC_TO_IRQ(vector);