32#include "debug/CMOS.hh"
62 panic(
"Read from undefined CMOS port.\n");
75 address = pkt->
getLE<uint8_t>();
82 panic(
"Write to undefined CMOS port.\n");
96 "Reading CMOS RTC reg %x as %x.\n",
reg,
val);
100 "Reading non-volitile CMOS address %x as %x.\n",
reg,
val);
110 DPRINTF(CMOS,
"Writing CMOS RTC reg %x with %x.\n",
114 DPRINTF(CMOS,
"Writing non-volitile CMOS address %x with %x.\n",
Addr pioAddr
Address that the device listens to.
virtual void startup()
Start ticking.
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.
uint8_t readData(const uint8_t addr)
RTC read data.
void writeData(const uint8_t addr, const uint8_t data)
RTC write data.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void setLE(T v)
Set the value in the data pointer to v as little endian.
void makeAtomicResponse()
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
std::vector< IntSourcePin< X86RTC > * > intPin
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void startup() override
startup() is the final initialization call before simulation.
gem5::X86ISA::Cmos::X86RTC rtc
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void writeRegister(uint8_t reg, uint8_t val)
uint8_t readRegister(uint8_t reg)
void serialize(CheckpointOut &cp) const override
Serialize an object.
#define panic(...)
This implements a cprintf based panic() function.
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)