gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
35#include "base/bitunion.hh"
36#include "dev/x86/intdev.hh"
37#include "dev/intpin.hh"
38#include "dev/io_device.hh"
39#include "params/I82094AA.hh"
40
41namespace gem5
42{
43
44namespace X86ISA
45{
46
47class Interrupts;
48
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 uint8_t regSel;
71 uint8_t id;
72 uint8_t arbId;
73
75
76 static const uint8_t TableSize = 24;
77 // This implementation is based on version 0x11, but 0x14 avoids having
78 // to deal with the arbitration and APIC bus guck.
79 static const uint8_t APICVersion = 0x14;
80
81 RedirTableEntry redirTable[TableSize];
83
85
87
88 void signalInterrupt(TriggerIntMessage message);
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
107
108 void requestInterrupt(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__
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
Ports are used to interface objects to each other.
Definition port.hh:62
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition i82094aa.cc:298
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition i82094aa.cc:112
static const uint8_t TableSize
Definition i82094aa.hh:76
Bitfield< 13 > polarity
Definition i82094aa.hh:61
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition i82094aa.cc:93
I82094AAParams Params
Definition i82094aa.hh:91
Bitfield< 12 > deliveryStatus
Definition i82094aa.hh:62
Bitfield< 63, 56 > dest
Definition i82094aa.hh:57
uint32_t readReg(uint8_t offset)
Definition i82094aa.cc:156
void signalInterrupt(TriggerIntMessage message)
Definition i82094aa.cc:217
Bitfield< 10, 8 > deliveryMode
Definition i82094aa.hh:64
BitUnion64(RedirTableEntry) Bitfield< 63
Bitfield< 55, 32 > topReserved
Definition i82094aa.hh:54
bool recvResponse(PacketPtr pkt)
void raiseInterruptPin(int number)
Definition i82094aa.cc:269
static const uint8_t APICVersion
Definition i82094aa.hh:79
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition i82094aa.cc:82
void lowerInterruptPin(int number)
Definition i82094aa.cc:278
void requestInterrupt(int line)
Definition i82094aa.cc:181
EndBitUnion(RedirTableEntry) protected uint8_t initialApicId
Definition i82094aa.hh:66
bool pinStates[TableSize]
Definition i82094aa.hh:82
std::vector< IntSinkPin< I82094AA > * > inputs
Definition i82094aa.hh:84
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition i82094aa.cc:285
uint64_t lowestPriorityOffset
Definition i82094aa.hh:74
Bitfield< 15 > trigger
Definition i82094aa.hh:59
Bitfield< 31, 17 > bottomReserved
Definition i82094aa.hh:56
IntRequestPort< I82094AA > intRequestPort
Definition i82094aa.hh:86
void writeReg(uint8_t offset, uint32_t value)
Definition i82094aa.cc:131
RedirTableEntry redirTable[TableSize]
Definition i82094aa.hh:81
Bitfield< 14 > remoteIRR
Definition i82094aa.hh:60
Bitfield< 7, 0 > vector
Definition i82094aa.hh:65
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition i82094aa.cc:70
Bitfield< 16 > mask
Definition i82094aa.hh:58
Bitfield< 31, 0 > bottomDW
Definition i82094aa.hh:55
Bitfield< 11 > destMode
Definition i82094aa.hh:63
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Definition bitunion.hh:428
Bitfield< 0 > p
Definition pagetable.hh:151
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
const PortID InvalidPortID
Definition types.hh:246
std::ostream CheckpointOut
Definition serialize.hh:66
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition types.hh:245
uint64_t Tick
Tick count type.
Definition types.hh:58
Overload hash function for BasicBlockRange type.
Definition binary32.hh:81

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