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",
133 rtc.serialize(
"rtc",
cp);
143 rtc.unserialize(
"rtc",
cp);
Addr pioAddr
Address that the device listens to.
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 Arm Limited All rights reserved.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)