29#ifndef __DEV_X86_CMOS_HH__
30#define __DEV_X86_CMOS_HH__
36#include "params/Cmos.hh"
72 for (
int i = 0;
i < int_pin_count;
i++) {
85 rtc(this,
name() +
".rtc",
p.time, true, 5000000000ULL,
86 p.port_int_pin_connection_count)
95 if (if_name ==
"int_pin")
96 return *
rtc.intPin.at(idx);
BasicPioDevice(const Params &p, Addr size)
uint64_t frequency() const
MC146818(EventManager *em, const std::string &name, const struct tm time, bool bcd, Tick frequency)
virtual std::string name() const
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Ports are used to interface objects to each other.
X86RTC(EventManager *em, const std::string &n, const struct tm time, bool bcd, Tick frequency, int int_pin_count)
std::vector< IntSourcePin< X86RTC > * > intPin
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
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.
EndBitUnion(CmosAddress) CmosAddress address
BitUnion8(CmosAddress) Bitfield< 6
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.
EventManager(EventManager &em)
Event manger manages events in the event queue.
This is exposed globally, independent of the ISA.
Copyright (c) 2024 Arm Limited All rights reserved.
const PortID InvalidPortID
IntSourcePinBase IntSourcePin
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
std::string csprintf(const char *format, const Args &...args)