Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/55585 )

Change subject: dev: Fix an assert in the I8259 interrupt controller.
......................................................................

dev: Fix an assert in the I8259 interrupt controller.

If an *index* is equal to or greater than the size of the thing it's
indexing, then that's an error. Another count, on the other hand, must
be strictly greater for that to be a problem.

Change-Id: I9c891b37482fe72b6436850fc8c3c2fcef6f0476
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55585
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
---
M src/dev/x86/i8259.cc
1 file changed, 18 insertions(+), 1 deletion(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/dev/x86/i8259.cc b/src/dev/x86/i8259.cc
index 5cae5b8..bd6d18c 100644
--- a/src/dev/x86/i8259.cc
+++ b/src/dev/x86/i8259.cc
@@ -51,7 +51,7 @@
     }

     int in_count = p.port_inputs_connection_count;
-    panic_if(in_count >= NumLines,
+    panic_if(in_count > NumLines,
             "I8259 only supports 8 inputs, but there are %d.", in_count);
     for (int i = 0; i < in_count; i++) {
         inputs.push_back(new IntSinkPin<I8259>(

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55585
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9c891b37482fe72b6436850fc8c3c2fcef6f0476
Gerrit-Change-Number: 55585
Gerrit-PatchSet: 12
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Bradford Beckmann <bradford.beckm...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to