gem5 v24.0.0.0
Loading...
Searching...
No Matches
intelmp.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
16 * met: redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer;
18 * redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution;
21 * neither the name of the copyright holders nor the names of its
22 * contributors may be used to endorse or promote products derived from
23 * this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef __ARCH_X86_BIOS_INTELMP_HH__
39#define __ARCH_X86_BIOS_INTELMP_HH__
40
41#include <string>
42#include <vector>
43
44#include "base/bitfield.hh"
45#include "base/compiler.hh"
46#include "enums/X86IntelMPAddressType.hh"
47#include "enums/X86IntelMPInterruptType.hh"
48#include "enums/X86IntelMPPolarity.hh"
49#include "enums/X86IntelMPRangeList.hh"
50#include "enums/X86IntelMPTriggerMode.hh"
51#include "sim/sim_object.hh"
52
53namespace gem5
54{
55
56class PortProxy;
57
58// Config entry types
59struct X86IntelMPBaseConfigEntryParams;
60struct X86IntelMPExtConfigEntryParams;
61
62// General table structures
63struct X86IntelMPConfigTableParams;
64struct X86IntelMPFloatingPointerParams;
65
66// Base entry types
67struct X86IntelMPBusParams;
68struct X86IntelMPIOAPICParams;
69struct X86IntelMPIOIntAssignmentParams;
70struct X86IntelMPLocalIntAssignmentParams;
71struct X86IntelMPProcessorParams;
72
73// Extended entry types
74struct X86IntelMPAddrSpaceMappingParams;
75struct X86IntelMPBusHierarchyParams;
76struct X86IntelMPCompatAddrSpaceModParams;
77
78template<class T>
79uint8_t writeOutField(PortProxy& proxy, Addr addr, T val);
80
81uint8_t writeOutString(PortProxy& proxy, Addr addr, std::string str,
82 int length);
83
84namespace X86ISA
85{
86
87namespace intelmp
88{
89
91{
92 protected:
93 typedef X86IntelMPFloatingPointerParams Params;
94
95 uint32_t tableAddr;
96 uint8_t specRev;
99
100 static const char signature[];
101
102 public:
103
105
107 {
108 return tableAddr;
109 }
110
112 {
113 tableAddr = addr;
114 }
115
116 FloatingPointer(const Params &p);
117};
118
120{
121 protected:
122 typedef X86IntelMPBaseConfigEntryParams Params;
123
124 uint8_t type;
125
126 public:
127
128 virtual Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
129
130 BaseConfigEntry(const Params &p, uint8_t _type);
131};
132
134{
135 protected:
136 typedef X86IntelMPExtConfigEntryParams Params;
137
138 uint8_t type;
139 uint8_t length;
140
141 public:
142
143 virtual Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
144
145 ExtConfigEntry(const Params &p, uint8_t _type, uint8_t _length);
146};
147
148class ConfigTable : public SimObject
149{
150 protected:
151 typedef X86IntelMPConfigTableParams Params;
152
153 static const char signature[];
154
155 uint8_t specRev;
156 std::string oemID;
157 std::string productID;
158 uint32_t oemTableAddr;
159 uint16_t oemTableSize;
160 uint32_t localApic;
161
164
165 public:
167
168 ConfigTable(const Params &p);
169};
170
172{
173 protected:
174 typedef X86IntelMPProcessorParams Params;
175
176 uint8_t localApicID;
178 uint8_t cpuFlags;
179 uint32_t cpuSignature;
180 uint32_t featureFlags;
181
182 public:
183 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
184
185 Processor(const Params &p);
186};
187
188class Bus : public BaseConfigEntry
189{
190 protected:
191 typedef X86IntelMPBusParams Params;
192
193 uint8_t busID;
194 std::string busType;
195
196 public:
197 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
198
199 Bus(const Params &p);
200};
201
203{
204 protected:
205 typedef X86IntelMPIOAPICParams Params;
206
207 uint8_t id;
208 uint8_t version;
209 uint8_t flags;
210 uint32_t address;
211
212 public:
213 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
214
215 IOAPIC(const Params &p);
216};
217
219{
220 protected:
222
223 uint16_t flags;
224
225 uint8_t sourceBusID;
227
228 uint8_t destApicID;
230
231 public:
232 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
233
234 IntAssignment(const X86IntelMPBaseConfigEntryParams &p,
235 enums::X86IntelMPInterruptType _interruptType,
236 enums::X86IntelMPPolarity polarity,
237 enums::X86IntelMPTriggerMode trigger,
238 uint8_t _type,
239 uint8_t _sourceBusID, uint8_t _sourceBusIRQ,
240 uint8_t _destApicID, uint8_t _destApicIntIn) :
241 BaseConfigEntry(p, _type),
242 interruptType(_interruptType), flags(0),
243 sourceBusID(_sourceBusID), sourceBusIRQ(_sourceBusIRQ),
244 destApicID(_destApicID), destApicIntIn(_destApicIntIn)
245 {
246 replaceBits(flags, 1, 0, polarity);
247 replaceBits(flags, 3, 2, trigger);
248 }
249};
250
252{
253 protected:
254 typedef X86IntelMPIOIntAssignmentParams Params;
255
256 public:
257 IOIntAssignment(const Params &p);
258};
259
261{
262 protected:
263 typedef X86IntelMPLocalIntAssignmentParams Params;
264
265 public:
267};
268
270{
271 protected:
272 typedef X86IntelMPAddrSpaceMappingParams Params;
273
274 uint8_t busID;
275 uint8_t addrType;
276 uint64_t addr;
277 uint64_t addrLength;
278
279 public:
280 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
281
282 AddrSpaceMapping(const Params &p);
283};
284
286{
287 protected:
288 typedef X86IntelMPBusHierarchyParams Params;
289
290 uint8_t busID;
291 uint8_t info;
292 uint8_t parentBus;
293
294 public:
295 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
296
297 BusHierarchy(const Params &p);
298};
299
301{
302 protected:
303 typedef X86IntelMPCompatAddrSpaceModParams Params;
304
305 uint8_t busID;
306 uint8_t mod;
307 uint32_t rangeList;
308
309 public:
310 Addr writeOut(PortProxy& proxy, Addr addr, uint8_t &checkSum);
311
313};
314
315} // namespace intelmp
316} // namespace X86ISA
317} // namespace gem5
318
319#endif
This object is a proxy for a port or other object which implements the functional response protocol,...
Definition port_proxy.hh:87
Abstract superclass for simulation objects.
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:341
X86IntelMPAddrSpaceMappingParams Params
Definition intelmp.hh:272
virtual Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:154
BaseConfigEntry(const Params &p, uint8_t _type)
Definition intelmp.cc:162
X86IntelMPBaseConfigEntryParams Params
Definition intelmp.hh:122
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:359
X86IntelMPBusHierarchyParams Params
Definition intelmp.hh:288
X86IntelMPBusParams Params
Definition intelmp.hh:191
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:282
Bus(const Params &p)
Definition intelmp.cc:291
X86IntelMPCompatAddrSpaceModParams Params
Definition intelmp.hh:303
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:382
std::vector< ExtConfigEntry * > extEntries
Definition intelmp.hh:163
std::vector< BaseConfigEntry * > baseEntries
Definition intelmp.hh:162
X86IntelMPConfigTableParams Params
Definition intelmp.hh:151
static const char signature[]
Definition intelmp.hh:153
Addr writeOut(PortProxy &proxy, Addr addr)
Definition intelmp.cc:186
virtual Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:168
ExtConfigEntry(const Params &p, uint8_t _type, uint8_t _length)
Definition intelmp.cc:178
X86IntelMPExtConfigEntryParams Params
Definition intelmp.hh:136
Addr writeOut(PortProxy &proxy, Addr addr)
Definition intelmp.cc:109
X86IntelMPFloatingPointerParams Params
Definition intelmp.hh:93
IOAPIC(const Params &p)
Definition intelmp.cc:307
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:296
X86IntelMPIOAPICParams Params
Definition intelmp.hh:205
X86IntelMPIOIntAssignmentParams Params
Definition intelmp.hh:254
IntAssignment(const X86IntelMPBaseConfigEntryParams &p, enums::X86IntelMPInterruptType _interruptType, enums::X86IntelMPPolarity polarity, enums::X86IntelMPTriggerMode trigger, uint8_t _type, uint8_t _sourceBusID, uint8_t _sourceBusIRQ, uint8_t _destApicID, uint8_t _destApicIntIn)
Definition intelmp.hh:234
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:315
X86IntelMPLocalIntAssignmentParams Params
Definition intelmp.hh:263
X86IntelMPProcessorParams Params
Definition intelmp.hh:174
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
Definition intelmp.cc:251
STL vector class.
Definition stl.hh:37
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
Definition bitfield.hh:216
Bitfield< 63 > val
Definition misc.hh:804
Bitfield< 3 > addr
Definition types.hh:84
Bitfield< 0 > p
Definition pagetable.hh:151
Bitfield< 21 > trigger
Definition intmessage.hh:52
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint8_t writeOutField(PortProxy &proxy, Addr addr, T val)
Definition intelmp.cc:72
uint8_t writeOutString(PortProxy &proxy, Addr addr, std::string str, int length)
Definition intelmp.cc:86

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