47 #include "debug/Tsunami.hh" 63 :
MC146818(p->tsunami, n, p->time, p->year_is_bcd, p->frequency),
96 if (pkt->
getSize() ==
sizeof(uint8_t)) {
136 }
else if (pkt->
getSize() ==
sizeof(uint64_t)) {
140 panic(
"I/O Read - invalid addr - va %#x size %d\n",
155 DPRINTF(
Tsunami,
"io write - va=%#x size=%d IOPort=%#x Data=%#x\n",
157 (uint32_t)pkt->
getLE<uint8_t>());
159 assert(pkt->
getSize() ==
sizeof(uint8_t));
181 picr &= ~(1 << (pkt->
getLE<uint8_t>() & 0xF));
222 panic(
"I/O Write - va%#x size %d data %#x\n",
294 TsunamiIOParams::create()
#define panic(...)
This implements a cprintf based panic() function.
Emulation of the Tsunami CChip CSRs.
uint8_t readData(const uint8_t addr)
RTC read data.
void writeControl(const CtrlReg data)
Write control word.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Real-Time Clock (MC146818)
void postDRIR(uint32_t interrupt)
post an interrupt to the CPU.
void writeData(const uint8_t addr, const uint8_t data)
RTC write data.
Top level class for Tsunami Chipset emulation.
uint8_t mode1
Mode of PIC1.
void clearPIC(uint8_t bitvector)
Clear a posted interrupt.
void startup() override
Start running.
uint8_t readCounter(unsigned int num)
TsunamiCChip * cchip
Pointer to the Tsunami CChip.
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
void writeCounter(unsigned int num, const uint8_t data)
void startup()
Start ticking.
void setLE(T v)
Set the value in the data pointer to v as little endian.
uint16_t timerData
The interval is set via two writes to the PIT.
bool picInterrupting
Is the pic interrupting right now or not.
bool outputHigh(unsigned int num)
#define UNSERIALIZE_SCALAR(scalar)
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize this object to the given output stream.
Addr pioSize
Size that the device's address range.
void makeAtomicResponse()
uint64_t Tick
Tick count type.
Declaration of top level class for the Tsunami chipset.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
const Params * params() const
RTC(const std::string &n, const TsunamiIOParams *p)
Tsunami * tsunami
A pointer to the Tsunami device which be belong to.
Tsunami I/O Space mapping including RTC/timer interrupts.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
TsunamiIO(const Params *p)
Initialize all the data for devices supported by Tsunami I/O.
#define SERIALIZE_SCALAR(scalar)
uint8_t mode2
Mode of PIC2.
Tick frequency() const
Return the freqency of the RTC.
uint8_t mask2
Mask of the PIC2.
Declaration of the Packet class.
std::ostream CheckpointOut
virtual void startup()
Start ticking.
Intel8254Timer pitimer
Intel 8253 Periodic Interval Timer.
void unserialize(const std::string &base, CheckpointIn &cp)
Reconstruct the state of this object from a checkpoint.
uint8_t picr
Raw PIC interrupt register before masking.
Tick pioDelay
Delay that the device experinces on an access.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
void clearDRIR(uint32_t interrupt)
clear an interrupt previously posted to the CPU.
Tsunami I/O device is a catch all for all the south bridge stuff we care to implement.
TsunamiIO * io
Pointer to the TsunamiIO device which has the RTC.
uint8_t mask1
Mask of the PIC1.
void postPIC(uint8_t bitvector)
Post an PIC interrupt to the CPU via the CChip.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
const std::string & name() const
Addr pioAddr
Address that the device listens to.
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize this object to the given output stream.
void unserialize(const std::string &base, CheckpointIn &cp)
Reconstruct the state of this object from a checkpoint.