gem5  v20.1.0.0
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 X86ISA
41 {
42 
43 class I8259;
44 class Interrupts;
45 
46 class I82094AA : public BasicPioDevice
47 {
48  public:
49  BitUnion64(RedirTableEntry)
50  Bitfield<63, 32> topDW;
51  Bitfield<55, 32> topReserved;
52  Bitfield<31, 0> bottomDW;
53  Bitfield<31, 17> bottomReserved;
54  Bitfield<63, 56> dest;
55  Bitfield<16> mask;
56  Bitfield<15> trigger;
57  Bitfield<14> remoteIRR;
58  Bitfield<13> polarity;
59  Bitfield<12> deliveryStatus;
60  Bitfield<11> destMode;
61  Bitfield<10, 8> deliveryMode;
62  Bitfield<7, 0> vector;
63  EndBitUnion(RedirTableEntry)
64 
65  protected:
66  I8259 * extIntPic;
67 
68  uint8_t regSel;
69  uint8_t initialApicId;
70  uint8_t id;
71  uint8_t arbId;
72 
74 
75  static const uint8_t TableSize = 24;
76  // This implementation is based on version 0x11, but 0x14 avoids having
77  // to deal with the arbitration and APIC bus guck.
78  static const uint8_t APICVersion = 0x14;
79 
80  RedirTableEntry redirTable[TableSize];
82 
84 
86 
87  public:
88  typedef I82094AAParams Params;
89 
90  const Params *
91  params() const
92  {
93  return dynamic_cast<const Params *>(_params);
94  }
95 
96  I82094AA(Params *p);
97 
98  void init() override;
99 
100  Tick read(PacketPtr pkt) override;
101  Tick write(PacketPtr pkt) override;
102 
103  void writeReg(uint8_t offset, uint32_t value);
104  uint32_t readReg(uint8_t offset);
105 
106  Port &getPort(const std::string &if_name,
107  PortID idx=InvalidPortID) override;
108 
109  bool recvResponse(PacketPtr pkt);
110 
111  void signalInterrupt(int line);
112  void raiseInterruptPin(int number);
113  void lowerInterruptPin(int number);
114 
115  void serialize(CheckpointOut &cp) const override;
116  void unserialize(CheckpointIn &cp) override;
117 };
118 
119 } // namespace X86ISA
120 
121 #endif //__DEV_X86_SOUTH_BRIDGE_I8254_HH__
X86ISA::I82094AA::remoteIRR
Bitfield< 14 > remoteIRR
Definition: i82094aa.hh:57
io_device.hh
X86ISA::I82094AA::mask
Bitfield< 16 > mask
Definition: i82094aa.hh:55
X86ISA::I82094AA::polarity
Bitfield< 13 > polarity
Definition: i82094aa.hh:58
X86ISA::I82094AA::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i82094aa.cc:91
X86ISA::I82094AA::bottomDW
Bitfield< 31, 0 > bottomDW
Definition: i82094aa.hh:52
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:238
X86ISA::I82094AA::topReserved
Bitfield< 55, 32 > topReserved
Definition: i82094aa.hh:51
X86ISA::I82094AA::vector
Bitfield< 7, 0 > vector
Definition: i82094aa.hh:62
X86ISA::I8259
Definition: i8259.hh:40
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
X86ISA::I82094AA::trigger
Bitfield< 15 > trigger
Definition: i82094aa.hh:56
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
X86ISA::I82094AA::BitUnion64
BitUnion64(RedirTableEntry) Bitfield< 63
X86ISA::I82094AA::raiseInterruptPin
void raiseInterruptPin(int number)
Definition: i82094aa.cc:251
X86ISA::I82094AA::APICVersion
static const uint8_t APICVersion
Definition: i82094aa.hh:78
X86ISA::I82094AA::lowestPriorityOffset
uint64_t lowestPriorityOffset
Definition: i82094aa.hh:73
X86ISA::I82094AA::deliveryStatus
Bitfield< 12 > deliveryStatus
Definition: i82094aa.hh:59
cp
Definition: cprintf.cc:40
X86ISA::I82094AA::writeReg
void writeReg(uint8_t offset, uint32_t value)
Definition: i82094aa.cc:129
X86ISA::I82094AA::initialApicId
uint8_t initialApicId
Definition: i82094aa.hh:69
X86ISA::I82094AA::topDW
topDW
Definition: i82094aa.hh:50
intdev.hh
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
bitunion.hh
PioDevice::Params
PioDeviceParams Params
Definition: io_device.hh:131
X86ISA::I82094AA::signalInterrupt
void signalInterrupt(int line)
Definition: i82094aa.cc:179
X86ISA::I82094AA::TableSize
static const uint8_t TableSize
Definition: i82094aa.hh:75
IntSinkPin
Definition: intpin.hh:75
X86ISA::IntRequestPort
Definition: intdev.hh:97
X86ISA::I82094AA::bottomReserved
Bitfield< 31, 17 > bottomReserved
Definition: i82094aa.hh:53
X86ISA::I82094AA::intRequestPort
IntRequestPort< I82094AA > intRequestPort
Definition: i82094aa.hh:85
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:80
X86ISA::I82094AA::redirTable
RedirTableEntry redirTable[TableSize]
Definition: i82094aa.hh:80
X86ISA::I82094AA::pinStates
bool pinStates[TableSize]
Definition: i82094aa.hh:81
X86ISA
This is exposed globally, independent of the ISA.
Definition: acpi.hh:55
X86ISA::I82094AA::I82094AA
I82094AA(Params *p)
Definition: i82094aa.cc:42
X86ISA::offset
offset
Definition: misc.hh:1024
X86ISA::I82094AA::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i82094aa.cc:110
X86ISA::I82094AA::recvResponse
bool recvResponse(PacketPtr pkt)
X86ISA::p
Bitfield< 0 > p
Definition: pagetable.hh:151
std
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:587
X86ISA::I82094AA::params
const Params * params() const
Definition: i82094aa.hh:91
X86ISA::I82094AA::destMode
Bitfield< 11 > destMode
Definition: i82094aa.hh:60
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
X86ISA::I82094AA::Params
I82094AAParams Params
Definition: i82094aa.hh:88
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
X86ISA::EndBitUnion
EndBitUnion(TriggerIntMessage) namespace DeliveryMode
Definition: intmessage.hh:49
BasicPioDevice
Definition: io_device.hh:150
X86ISA::I82094AA
Definition: i82094aa.hh:46
X86ISA::I82094AA::dest
Bitfield< 63, 56 > dest
Definition: i82094aa.hh:54
X86ISA::I82094AA::regSel
EndBitUnion(RedirTableEntry) protected uint8_t regSel
Definition: i82094aa.hh:63
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
X86ISA::I82094AA::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i82094aa.cc:267
intpin.hh
X86ISA::I82094AA::inputs
std::vector< IntSinkPin< I82094AA > * > inputs
Definition: i82094aa.hh:83
X86ISA::I82094AA::deliveryMode
Bitfield< 10, 8 > deliveryMode
Definition: i82094aa.hh:61
CheckpointIn
Definition: serialize.hh:67
X86ISA::I82094AA::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i82094aa.cc:280
X86ISA::I82094AA::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: i82094aa.cc:68
X86ISA::I82094AA::arbId
uint8_t arbId
Definition: i82094aa.hh:71
X86ISA::I82094AA::readReg
uint32_t readReg(uint8_t offset)
Definition: i82094aa.cc:154
X86ISA::I82094AA::lowerInterruptPin
void lowerInterruptPin(int number)
Definition: i82094aa.cc:260

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17