Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55806 )
(
11 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: dev,arch-x86: Implement some self test 8042 commands.
......................................................................
dev,arch-x86: Implement some self test 8042 commands.
The self test in particular is used by bare metal software to ensure
that the keyboard controller is reset and ready to use.
Change-Id: I53c2a80c181b9d19617c75657637e06951c94433
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55806
Reviewed-by: Matthew Poremba <matthew.pore...@amd.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/x86/i8042.cc
1 file changed, 34 insertions(+), 3 deletions(-)
Approvals:
Matthew Poremba: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/x86/i8042.cc b/src/dev/x86/i8042.cc
index 268d090..9fab694 100644
--- a/src/dev/x86/i8042.cc
+++ b/src/dev/x86/i8042.cc
@@ -226,11 +226,26 @@
commandByte.disableMouse = 0;
break;
case TestMouse:
- panic("i8042 \"Test mouse\" command not implemented.\n");
+ // The response to this is from the 8042, not the mouse.
+ // Hard code no errors detected.
+ writeData(0x00);
+ break;
case SelfTest:
- panic("i8042 \"Self test\" command not implemented.\n");
+ // Exactly what this does is essentially undocumented, but
this:
+ // https://www.os2museum.com/wp/
+ // ibm-pcat-8042-keyboard-controller-commands/
+ // says that this should essentially reset some values.
+ commandByte.convertScanCodes = 1;
+ commandByte.disableMouse = 1;
+ commandByte.disableKeyboard = 1;
+ commandByte.passedSelfTest = 1;
+ statusReg.passedSelfTest = 1;
+ writeData(0x55); // Self test passed.
+ break;
case InterfaceTest:
- panic("i8042 \"Interface test\" command not implemented.\n");
+ // Hard code no errors detected.
+ writeData(0x00);
+ break;
case DiagnosticDump:
panic("i8042 \"Diagnostic dump\" command not implemented.\n");
case DisableKeyboard:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55806
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: I53c2a80c181b9d19617c75657637e06951c94433
Gerrit-Change-Number: 55806
Gerrit-PatchSet: 13
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