33#ifndef __DEV_UART8250_HH__
34#define __DEV_UART8250_HH__
41#include "params/Uart8250.hh"
86 enum class InterruptIds
106 RegisterBase(reg1.
name() +
"/" + reg2.
name(), reg1.
size()),
109 panic_if(reg1.size() != reg2.size(),
110 "Mismatched paired register sizes %d, %d",
111 reg1.size(), reg2.size());
185 Register<Ier>
ier = {
"ier", 0};
190 Register<Iir>
iir = {
"iir"};
195 Register<Lcr>
lcr = {
"lcr"};
197 Register<Lsr>
lsr = {
"lsr"};
201 RegisterRaz
sr = {
"sr", 1};
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual const std::string & name() const
Register< uint8_t > Register8
void read(void *buf, off_t offset, size_t bytes) override
void read(void *buf) override
BankedRegister(RegisterBase ®1, RegisterBase ®2)
void write(const void *buf, off_t offset, size_t bytes) override
void write(const void *buf) override
const std::string & name() const override
void serialize(std::ostream &os) const override
bool unserialize(const std::string &s) override
PairedRegister(RegisterBase ®1, RegisterBase ®2)
void write(const void *buf, off_t offset, size_t bytes) override
void read(void *buf) override
void write(const void *buf) override
void read(void *buf, off_t offset, size_t bytes) override
RWSwitchedRegister rbrThr
Registers(Uart8250 *uart, const std::string &new_name)
RWSwitchedRegister iirFcr
void clearIntr(int intrBit)
virtual bool intStatus()
Return if we have an interrupt pending.
EndBitUnion(Iir) BitUnion8(Lcr) Bitfield< 1
Iir readIir(Register< Iir > ®)
EventFunctionWrapper txIntrEvent
void serialize(CheckpointOut &cp) const override
Serialize an object.
EndBitUnion(Ier) BitUnion8(Iir) Bitfield< 0 > pending
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void writeThr(Register8 ®, const uint8_t &data)
EventFunctionWrapper rxIntrEvent
void dataAvailable() override
Inform the uart that there is data available.
Uart8250(const Params &p)
AddrRangeList getAddrRanges() const override
Determine the address ranges that this device responds to.
Bitfield< 2 > parityError
BitUnion8(Ier) Bitfield< 0 > rdi
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Bitfield< 3 > framingError
void scheduleIntr(Event *event)
Registers::Register< T > Register
Bitfield< 1 > overrunError
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Registers::Register8 Register8
uint8_t readRbr(Register8 ®)
void processIntrEvent(int intrBit)
void writeIer(Register< Ier > ®, const Ier &ier)
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
const uint8_t UART_MCR_LOOP