Deleted Added
sdiff udiff text old ( 12450:b5a0300fc327 ) new ( 12514:09556145b380 )
full compact
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 21 unchanged lines hidden (view full) ---

30
31#include "dev/x86/i8042.hh"
32
33#include "base/bitunion.hh"
34#include "debug/I8042.hh"
35#include "mem/packet.hh"
36#include "mem/packet_access.hh"
37
38// The 8042 has a whopping 32 bytes of internal RAM.
39const uint8_t RamSize = 32;
40const uint8_t NumOutputBits = 14;
41const uint8_t X86ISA::PS2Keyboard::ID[] = {0xab, 0x83};
42const uint8_t X86ISA::PS2Mouse::ID[] = {0x00};
43const uint8_t CommandAck = 0xfa;
44const uint8_t CommandNack = 0xfe;
45const uint8_t BatSuccessful = 0xaa;

--- 331 unchanged lines hidden (view full) ---

377 "command byte\" command.\n", data);
378 statusReg.passedSelfTest = (uint8_t)commandByte.passedSelfTest;
379 break;
380 case WriteMouseOutputBuff:
381 DPRINTF(I8042, "Got data %#02x for \"Write "
382 "mouse output buffer\" command.\n", data);
383 writeData(data, true);
384 break;
385 default:
386 panic("Data written for unrecognized "
387 "command %#02x\n", lastCommand);
388 }
389 lastCommand = NoCommand;
390 } else if (addr == commandPort) {
391 DPRINTF(I8042, "Got command %#02x.\n", data);
392 statusReg.commandLast = 1;

--- 55 unchanged lines hidden (view full) ---

448 panic("i8042 \"Read input port\" command not implemented.\n");
449 case ContinuousPollLow:
450 panic("i8042 \"Continuous poll low\" command not implemented.\n");
451 case ContinuousPollHigh:
452 panic("i8042 \"Continuous poll high\" command not implemented.\n");
453 case ReadOutputPort:
454 panic("i8042 \"Read output port\" command not implemented.\n");
455 case WriteOutputPort:
456 warn("i8042 \"Write output port\" command not implemented.\n");
457 lastCommand = WriteOutputPort;
458 break;
459 case WriteKeyboardOutputBuff:
460 warn("i8042 \"Write keyboard output buffer\" "
461 "command not implemented.\n");
462 lastCommand = WriteKeyboardOutputBuff;
463 break;
464 case WriteMouseOutputBuff:
465 DPRINTF(I8042, "Got command to write to mouse output buffer.\n");
466 lastCommand = WriteMouseOutputBuff;
467 break;
468 case WriteToMouse:
469 DPRINTF(I8042, "Expecting mouse command.\n");

--- 72 unchanged lines hidden ---