34#ifndef __DEV_STORAGE_IDE_CTRL_HH__
35#define __DEV_STORAGE_IDE_CTRL_HH__
41#include "params/IdeController.hh"
73 ConfigSpaceRegs(
const std::string &
name) :
80 addRegisters({primaryTiming, secondaryTiming, deviceTiming, raz0,
81 udmaControl, raz1, udmaTiming, raz2});
86 TimeRegWithDecodeEnabled = 0x8000
90 Register16 primaryTiming =
91 {
"primary timing", TimeRegWithDecodeEnabled};
92 Register16 secondaryTiming =
93 {
"secondary timing", TimeRegWithDecodeEnabled};
94 Register8 deviceTiming = {
"device timing"};
95 RegisterRaz raz0 = {
"raz0", 3};
96 Register8 udmaControl = {
"udma control"};
97 RegisterRaz raz1 = {
"raz1", 1};
98 Register16 udmaTiming = {
"udma timing"};
158 memset(
static_cast<void *
>(
this), 0,
sizeof(*
this));
void accessControl(Addr offset, int size, uint8_t *data, bool read)
void setDevice1(IdeDisk *disk)
void select(bool select_device_1)
void serialize(const std::string &base, std::ostream &os) const
void accessCommand(Addr offset, int size, uint8_t *data, bool read)
void setDevice0(IdeDisk *disk)
void accessBMI(Addr offset, int size, uint8_t *data, bool read)
IdeController * controller() const
IdeDisk * _selected
Currently selected disk.
void unserialize(const std::string &base, CheckpointIn &cp)
bool pendingInterrupt() const
IdeDisk * device0
IDE disks connected to this controller For more details about device0 and device1 see: https://en....
struct gem5::IdeController::Channel::BMIRegs bmiRegs
Channel(std::string new_name, IdeController *new_ctrl, bool new_primary)
IdeDisk * selected() const
Device model for an Intel PIIX4 IDE controller.
virtual void postInterrupt(bool is_primary)
EndBitUnion(BMIStatusReg) BitUnion8(BMICommandReg) Bitfield< 3 > rw
virtual void clearInterrupt(bool is_primary)
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
IdeController(const Params &p)
EndBitUnion(BMICommandReg) class ConfigSpaceRegs ConfigSpaceRegs configSpaceRegs
Registers used in device specific PCI configuration.
void serialize(CheckpointOut &cp) const override
Serialize an object.
BitUnion8(BMIStatusReg) Bitfield< 6 > dmaCap0
void dispatchAccess(PacketPtr pkt, bool read)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick readConfig(PacketPtr pkt) override
Read from the PCI config space data that is stored locally.
Tick writeConfig(PacketPtr pkt) override
Write to the PCI config space data that is stored locally.
Interface for things with names.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
PCI device, base implementation is only config space.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void unserialize(ThreadContext &tc, CheckpointIn &cp)
uint64_t Tick
Tick count type.
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
#define PCI_DEVICE_SPECIFIC
Registers used for bus master interface.
const std::string & name()