gem5  v21.1.0.2
i82094aa.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef __DEV_X86_I82094AA_HH__
30 #define __DEV_X86_I82094AA_HH__
31 
32 #include <map>
33 
34 #include "base/bitunion.hh"
35 #include "dev/x86/intdev.hh"
36 #include "dev/intpin.hh"
37 #include "dev/io_device.hh"
38 #include "params/I82094AA.hh"
39 
40 namespace gem5
41 {
42 
43 namespace X86ISA
44 {
45 
46 class I8259;
47 class Interrupts;
48 
49 class I82094AA : public BasicPioDevice
50 {
51  public:
52  BitUnion64(RedirTableEntry)
53  Bitfield<63, 32> topDW;
54  Bitfield<55, 32> topReserved;
55  Bitfield<31, 0> bottomDW;
56  Bitfield<31, 17> bottomReserved;
57  Bitfield<63, 56> dest;
58  Bitfield<16> mask;
59  Bitfield<15> trigger;
60  Bitfield<14> remoteIRR;
61  Bitfield<13> polarity;
62  Bitfield<12> deliveryStatus;
63  Bitfield<11> destMode;
64  Bitfield<10, 8> deliveryMode;
65  Bitfield<7, 0> vector;
66  EndBitUnion(RedirTableEntry)
67 
68  protected:
69  I8259 * extIntPic;
70 
71  uint8_t regSel;
72  uint8_t initialApicId;
73  uint8_t id;
74  uint8_t arbId;
75 
77 
78  static const uint8_t TableSize = 24;
79  // This implementation is based on version 0x11, but 0x14 avoids having
80  // to deal with the arbitration and APIC bus guck.
81  static const uint8_t APICVersion = 0x14;
82 
83  RedirTableEntry redirTable[TableSize];
85 
87 
89 
90  public:
91  using Params = I82094AAParams;
92 
93  I82094AA(const Params &p);
94 
95  void init() override;
96 
97  Tick read(PacketPtr pkt) override;
98  Tick write(PacketPtr pkt) override;
99 
100  void writeReg(uint8_t offset, uint32_t value);
101  uint32_t readReg(uint8_t offset);
102 
103  Port &getPort(const std::string &if_name,
104  PortID idx=InvalidPortID) override;
105 
106  bool recvResponse(PacketPtr pkt);
107 
108  void signalInterrupt(int line);
109  void raiseInterruptPin(int number);
110  void lowerInterruptPin(int number);
111 
112  void serialize(CheckpointOut &cp) const override;
113  void unserialize(CheckpointIn &cp) override;
114 };
115 
116 } // namespace X86ISA
117 } // namespace gem5
118 
119 #endif //__DEV_X86_SOUTH_BRIDGE_I8254_HH__
gem5::PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:252
gem5::X86ISA::I82094AA::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i82094aa.cc:94
io_device.hh
gem5::X86ISA::I82094AA::remoteIRR
Bitfield< 14 > remoteIRR
Definition: i82094aa.hh:60
gem5::X86ISA::I82094AA::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: i82094aa.cc:71
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::X86ISA::I82094AA::inputs
std::vector< IntSinkPin< I82094AA > * > inputs
Definition: i82094aa.hh:86
gem5::X86ISA::offset
offset
Definition: misc.hh:1030
gem5::X86ISA::I82094AA::topDW
topDW
Definition: i82094aa.hh:53
gem5::InvalidPortID
const PortID InvalidPortID
Definition: types.hh:253
gem5::X86ISA::I82094AA::lowestPriorityOffset
uint64_t lowestPriorityOffset
Definition: i82094aa.hh:76
gem5::PioDevice::Params
PioDeviceParams Params
Definition: io_device.hh:134
gem5::X86ISA::I82094AA::lowerInterruptPin
void lowerInterruptPin(int number)
Definition: i82094aa.cc:263
gem5::X86ISA::I82094AA::intRequestPort
IntRequestPort< I82094AA > intRequestPort
Definition: i82094aa.hh:88
gem5::X86ISA::I82094AA::regSel
EndBitUnion(RedirTableEntry) protected uint8_t regSel
Definition: i82094aa.hh:66
gem5::X86ISA::IntRequestPort
Definition: intdev.hh:100
gem5::X86ISA::I82094AA::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i82094aa.cc:283
gem5::X86ISA::I82094AA::deliveryMode
Bitfield< 10, 8 > deliveryMode
Definition: i82094aa.hh:64
gem5::X86ISA::I82094AA::pinStates
bool pinStates[TableSize]
Definition: i82094aa.hh:84
intdev.hh
gem5::X86ISA::I82094AA::writeReg
void writeReg(uint8_t offset, uint32_t value)
Definition: i82094aa.cc:132
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::X86ISA::I82094AA::initialApicId
uint8_t initialApicId
Definition: i82094aa.hh:72
bitunion.hh
gem5::X86ISA::I82094AA
Definition: i82094aa.hh:49
gem5::X86ISA::I82094AA::mask
Bitfield< 16 > mask
Definition: i82094aa.hh:58
gem5::X86ISA::I82094AA::raiseInterruptPin
void raiseInterruptPin(int number)
Definition: i82094aa.cc:254
gem5::X86ISA::I82094AA::topReserved
Bitfield< 55, 32 > topReserved
Definition: i82094aa.hh:54
gem5::X86ISA::I82094AA::arbId
uint8_t arbId
Definition: i82094aa.hh:74
gem5::X86ISA::I82094AA::BitUnion64
BitUnion64(RedirTableEntry) Bitfield< 63
gem5::X86ISA::I82094AA::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i82094aa.cc:270
gem5::Port
Ports are used to interface objects to each other.
Definition: port.hh:61
std
Overload hash function for BasicBlockRange type.
Definition: types.hh:111
gem5::X86ISA::I82094AA::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i82094aa.cc:113
gem5::X86ISA::I82094AA::redirTable
RedirTableEntry redirTable[TableSize]
Definition: i82094aa.hh:83
gem5::IntSinkPin
Definition: intpin.hh:78
gem5::X86ISA::I82094AA::polarity
Bitfield< 13 > polarity
Definition: i82094aa.hh:61
gem5::X86ISA::I82094AA::readReg
uint32_t readReg(uint8_t offset)
Definition: i82094aa.cc:157
gem5::X86ISA::I8259
Definition: i8259.hh:43
gem5::X86ISA::p
Bitfield< 0 > p
Definition: pagetable.hh:151
gem5::X86ISA::I82094AA::bottomDW
Bitfield< 31, 0 > bottomDW
Definition: i82094aa.hh:55
gem5::X86ISA::I82094AA::bottomReserved
Bitfield< 31, 17 > bottomReserved
Definition: i82094aa.hh:56
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::X86ISA::I82094AA::deliveryStatus
Bitfield< 12 > deliveryStatus
Definition: i82094aa.hh:62
intpin.hh
gem5::X86ISA::I82094AA::recvResponse
bool recvResponse(PacketPtr pkt)
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::BasicPioDevice
Definition: io_device.hh:147
gem5::X86ISA::I82094AA::destMode
Bitfield< 11 > destMode
Definition: i82094aa.hh:63
gem5::X86ISA::EndBitUnion
EndBitUnion(TriggerIntMessage) GEM5_DEPRECATED_NAMESPACE(DeliveryMode
gem5::X86ISA::I82094AA::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: i82094aa.cc:83
gem5::X86ISA::I82094AA::TableSize
static const uint8_t TableSize
Definition: i82094aa.hh:78
gem5::X86ISA::I82094AA::vector
Bitfield< 7, 0 > vector
Definition: i82094aa.hh:65
gem5::X86ISA::I82094AA::signalInterrupt
void signalInterrupt(int line)
Definition: i82094aa.cc:182
gem5::X86ISA::I82094AA::dest
Bitfield< 63, 56 > dest
Definition: i82094aa.hh:57
gem5::X86ISA::I82094AA::trigger
Bitfield< 15 > trigger
Definition: i82094aa.hh:59
gem5::X86ISA::I82094AA::APICVersion
static const uint8_t APICVersion
Definition: i82094aa.hh:81

Generated on Tue Sep 21 2021 12:25:23 for gem5 by doxygen 1.8.17