gem5 v24.0.0.0
Loading...
Searching...
No Matches
ide_disk.hh File Reference

Device model for an IDE disk. More...

#include "base/statistics.hh"
#include "dev/io_device.hh"
#include "dev/storage/disk_image.hh"
#include "dev/storage/ide_atareg.h"
#include "dev/storage/ide_ctrl.hh"
#include "dev/storage/ide_wdcreg.h"
#include "params/IdeDisk.hh"
#include "sim/eventq.hh"

Go to the source code of this file.

Classes

struct  gem5::PrdEntry_t
 
class  gem5::PrdTableEntry
 
struct  gem5::CommandReg_t
 
class  gem5::IdeDisk
 IDE Disk device model. More...
 
struct  gem5::IdeDisk::IdeDiskStats
 

Namespaces

namespace  gem5
 Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
 

Macros

#define DMA_BACKOFF_PERIOD   200
 
#define MAX_DMA_SIZE   0x20000
 
#define MAX_SINGLE_DMA_SIZE   0x10000
 
#define MAX_MULTSECT   (128)
 
#define PRD_BASE_MASK   0xfffffffe
 
#define PRD_COUNT_MASK   0xfffe
 
#define PRD_EOT_MASK   0x8000
 
#define DATA_OFFSET   (0)
 
#define ERROR_OFFSET   (1)
 
#define FEATURES_OFFSET   (1)
 
#define NSECTOR_OFFSET   (2)
 
#define SECTOR_OFFSET   (3)
 
#define LCYL_OFFSET   (4)
 
#define HCYL_OFFSET   (5)
 
#define SELECT_OFFSET   (6)
 
#define DRIVE_OFFSET   (6)
 
#define STATUS_OFFSET   (7)
 
#define COMMAND_OFFSET   (7)
 
#define CONTROL_OFFSET   (2)
 
#define ALTSTAT_OFFSET   (2)
 
#define SELECT_DEV_BIT   0x10
 
#define CONTROL_RST_BIT   0x04
 
#define CONTROL_IEN_BIT   0x02
 
#define STATUS_BSY_BIT   0x80
 
#define STATUS_DRDY_BIT   0x40
 
#define STATUS_DRQ_BIT   0x08
 
#define STATUS_SEEK_BIT   0x10
 
#define STATUS_DF_BIT   0x20
 
#define DRIVE_LBA_BIT   0x40
 
#define DEV0   (0)
 
#define DEV1   (1)
 

Enumerations

enum  gem5::Events_t {
  gem5::None = 0 , gem5::Transfer , gem5::ReadWait , gem5::WriteWait ,
  gem5::PrdRead , gem5::DmaRead , gem5::DmaWrite
}
 
enum  gem5::DevAction_t {
  gem5::ACT_NONE = 0 , gem5::ACT_CMD_WRITE , gem5::ACT_CMD_COMPLETE , gem5::ACT_CMD_ERROR ,
  gem5::ACT_SELECT_WRITE , gem5::ACT_STAT_READ , gem5::ACT_DATA_READY , gem5::ACT_DATA_READ_BYTE ,
  gem5::ACT_DATA_READ_SHORT , gem5::ACT_DATA_WRITE_BYTE , gem5::ACT_DATA_WRITE_SHORT , gem5::ACT_DMA_READY ,
  gem5::ACT_DMA_DONE , gem5::ACT_SRST_SET , gem5::ACT_SRST_CLEAR
}
 
enum  gem5::DevState_t {
  gem5::Device_Idle_S = 0 , gem5::Device_Idle_SI , gem5::Device_Idle_NS , gem5::Device_Srst ,
  gem5::Command_Execution , gem5::Prepare_Data_In , gem5::Data_Ready_INTRQ_In , gem5::Transfer_Data_In ,
  gem5::Prepare_Data_Out , gem5::Data_Ready_INTRQ_Out , gem5::Transfer_Data_Out , gem5::Prepare_Data_Dma ,
  gem5::Transfer_Data_Dma , gem5::Device_Dma_Abort
}
 
enum  gem5::DmaState_t { gem5::Dma_Idle = 0 , gem5::Dma_Start , gem5::Dma_Transfer }
 

Detailed Description

Device model for an IDE disk.

Definition in file ide_disk.hh.

Macro Definition Documentation

◆ ALTSTAT_OFFSET

#define ALTSTAT_OFFSET   (2)

Definition at line 114 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readControl().

◆ COMMAND_OFFSET

#define COMMAND_OFFSET   (7)

Definition at line 111 of file ide_disk.hh.

