changeset 327bf4242521 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=327bf4242521
description:
        x86: changes to apic, keyboard
        It is possible that operating system wants to shutdown the
        lapic timer by writing timer's initial count to 0. This patch
        adds a check that the timer event is only scheduled if the
        count is 0.

        The patch also converts few of the panics related to the keyboard
        to warnings since we are any way not interested in simulating the
        keyboard.

diffstat:

 src/arch/x86/interrupts.cc |  7 ++++---
 src/dev/x86/i8042.cc       |  8 +++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r d351a723eb02 -r 327bf4242521 src/arch/x86/interrupts.cc
--- a/src/arch/x86/interrupts.cc        Thu Mar 28 09:34:15 2013 -0500
+++ b/src/arch/x86/interrupts.cc        Thu Mar 28 09:34:23 2013 -0500
@@ -597,9 +597,10 @@
                            curTick() + (newCount + 1) *
                            clockPeriod() - offset, true);
             } else {
-                reschedule(apicTimerEvent,
-                           curTick() + newCount *
-                           clockPeriod(), true);
+                if (newCount)
+                    reschedule(apicTimerEvent,
+                               curTick() + newCount *
+                               clockPeriod(), true);
             }
         }
         break;
diff -r d351a723eb02 -r 327bf4242521 src/dev/x86/i8042.cc
--- a/src/dev/x86/i8042.cc      Thu Mar 28 09:34:15 2013 -0500
+++ b/src/dev/x86/i8042.cc      Thu Mar 28 09:34:23 2013 -0500
@@ -411,10 +411,12 @@
           case ReadOutputPort:
             panic("i8042 \"Read output port\" command not implemented.\n");
           case WriteOutputPort:
-            panic("i8042 \"Write output port\" command not implemented.\n");
+            warn("i8042 \"Write output port\" command not implemented.\n");
+            lastCommand = WriteOutputPort;
           case WriteKeyboardOutputBuff:
-            panic("i8042 \"Write keyboard output buffer\" "
+            warn("i8042 \"Write keyboard output buffer\" "
                     "command not implemented.\n");
+            lastCommand = WriteKeyboardOutputBuff;
           case WriteMouseOutputBuff:
             DPRINTF(I8042, "Got command to write to mouse output buffer.\n");
             lastCommand = WriteMouseOutputBuff;
@@ -432,7 +434,7 @@
           case SystemReset:
             panic("i8042 \"System reset\" command not implemented.\n");
           default:
-            panic("Write to unknown i8042 "
+            warn("Write to unknown i8042 "
                     "(keyboard controller) command port.\n");
         }
     } else {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to