gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gic_v3_its.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 ARM Limited
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 __DEV_ARM_GICV3_ITS_H__
39 #define __DEV_ARM_GICV3_ITS_H__
40 
41 #include <cstdint>
42 #include <memory>
43 #include <queue>
44 #include <vector>
45 
46 #include "base/addr_range.hh"
47 #include "base/bitunion.hh"
48 #include "base/coroutine.hh"
49 #include "base/types.hh"
50 #include "dev/dma_device.hh"
51 #include "params/Gicv3Its.hh"
52 
53 class Gicv3;
54 class Gicv3Redistributor;
55 class ItsProcess;
56 class ItsTranslation;
57 class ItsCommand;
58 
59 enum class ItsActionType
60 {
62  SEND_REQ,
63  TERMINATE,
64 };
65 
66 struct ItsAction
67 {
71 };
72 
80 class Gicv3Its : public BasicPioDevice
81 {
82  friend class ::ItsProcess;
83  friend class ::ItsTranslation;
84  friend class ::ItsCommand;
85  public:
86  class DataPort : public RequestPort
87  {
88  protected:
90 
91  public:
92  DataPort(const std::string &_name, Gicv3Its &_its) :
93  RequestPort(_name, &_its),
94  its(_its)
95  {}
96 
97  virtual ~DataPort() {}
98 
99  bool recvTimingResp(PacketPtr pkt) { return its.recvTimingResp(pkt); }
100  void recvReqRetry() { return its.recvReqRetry(); }
101  };
102 
104 
105  Port & getPort(const std::string &if_name, PortID idx) override;
106  bool recvTimingResp(PacketPtr pkt);
107  void recvReqRetry();
108 
109  Gicv3Its(const Gicv3ItsParams &params);
110 
111  void setGIC(Gicv3 *_gic);
112 
113  static const uint32_t itsControl = 0x0;
114  static const uint32_t itsTranslate = 0x10000;
115 
116  // Address range part of Control frame
117  static const AddrRange GITS_BASER;
118 
119  static const uint32_t NUM_BASER_REGS = 8;
120 
121  // We currently don't support two level ITS tables
122  // The indirect bit is RAZ/WI for implementations that only
123  // support flat tables.
124  static const uint64_t BASER_INDIRECT = 0x4000000000000000;
125  static const uint64_t BASER_TYPE = 0x0700000000000000;
126  static const uint64_t BASER_ESZ = 0x001F000000000000;
127  static const uint64_t BASER_SZ = 0x00000000000000FF;
128  static const uint64_t BASER_WMASK =
130  static const uint64_t BASER_WMASK_UNIMPL =
132 
133  // GITS_CTLR.quiescent mask
134  static const uint32_t CTLR_QUIESCENT;
135 
136  enum : Addr
137  {
138  // Control frame
139  GITS_CTLR = itsControl + 0x0000,
140  GITS_IIDR = itsControl + 0x0004,
141  GITS_TYPER = itsControl + 0x0008,
145  GITS_PIDR2 = itsControl + 0xffe8,
146 
147  // Translation frame
149  };
150 
151  AddrRangeList getAddrRanges() const override;
152 
153  Tick read(PacketPtr pkt) override;
154  Tick write(PacketPtr pkt) override;
155 
156  DrainState drain() override;
157  void serialize(CheckpointOut & cp) const override;
158  void unserialize(CheckpointIn & cp) override;
159 
160  void translate(PacketPtr pkt);
161 
162  BitUnion32(CTLR)
163  Bitfield<31> quiescent;
164  Bitfield<7, 4> itsNumber;
165  Bitfield<1> imDe;
166  Bitfield<0> enabled;
167  EndBitUnion(CTLR)
168 
169  // Command read/write, (CREADR, CWRITER)
170  BitUnion64(CRDWR)
171  Bitfield<63, 32> high;
172  Bitfield<31, 0> low;
173  Bitfield<19, 5> offset;
174  Bitfield<0> retry;
175  Bitfield<0> stalled;
176  EndBitUnion(CRDWR)
177 
178  BitUnion64(CBASER)
179  Bitfield<63, 32> high;
180  Bitfield<31, 0> low;
181  Bitfield<63> valid;
182  Bitfield<61, 59> innerCache;
183  Bitfield<55, 53> outerCache;
184  Bitfield<51, 12> physAddr;
185  Bitfield<11, 10> shareability;
186  Bitfield<7, 0> size;
187  EndBitUnion(CBASER)
188 
189  BitUnion64(BASER)
190  Bitfield<63> valid;
191  Bitfield<62> indirect;
192  Bitfield<61, 59> innerCache;
193  Bitfield<58, 56> type;
194  Bitfield<55, 53> outerCache;
195  Bitfield<52, 48> entrySize;
196  Bitfield<47, 12> physAddr;
197  Bitfield<11, 10> shareability;
198  Bitfield<9, 8> pageSize;
199  Bitfield<7, 0> size;
200  EndBitUnion(BASER)
201 
202  BitUnion64(TYPER)
203  Bitfield<63, 32> high;
204  Bitfield<31, 0> low;
205  Bitfield<37> vmovp;
206  Bitfield<36> cil;
207  Bitfield<35, 32> cidBits;
208  Bitfield<31, 24> hcc;
209  Bitfield<19> pta;
210  Bitfield<18> seis;
211  Bitfield<17, 13> devBits;
212  Bitfield<12, 8> idBits;
213  Bitfield<7, 4> ittEntrySize;
214  Bitfield<2> cct;
215  Bitfield<1> _virtual;
216  Bitfield<0> physical;
217  EndBitUnion(TYPER)
218 
219  CTLR gitsControl;
220  TYPER gitsTyper;
221  CBASER gitsCbaser;
222  CRDWR gitsCreadr;
223  CRDWR gitsCwriter;
224  uint32_t gitsIidr;
225  uint32_t gitsTranslater;
226 
228 
233  bool idOutOfRange(uint32_t event_id, uint8_t itt_range) const;
234 
240  bool deviceOutOfRange(uint32_t device_id) const;
241 
248  bool sizeOutOfRange(uint32_t size) const;
249 
255  bool collectionOutOfRange(uint32_t collection_id) const;
256 
261  bool lpiOutOfRange(uint32_t intid) const;
262 
263  private: // Command
264  uint64_t maxCommands() const;
265  void checkCommandQueue();
266  void incrementReadPointer();
267 
268  public: // TableWalk
269  BitUnion64(DTE)
270  Bitfield<57, 53> ittRange;
271  Bitfield<52, 1> ittAddress;
272  Bitfield<0> valid;
273  EndBitUnion(DTE)
274 
275  BitUnion64(ITTE)
276  Bitfield<59, 46> vpeid;
277  Bitfield<45, 30> icid;
278  Bitfield<29, 16> intNumHyp;
279  Bitfield<15, 2> intNum;
280  Bitfield<1> intType;
281  Bitfield<0> valid;
282  EndBitUnion(ITTE)
283 
284  BitUnion64(CTE)
285  Bitfield<40, 1> rdBase;
286  Bitfield<0> valid;
288 
289  enum InterruptType
290  {
291  VIRTUAL_INTERRUPT = 0,
292  PHYSICAL_INTERRUPT = 1
293  };
294 
295  private:
296  Gicv3Redistributor* getRedistributor(uint64_t rd_base);
298  {
299  return getRedistributor(cte.rdBase);
300  }
301 
305 
307  {
312  };
313 
314  enum PageSize
315  {
319  };
320 
321  Addr pageAddress(enum ItsTables table);
322 
323  void moveAllPendingState(
325 
326  private:
327  std::queue<ItsAction> packetsToRetry;
328  uint32_t requestorId;
331 
334 };
335 
352 {
353  public:
354  using DTE = Gicv3Its::DTE;
355  using ITTE = Gicv3Its::ITTE;
356  using CTE = Gicv3Its::CTE;
359 
360  ItsProcess(Gicv3Its &_its);
361  virtual ~ItsProcess();
362 
364  const std::string name() const;
365 
366  ItsAction run(PacketPtr pkt);
367 
368  protected:
369  void reinit();
370  virtual void main(Yield &yield) = 0;
371 
372  void writeDeviceTable(Yield &yield, uint32_t device_id, DTE dte);
373 
375  Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte);
376 
378  Yield &yield, uint32_t collection_id, CTE cte);
379 
380  uint64_t readDeviceTable(
381  Yield &yield, uint32_t device_id);
382 
383  uint64_t readIrqTranslationTable(
384  Yield &yield, const Addr itt_base, uint32_t event_id);
385 
386  uint64_t readIrqCollectionTable(Yield &yield, uint32_t collection_id);
387 
388  void doRead(Yield &yield, Addr addr, void *ptr, size_t size);
389  void doWrite(Yield &yield, Addr addr, void *ptr, size_t size);
390  void terminate(Yield &yield);
391 
392  protected:
394 
395  private:
396  std::unique_ptr<Coroutine> coroutine;
397 };
398 
406 {
407  public:
408  ItsTranslation(Gicv3Its &_its);
409  ~ItsTranslation();
410 
411  protected:
412  void main(Yield &yield) override;
413 
415  translateLPI(Yield &yield, uint32_t device_id, uint32_t event_id);
416 };
417 
424 class ItsCommand : public ItsProcess
425 {
426  public:
428  {
429  struct
430  {
431  uint32_t type;
432  uint32_t deviceId;
433  uint32_t eventId;
434  uint32_t pintId;
435 
436  uint32_t data[4];
437  };
438  uint64_t raw[4];
439  };
440 
441  enum CommandType : uint32_t
442  {
443  CLEAR = 0x04,
444  DISCARD = 0x0F,
445  INT = 0x03,
446  INV = 0x0C,
447  INVALL = 0x0D,
448  MAPC = 0x09,
449  MAPD = 0x08,
450  MAPI = 0x0B,
451  MAPTI = 0x0A,
452  MOVALL = 0x0E,
453  MOVI = 0x01,
454  SYNC = 0x05,
455  VINVALL = 0x2D,
456  VMAPI = 0x2B,
457  VMAPP = 0x29,
458  VMAPTI = 0x2A,
459  VMOVI = 0x21,
460  VMOVP = 0x22,
461  VSYNC = 0x25
462  };
463 
464  ItsCommand(Gicv3Its &_its);
465  ~ItsCommand();
466 
467  protected:
474  {
475  using ExecFn = std::function<void(ItsCommand*, Yield&, CommandEntry&)>;
476 
477  DispatchEntry(std::string _name, ExecFn _exec)
478  : name(_name), exec(_exec)
479  {}
480 
481  std::string name;
483  };
484 
485  using DispatchTable = std::unordered_map<
487 
489 
490  static std::string commandName(uint32_t cmd);
491 
492  void main(Yield &yield) override;
493 
494  void readCommand(Yield &yield, CommandEntry &command);
495  void processCommand(Yield &yield, CommandEntry &command);
496 
497  // Commands
498  void clear(Yield &yield, CommandEntry &command);
499  void discard(Yield &yield, CommandEntry &command);
500  void mapc(Yield &yield, CommandEntry &command);
501  void mapd(Yield &yield, CommandEntry &command);
502  void mapi(Yield &yield, CommandEntry &command);
503  void mapti(Yield &yield, CommandEntry &command);
504  void movall(Yield &yield, CommandEntry &command);
505  void movi(Yield &yield, CommandEntry &command);
506  void sync(Yield &yield, CommandEntry &command);
507  void doInt(Yield &yield, CommandEntry &command);
508  void inv(Yield &yield, CommandEntry &command);
509  void invall(Yield &yield, CommandEntry &command);
510  void vinvall(Yield &yield, CommandEntry &command);
511  void vmapi(Yield &yield, CommandEntry &command);
512  void vmapp(Yield &yield, CommandEntry &command);
513  void vmapti(Yield &yield, CommandEntry &command);
514  void vmovi(Yield &yield, CommandEntry &command);
515  void vmovp(Yield &yield, CommandEntry &command);
516  void vsync(Yield &yield, CommandEntry &command);
517 
518  protected: // Helpers
519  bool idOutOfRange(CommandEntry &command, DTE dte) const
520  {
521  return its.idOutOfRange(command.eventId, dte.ittRange);
522  }
523 
524  bool deviceOutOfRange(CommandEntry &command) const
525  {
526  return its.deviceOutOfRange(command.deviceId);
527  }
528 
529  bool sizeOutOfRange(CommandEntry &command) const
530  {
531  const auto size = bits(command.raw[1], 4, 0);
532  const auto valid = bits(command.raw[2], 63);
533  if (valid)
534  return its.sizeOutOfRange(size);
535  else
536  return false;
537  }
538 
539  bool collectionOutOfRange(CommandEntry &command) const
540  {
541  return its.collectionOutOfRange(bits(command.raw[2], 15, 0));
542  }
543 };
544 
545 #endif
ItsCommand::MOVALL
@ MOVALL
Definition: gic_v3_its.hh:452
Gicv3Its::TRANSLATION_TABLE
@ TRANSLATION_TABLE
Definition: gic_v3_its.hh:310
Gicv3Its::deviceOutOfRange
bool deviceOutOfRange(uint32_t device_id) const
Returns TRUE if the value supplied has bits above the implemented range or if the value supplied exce...
Definition: gic_v3_its.cc:997
Gicv3Its::gitsIidr
uint32_t gitsIidr
Definition: gic_v3_its.hh:224
Gicv3Its::getPort
Port & getPort(const std::string &if_name, PortID idx) override
Get a port with a given name and index.
Definition: gic_v3_its.cc:1111
ItsProcess::ITTE
Gicv3Its::ITTE ITTE
Definition: gic_v3_its.hh:355
Gicv3Its::requestorId
uint32_t requestorId
Definition: gic_v3_its.hh:328
Gicv3Its::entrySize
Bitfield< 52, 48 > entrySize
Definition: gic_v3_its.hh:195
Gicv3Its::GITS_TYPER
@ GITS_TYPER
Definition: gic_v3_its.hh:141
Gicv3Its::hcc
Bitfield< 31, 24 > hcc
Definition: gic_v3_its.hh:208
Gicv3Its::GITS_BASER
static const AddrRange GITS_BASER
Definition: gic_v3_its.hh:117
Gicv3Its::collectionOutOfRange
bool collectionOutOfRange(uint32_t collection_id) const
Returns TRUE if the value supplied has bits above the implemented range or if the value exceeds the t...
Definition: gic_v3_its.cc:1009
Gicv3Its::getAddrRanges
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Definition: gic_v3_its.cc:812
Gicv3Its::_virtual
Bitfield< 1 > _virtual
Definition: gic_v3_its.hh:215
ItsCommand::movall
void movall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:657
Gicv3Its::size
Bitfield< 7, 0 > size
Definition: gic_v3_its.hh:186
Gicv3Its::gitsTyper
TYPER gitsTyper
Definition: gic_v3_its.hh:220
Gicv3Its::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic_v3_its.cc:822
Gicv3Its::idBits
Bitfield< 12, 8 > idBits
Definition: gic_v3_its.hh:212
ItsCommand::deviceOutOfRange
bool deviceOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:524
ItsCommand::vmapp
void vmapp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:750
ItsCommand::DispatchEntry::name
std::string name
Definition: gic_v3_its.hh:481
Gicv3Its::retry
Bitfield< 0 > retry
Definition: gic_v3_its.hh:174
Gicv3Its::GITS_CBASER
@ GITS_CBASER
Definition: gic_v3_its.hh:142
m5::Coroutine::CallerType
CallerType: A reference to an object of this class will be passed to the coroutine task.
Definition: coroutine.hh:83
ItsCommand::doInt
void doInt(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:465
Gicv3Its::dmaPort
DataPort dmaPort
Definition: gic_v3_its.hh:103
ItsCommand::vsync
void vsync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:774
ItsProcess::ItsProcess
ItsProcess(Gicv3Its &_its)
Definition: gic_v3_its.cc:60
ItsCommand::VMOVP
@ VMOVP
Definition: gic_v3_its.hh:460
Gicv3Its::gitsTranslater
uint32_t gitsTranslater
Definition: gic_v3_its.hh:225
Gicv3Its::ittEntrySize
Bitfield< 7, 4 > ittEntrySize
Definition: gic_v3_its.hh:213
ItsProcess::writeDeviceTable
void writeDeviceTable(Yield &yield, uint32_t device_id, DTE dte)
Definition: gic_v3_its.cc:149
Gicv3Its::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Definition: gic_v3_its.cc:1137
ItsCommand::CommandEntry::eventId
uint32_t eventId
Definition: gic_v3_its.hh:433
Gicv3Its::moveAllPendingState
void moveAllPendingState(Gicv3Redistributor *rd1, Gicv3Redistributor *rd2)
Definition: gic_v3_its.cc:1272
ItsTranslation::translateLPI
std::pair< uint32_t, Gicv3Redistributor * > translateLPI(Yield &yield, uint32_t device_id, uint32_t event_id)
Definition: gic_v3_its.cc:262
ItsCommand::MAPI
@ MAPI
Definition: gic_v3_its.hh:450
Gicv3Its::commandEvent
EventFunctionWrapper commandEvent
Definition: gic_v3_its.hh:330
ItsCommand::commandName
static std::string commandName(uint32_t cmd)
Definition: gic_v3_its.cc:333
ItsProcess::coroutine
std::unique_ptr< Coroutine > coroutine
Definition: gic_v3_its.hh:396
Gicv3Its::tableBases
std::vector< BASER > tableBases
Definition: gic_v3_its.hh:227
ItsCommand::MAPTI
@ MAPTI
Definition: gic_v3_its.hh:451
ItsCommand::INV
@ INV
Definition: gic_v3_its.hh:446
Gicv3Its::DataPort::DataPort
DataPort(const std::string &_name, Gicv3Its &_its)
Definition: gic_v3_its.hh:92
ItsCommand::CommandEntry::type
uint32_t type
Definition: gic_v3_its.hh:431
Gicv3Its::itsTranslate
static const uint32_t itsTranslate
Definition: gic_v3_its.hh:114
Gicv3Its::innerCache
Bitfield< 61, 59 > innerCache
Definition: gic_v3_its.hh:182
Gicv3Its::ItsTables
ItsTables
Definition: gic_v3_its.hh:306
ItsCommand::CommandEntry::pintId
uint32_t pintId
Definition: gic_v3_its.hh:434
Gicv3Its::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: gic_v3_its.cc:1039
ItsCommand::SYNC
@ SYNC
Definition: gic_v3_its.hh:454
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
Gicv3Its::physAddr
Bitfield< 51, 12 > physAddr
Definition: gic_v3_its.hh:184
ItsCommand::VMAPP
@ VMAPP
Definition: gic_v3_its.hh:457
ItsProcess::doWrite
void doWrite(Yield &yield, Addr addr, void *ptr, size_t size)
Definition: gic_v3_its.cc:115
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:243
ItsCommand::VSYNC
@ VSYNC
Definition: gic_v3_its.hh:461
ItsProcess::reinit
void reinit()
Definition: gic_v3_its.cc:70
Gicv3Its::runProcessTiming
ItsAction runProcessTiming(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1163
ItsCommand::mapi
void mapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:587
Gicv3Its::setGIC
void setGIC(Gicv3 *_gic)
Definition: gic_v3_its.cc:805
Gicv3Its::BASER_ESZ
static const uint64_t BASER_ESZ
Definition: gic_v3_its.hh:126
ItsCommand::sync
void sync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:732
Gicv3Its::devBits
Bitfield< 17, 13 > devBits
Definition: gic_v3_its.hh:211
ItsCommand::movi
void movi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:671
Gicv3Its::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: gic_v3_its.cc:1052
Gicv3Its::GITS_PIDR2
@ GITS_PIDR2
Definition: gic_v3_its.hh:145
Gicv3Its::DataPort::its
Gicv3Its & its
Definition: gic_v3_its.hh:89
Gicv3Its::BitUnion64
BitUnion64(DTE) Bitfield< 57
Gicv3Its::stalled
Bitfield< 0 > stalled
Definition: gic_v3_its.hh:175
Gicv3Its::GITS_CREADR
@ GITS_CREADR
Definition: gic_v3_its.hh:144
Gicv3Its::checkCommandQueue
void checkCommandQueue()
Definition: gic_v3_its.cc:1083
Gicv3Its::SIZE_16K
@ SIZE_16K
Definition: gic_v3_its.hh:317
ItsCommand::CommandEntry
Definition: gic_v3_its.hh:427
Gicv3Its::SIZE_64K
@ SIZE_64K
Definition: gic_v3_its.hh:318
ItsCommand::collectionOutOfRange
bool collectionOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:539
EventFunctionWrapper
Definition: eventq.hh:1112
ItsCommand::MAPC
@ MAPC
Definition: gic_v3_its.hh:448
Gicv3Its::recvReqRetry
void recvReqRetry()
Definition: gic_v3_its.cc:1120
ItsActionType
ItsActionType
Definition: gic_v3_its.hh:59
ItsProcess::run
ItsAction run(PacketPtr pkt)
Definition: gic_v3_its.cc:83
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
Gicv3Its::BASER_WMASK
static const uint64_t BASER_WMASK
Definition: gic_v3_its.hh:128
Gicv3Its::BitUnion32
BitUnion32(CTLR) Bitfield< 31 > quiescent
Gicv3Its::pageAddress
Addr pageAddress(enum ItsTables table)
Definition: gic_v3_its.cc:1247
Gicv3Its::sizeOutOfRange
bool sizeOutOfRange(uint32_t size) const
Returns TRUE if the value (size) supplied exceeds the maximum allowed by GITS_TYPER....
Definition: gic_v3_its.cc:1003
Gicv3Its::BASER_TYPE
static const uint64_t BASER_TYPE
Definition: gic_v3_its.hh:125
Gicv3Its::low
Bitfield< 31, 0 > low
Definition: gic_v3_its.hh:172
cp
Definition: cprintf.cc:37
Gicv3Its::intType
Bitfield< 1 > intType
Definition: gic_v3_its.hh:280
Gicv3Its::idOutOfRange
bool idOutOfRange(uint32_t event_id, uint8_t itt_range) const
Returns TRUE if the eventID supplied has bits above the implemented size or above the itt_range.
Definition: gic_v3_its.cc:989
dma_device.hh
Gicv3Its::itsControl
static const uint32_t itsControl
Definition: gic_v3_its.hh:113
ItsCommand::INVALL
@ INVALL
Definition: gic_v3_its.hh:447
Packet::SenderState
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:432
ItsCommand::main
void main(Yield &yield) override
Definition: gic_v3_its.cc:340
AddrRange
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:68
Gicv3Its::gic
Gicv3 * gic
Definition: gic_v3_its.hh:329
ItsCommand::CommandEntry::data
uint32_t data[4]
Definition: gic_v3_its.hh:436
ItsCommand::sizeOutOfRange
bool sizeOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:529
ItsCommand::mapd
void mapd(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:571
Gicv3Its::lpiOutOfRange
bool lpiOutOfRange(uint32_t intid) const
Returns TRUE if the value supplied is larger than that permitted by GICD_TYPER.IDbits or not in the L...
Definition: gic_v3_its.cc:1020
Gicv3Its::pageSize
Bitfield< 9, 8 > pageSize
Definition: gic_v3_its.hh:198
Gicv3Its::vpeid
vpeid
Definition: gic_v3_its.hh:276
Gicv3Its::ittRange
ittRange
Definition: gic_v3_its.hh:270
ItsAction::type
ItsActionType type
Definition: gic_v3_its.hh:68
ItsActionType::SEND_REQ
@ SEND_REQ
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
bitunion.hh
ItsCommand::CommandEntry::deviceId
uint32_t deviceId
Definition: gic_v3_its.hh:432
ItsProcess::name
const std::string name() const
Returns the Gicv3Its name.
Definition: gic_v3_its.cc:77
ItsCommand::clear
void clear(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:391
ItsCommand::vmapi
void vmapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:744
ItsProcess::writeIrqTranslationTable
void writeIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte)
Definition: gic_v3_its.cc:160
Gicv3Its::GITS_CTLR
@ GITS_CTLR
Definition: gic_v3_its.hh:139
Gicv3Its
GICv3 ITS module.
Definition: gic_v3_its.hh:80
ItsProcess::doRead
void doRead(Yield &yield, Addr addr, void *ptr, size_t size)
Definition: gic_v3_its.cc:91
Gicv3Its::SIZE_4K
@ SIZE_4K
Definition: gic_v3_its.hh:316
Gicv3Its::BASER_SZ
static const uint64_t BASER_SZ
Definition: gic_v3_its.hh:127
ItsCommand::DispatchTable
std::unordered_map< std::underlying_type< enum CommandType >::type, DispatchEntry > DispatchTable
Definition: gic_v3_its.hh:486
Gicv3Its::rdBase
rdBase
Definition: gic_v3_its.hh:285
Gicv3Its::gitsCwriter
CRDWR gitsCwriter
Definition: gic_v3_its.hh:223
ItsCommand::idOutOfRange
bool idOutOfRange(CommandEntry &command, DTE dte) const
Definition: gic_v3_its.hh:519
Gicv3
Definition: gic_v3.hh:53
Gicv3Its::DataPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: gic_v3_its.hh:99
ItsActionType::TERMINATE
@ TERMINATE
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
ItsCommand::INT
@ INT
Definition: gic_v3_its.hh:445
Gicv3Its::cct
Bitfield< 2 > cct
Definition: gic_v3_its.hh:214
std::pair
STL pair class.
Definition: stl.hh:58
Gicv3Its::EndBitUnion
EndBitUnion(CTLR) BitUnion64(CRDWR) Bitfield< 63
ItsCommand::vmapti
void vmapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:756
Gicv3Its::cidBits
Bitfield< 35, 32 > cidBits
Definition: gic_v3_its.hh:207
ItsCommand::DispatchEntry::exec
ExecFn exec
Definition: gic_v3_its.hh:482
Gicv3Its::valid
Bitfield< 63 > valid
Definition: gic_v3_its.hh:181
ItsProcess::readDeviceTable
uint64_t readDeviceTable(Yield &yield, uint32_t device_id)
Definition: gic_v3_its.cc:183
m5::Coroutine
This template defines a Coroutine wrapper type with a Boost-like interface.
Definition: coroutine.hh:62
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
ItsCommand::DispatchEntry::ExecFn
std::function< void(ItsCommand *, Yield &, CommandEntry &)> ExecFn
Definition: gic_v3_its.hh:475
ItsCommand
An ItsCommand is created whenever there is a new command in the command queue.
Definition: gic_v3_its.hh:424
ItsProcess::terminate
void terminate(Yield &yield)
Definition: gic_v3_its.cc:139
ItsCommand::vmovp
void vmovp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:768
ItsCommand::vmovi
void vmovi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:762
Gicv3Its::intNum
Bitfield< 15, 2 > intNum
Definition: gic_v3_its.hh:279
Gicv3Its::incrementReadPointer
void incrementReadPointer()
Definition: gic_v3_its.cc:1065
ItsCommand::mapc
void mapc(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:554
Gicv3Its::DEVICE_TABLE
@ DEVICE_TABLE
Definition: gic_v3_its.hh:308
addr_range.hh
ItsCommand::CommandEntry::raw
uint64_t raw[4]
Definition: gic_v3_its.hh:438
Gicv3Its::Gicv3Its
Gicv3Its(const Gicv3ItsParams &params)
Definition: gic_v3_its.cc:779
ItsCommand::MAPD
@ MAPD
Definition: gic_v3_its.hh:449
Gicv3Its::maxCommands
uint64_t maxCommands() const
Definition: gic_v3_its.cc:1077
Gicv3Its::vmovp
Bitfield< 37 > vmovp
Definition: gic_v3_its.hh:205
Gicv3Its::seis
Bitfield< 18 > seis
Definition: gic_v3_its.hh:210
Gicv3Its::physical
Bitfield< 0 > physical
Definition: gic_v3_its.hh:216
ItsProcess::CTE
Gicv3Its::CTE CTE
Definition: gic_v3_its.hh:356
Gicv3Its::cil
Bitfield< 36 > cil
Definition: gic_v3_its.hh:206
Gicv3Its::BASER_WMASK_UNIMPL
static const uint64_t BASER_WMASK_UNIMPL
Definition: gic_v3_its.hh:130
Gicv3Its::GITS_TRANSLATER
@ GITS_TRANSLATER
Definition: gic_v3_its.hh:148
Gicv3Its::getRedistributor
Gicv3Redistributor * getRedistributor(uint64_t rd_base)
Definition: gic_v3_its.cc:1235
Gicv3Its::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: gic_v3_its.cc:1028
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:80
Gicv3Its::ittAddress
Bitfield< 52, 1 > ittAddress
Definition: gic_v3_its.hh:271
ItsProcess::~ItsProcess
virtual ~ItsProcess()
Definition: gic_v3_its.cc:65
ItsAction::pkt
PacketPtr pkt
Definition: gic_v3_its.hh:69
ItsProcess::readIrqTranslationTable
uint64_t readIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id)
Definition: gic_v3_its.cc:196
Gicv3Its::indirect
Bitfield< 62 > indirect
Definition: gic_v3_its.hh:191
ItsProcess::writeIrqCollectionTable
void writeIrqCollectionTable(Yield &yield, uint32_t collection_id, CTE cte)
Definition: gic_v3_its.cc:171
Gicv3Its::high
high
Definition: gic_v3_its.hh:171
ItsCommand::discard
void discard(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:426
ItsCommand::vinvall
void vinvall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:738
ItsProcess::DTE
Gicv3Its::DTE DTE
Definition: gic_v3_its.hh:354
ItsCommand::VINVALL
@ VINVALL
Definition: gic_v3_its.hh:455
Gicv3Its::type
Bitfield< 58, 56 > type
Definition: gic_v3_its.hh:193
ItsCommand::DispatchEntry
Dispatch entry is a metadata struct which contains information about the command (like the name) and ...
Definition: gic_v3_its.hh:473
Gicv3Its::pendingCommands
bool pendingCommands
Definition: gic_v3_its.hh:332
ItsCommand::inv
void inv(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:500
Gicv3Its::DataPort::recvReqRetry
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: gic_v3_its.hh:100
ItsProcess::main
virtual void main(Yield &yield)=0
std
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:587
X86ISA::vector
Bitfield< 15, 8 > vector
Definition: intmessage.hh:44
types.hh
ItsCommand::ItsCommand
ItsCommand(Gicv3Its &_its)
Definition: gic_v3_its.cc:315
ItsCommand::invall
void invall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:534
Gicv3Its::offset
Bitfield< 19, 5 > offset
Definition: gic_v3_its.hh:173
Gicv3Its::itsNumber
Bitfield< 7, 4 > itsNumber
Definition: gic_v3_its.hh:164
Gicv3Its::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic_v3_its.cc:896
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
BasicPioDevice
Definition: io_device.hh:144
Gicv3Its::getRedistributor
Gicv3Redistributor * getRedistributor(CTE cte)
Definition: gic_v3_its.hh:297
Gicv3Its::gitsCreadr
CRDWR gitsCreadr
Definition: gic_v3_its.hh:222
Gicv3Its::intNumHyp
Bitfield< 29, 16 > intNumHyp
Definition: gic_v3_its.hh:278
Gicv3Its::runProcess
ItsAction runProcess(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1151
Gicv3Its::pta
Bitfield< 19 > pta
Definition: gic_v3_its.hh:209
coroutine.hh
Gicv3Its::CTLR_QUIESCENT
static const uint32_t CTLR_QUIESCENT
Definition: gic_v3_its.hh:134
ItsCommand::mapti
void mapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:621
Gicv3Its::translate
void translate(PacketPtr pkt)
Definition: gic_v3_its.cc:1226
ItsCommand::DISCARD
@ DISCARD
Definition: gic_v3_its.hh:444
ItsCommand::VMAPI
@ VMAPI
Definition: gic_v3_its.hh:456
ItsAction::delay
Tick delay
Definition: gic_v3_its.hh:70
bits
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:73
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:64
X86ISA::type
type
Definition: misc.hh:727
Gicv3Its::COLLECTION_TABLE
@ COLLECTION_TABLE
Definition: gic_v3_its.hh:311
Gicv3Its::GITS_IIDR
@ GITS_IIDR
Definition: gic_v3_its.hh:140
ItsCommand::CLEAR
@ CLEAR
Definition: gic_v3_its.hh:443
Gicv3Its::DataPort
Definition: gic_v3_its.hh:86
ItsCommand::DispatchEntry::DispatchEntry
DispatchEntry(std::string _name, ExecFn _exec)
Definition: gic_v3_its.hh:477
Gicv3Its::PageSize
PageSize
Definition: gic_v3_its.hh:314
ItsTranslation::~ItsTranslation
~ItsTranslation()
Definition: gic_v3_its.cc:229
Gicv3Its::DataPort::~DataPort
virtual ~DataPort()
Definition: gic_v3_its.hh:97
SimObject::params
const Params & params() const
Definition: sim_object.hh:168
ItsCommand::VMAPTI
@ VMAPTI
Definition: gic_v3_its.hh:458
ItsTranslation
An ItsTranslation is created whenever a peripheral writes a message in GITS_TRANSLATER (MSI).
Definition: gic_v3_its.hh:405
std::list< AddrRange >
Gicv3Its::icid
Bitfield< 45, 30 > icid
Definition: gic_v3_its.hh:277
ItsTranslation::main
void main(Yield &yield) override
Definition: gic_v3_its.cc:238
Gicv3Its::enabled
Bitfield< 0 > enabled
Definition: gic_v3_its.hh:166
Gicv3Its::outerCache
Bitfield< 55, 53 > outerCache
Definition: gic_v3_its.hh:183
Gicv3Its::GITS_CWRITER
@ GITS_CWRITER
Definition: gic_v3_its.hh:143
ItsCommand::processCommand
void processCommand(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:378
ItsCommand::CommandType
CommandType
Definition: gic_v3_its.hh:441
ItsActionType::INITIAL_NOP
@ INITIAL_NOP
CheckpointIn
Definition: serialize.hh:68
ItsCommand::VMOVI
@ VMOVI
Definition: gic_v3_its.hh:459
Gicv3Its::packetsToRetry
std::queue< ItsAction > packetsToRetry
Definition: gic_v3_its.hh:327
ItsCommand::cmdDispatcher
static DispatchTable cmdDispatcher
Definition: gic_v3_its.hh:488
ItsProcess::its
Gicv3Its & its
Definition: gic_v3_its.hh:393
Gicv3Its::imDe
Bitfield< 1 > imDe
Definition: gic_v3_its.hh:165
ItsProcess::readIrqCollectionTable
uint64_t readIrqCollectionTable(Yield &yield, uint32_t collection_id)
Definition: gic_v3_its.cc:209
Gicv3Its::pendingTranslations
uint32_t pendingTranslations
Definition: gic_v3_its.hh:333
ItsCommand::~ItsCommand
~ItsCommand()
Definition: gic_v3_its.cc:324
ItsCommand::readCommand
void readCommand(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:363
Gicv3Redistributor
Definition: gic_v3_redistributor.hh:52
Gicv3Its::runProcessAtomic
ItsAction runProcessAtomic(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1194
ItsAction
Definition: gic_v3_its.hh:66
ItsTranslation::ItsTranslation
ItsTranslation(Gicv3Its &_its)
Definition: gic_v3_its.cc:221
ItsCommand::MOVI
@ MOVI
Definition: gic_v3_its.hh:453
Gicv3Its::NUM_BASER_REGS
static const uint32_t NUM_BASER_REGS
Definition: gic_v3_its.hh:119
Gicv3Its::shareability
Bitfield< 11, 10 > shareability
Definition: gic_v3_its.hh:185
Gicv3Its::gitsCbaser
CBASER gitsCbaser
Definition: gic_v3_its.hh:221
Gicv3Its::BASER_INDIRECT
static const uint64_t BASER_INDIRECT
Definition: gic_v3_its.hh:124
Gicv3Its::VPE_TABLE
@ VPE_TABLE
Definition: gic_v3_its.hh:309
ItsProcess
ItsProcess is a base coroutine wrapper which is spawned by the Gicv3Its module when the latter needs ...
Definition: gic_v3_its.hh:351

Generated on Tue Mar 23 2021 19:41:26 for gem5 by doxygen 1.8.17