Go to the documentation of this file.
45 #include "debug/Pl050.hh"
70 DPRINTF(
Pl050,
"Read Commmand: %#x\n", (uint32_t)control);
102 warn(
"Tried to read PL050 at offset %#x that doesn't exist\n", daddr);
121 "PL050: Unexpected write size "
122 "(offset: %#x, data: %#x, size: %u)\n",
147 warn(
"PL050: Unhandled write of %#x to offset %#x\n",
data, daddr);
158 InterruptReg ints = rawInterrupts;
160 ints.tx = value ? 1 : 0;
168 InterruptReg ints = rawInterrupts;
180 rawInterrupts = ints;
183 if (!old_pending && new_pending) {
184 DPRINTF(
Pl050,
"Generate interrupt: rawInt=%#x ctrl=%#x int=%#x\n",
187 }
else if (old_pending && !new_pending) {
188 DPRINTF(
Pl050,
"Clear interrupt: rawInt=%#x ctrl=%#x int=%#x\n",
197 InterruptReg tmp_interrupt(0);
199 tmp_interrupt.tx = rawInterrupts.tx & control.txint_enable;
200 tmp_interrupt.rx = rawInterrupts.rx & control.rxint_enable;
202 return tmp_interrupt;
224 Pl050Params::create()
226 return new Pl050(
this);
void makeAtomicResponse()
Addr pioAddr
Address that the device listens to.
void serialize(CheckpointOut &cp) const override
Serialize an object.
#define UNSERIALIZE_SCALAR(scalar)
virtual void clear()=0
Clear a signalled interrupt.
static const int kmiClkDiv
virtual void raise()=0
Signal an interrupt.
uint64_t Tick
Tick count type.
void hostRegDataAvailable(const std::function< void()> &c)
Register a data available callback into the PS/2 interface.
uint8_t hostRead()
Read a character from the device.
bool hostDataAvailable() const
Check if there is pending data from the PS/2 device.
void updateIntCtrl(InterruptReg ints, ControlReg ctrl)
Update the status of the interrupt and control registers and deliver an interrupt if required.
void setInterrupts(InterruptReg ints)
void paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
void setTxInt(bool value)
Set or clear the TX interrupt.
ArmInterruptPin *const interrupt
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
PS2Device * ps2
PS2 device connected to this KMI interface.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void setControl(ControlReg ctrl)
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
bool readId(PacketPtr pkt, uint64_t amba_id, Addr pio_addr)
Addr pioSize
Size that the device's address range.
Pl050(const Pl050Params *p)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void hostWrite(uint8_t c)
Transmit a character from the host interface to the device.
#define SERIALIZE_SCALAR(scalar)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void paramIn(CheckpointIn &cp, const string &name, ExtMachInst &machInst)
Tick pioDelay
Delay that the device experinces on an access.
std::ostream CheckpointOut
uint8_t clkdiv
clock divisor register This register is just kept around to satisfy reads after driver does writes.
InterruptReg getInterrupt() const
Get current interrupt value.
void updateRxInt()
Update the RX interrupt using PS/2 device state.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17