diff options
author | Steve Reinhardt <stever@gmail.com> | 2013-07-11 21:57:04 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@gmail.com> | 2013-07-11 21:57:04 -0500 |
commit | 1f43e244bda0c78844720609455fd77f6f275e51 (patch) | |
tree | 65eb7262e58a61992368dfe10f2152dd85eb6129 /src/dev/x86/i8042.cc | |
parent | 502ad1e6757116867e0e0529c0c080320a2b440b (diff) | |
download | gem5-1f43e244bda0c78844720609455fd77f6f275e51.tar.xz |
dev: make BasicPioDevice take size in constructor
Instead of relying on derived classes explicitly assigning
to the BasicPioDevice pioSize field, require them to pass
a size value in to the constructor.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/dev/x86/i8042.cc')
-rw-r--r-- | src/dev/x86/i8042.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dev/x86/i8042.cc b/src/dev/x86/i8042.cc index c0bd34ad2..a0a7c35ec 100644 --- a/src/dev/x86/i8042.cc +++ b/src/dev/x86/i8042.cc @@ -43,6 +43,24 @@ const uint8_t CommandAck = 0xfa; const uint8_t CommandNack = 0xfe; const uint8_t BatSuccessful = 0xaa; + +X86ISA::I8042::I8042(Params *p) + : BasicPioDevice(p, 0), // pioSize arg is dummy value... not used + latency(p->pio_latency), + dataPort(p->data_port), commandPort(p->command_port), + statusReg(0), commandByte(0), dataReg(0), lastCommand(NoCommand), + mouseIntPin(p->mouse_int_pin), keyboardIntPin(p->keyboard_int_pin) +{ + statusReg.passedSelfTest = 1; + statusReg.commandLast = 1; + statusReg.keyboardUnlocked = 1; + + commandByte.convertScanCodes = 1; + commandByte.passedSelfTest = 1; + commandByte.keyboardFullInt = 1; +} + + AddrRangeList X86ISA::I8042::getAddrRanges() const { |