Referenced by gem5::IdeDisk::writeCommand().

◆ CONTROL_IEN_BIT

#define CONTROL_IEN_BIT   0x02

Definition at line 118 of file ide_disk.hh.

Referenced by gem5::IdeDisk::writeControl().

◆ CONTROL_OFFSET

#define CONTROL_OFFSET   (2)

Definition at line 113 of file ide_disk.hh.

Referenced by gem5::IdeDisk::writeControl().

◆ CONTROL_RST_BIT

#define CONTROL_RST_BIT   0x04

Definition at line 117 of file ide_disk.hh.

Referenced by gem5::IdeDisk::writeControl().

◆ DATA_OFFSET

#define DATA_OFFSET   (0)

Definition at line 101 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ DEV0

#define DEV0   (0)

Definition at line 126 of file ide_disk.hh.

Referenced by gem5::IdeDisk::reset().

◆ DEV1

#define DEV1   (1)

Definition at line 127 of file ide_disk.hh.

Referenced by gem5::IdeDisk::reset().

◆ DMA_BACKOFF_PERIOD

#define DMA_BACKOFF_PERIOD   200

◆ DRIVE_LBA_BIT

#define DRIVE_LBA_BIT   0x40

Definition at line 124 of file ide_disk.hh.

Referenced by gem5::IdeDisk::startCommand().

◆ DRIVE_OFFSET

#define DRIVE_OFFSET   (6)

Definition at line 109 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ ERROR_OFFSET

#define ERROR_OFFSET   (1)

Definition at line 102 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand().

◆ FEATURES_OFFSET

#define FEATURES_OFFSET   (1)

Definition at line 103 of file ide_disk.hh.

Referenced by gem5::IdeDisk::writeCommand().

◆ HCYL_OFFSET

#define HCYL_OFFSET   (5)

Definition at line 107 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ LCYL_OFFSET

#define LCYL_OFFSET   (4)

Definition at line 106 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ MAX_DMA_SIZE

◆ MAX_MULTSECT

#define MAX_MULTSECT   (128)

Definition at line 66 of file ide_disk.hh.

◆ MAX_SINGLE_DMA_SIZE

#define MAX_SINGLE_DMA_SIZE   0x10000

Definition at line 65 of file ide_disk.hh.

Referenced by gem5::PrdTableEntry::getByteCount().

◆ NSECTOR_OFFSET

#define NSECTOR_OFFSET   (2)

Definition at line 104 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ PRD_BASE_MASK

#define PRD_BASE_MASK   0xfffffffe

Definition at line 68 of file ide_disk.hh.

Referenced by gem5::PrdTableEntry::getBaseAddr().

◆ PRD_COUNT_MASK

#define PRD_COUNT_MASK   0xfffe

Definition at line 69 of file ide_disk.hh.

Referenced by gem5::PrdTableEntry::getByteCount().

◆ PRD_EOT_MASK

#define PRD_EOT_MASK   0x8000

Definition at line 70 of file ide_disk.hh.

Referenced by gem5::PrdTableEntry::getEOT().

◆ SECTOR_OFFSET

#define SECTOR_OFFSET   (3)

Definition at line 105 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand(), and gem5::IdeDisk::writeCommand().

◆ SELECT_DEV_BIT

#define SELECT_DEV_BIT   0x10

Definition at line 116 of file ide_disk.hh.

◆ SELECT_OFFSET

#define SELECT_OFFSET   (6)

Definition at line 108 of file ide_disk.hh.

◆ STATUS_BSY_BIT

#define STATUS_BSY_BIT   0x80

◆ STATUS_DF_BIT

#define STATUS_DF_BIT   0x20

Definition at line 123 of file ide_disk.hh.

◆ STATUS_DRDY_BIT

#define STATUS_DRDY_BIT   0x40

Definition at line 120 of file ide_disk.hh.

Referenced by gem5::IdeDisk::reset(), and gem5::IdeDisk::setComplete().

◆ STATUS_DRQ_BIT

#define STATUS_DRQ_BIT   0x08

Definition at line 121 of file ide_disk.hh.

Referenced by gem5::IdeDisk::updateState().

◆ STATUS_OFFSET

#define STATUS_OFFSET   (7)

Definition at line 110 of file ide_disk.hh.

Referenced by gem5::IdeDisk::readCommand().

◆ STATUS_SEEK_BIT

#define STATUS_SEEK_BIT   0x10

Definition at line 122 of file ide_disk.hh.

Referenced by gem5::IdeDisk::setComplete(), and gem5::IdeDisk::updateState().


Generated on Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0