gem5  v22.1.0.0
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 namespace gem5
54 {
55 
56 class Gicv3;
57 class Gicv3Redistributor;
58 class ItsProcess;
59 class ItsTranslation;
60 class ItsCommand;
61 
62 enum class ItsActionType
63 {
65  SEND_REQ,
66  TERMINATE,
67 };
68 
69 struct ItsAction
70 {
74 };
75 
83 class Gicv3Its : public BasicPioDevice
84 {
85  friend class gem5::ItsProcess;
86  friend class gem5::ItsTranslation;
87  friend class gem5::ItsCommand;
88 
89  public:
90  class DataPort : public RequestPort
91  {
92  protected:
94 
95  public:
96  DataPort(const std::string &_name, Gicv3Its &_its) :
97  RequestPort(_name, &_its),
98  its(_its)
99  {}
100 
101  virtual ~DataPort() {}
102 
103  bool recvTimingResp(PacketPtr pkt) { return its.recvTimingResp(pkt); }
104  void recvReqRetry() { return its.recvReqRetry(); }
105  };
106 
108 
109  Port & getPort(const std::string &if_name, PortID idx) override;
110  bool recvTimingResp(PacketPtr pkt);
111  void recvReqRetry();
112 
113  Gicv3Its(const Gicv3ItsParams &params);
114 
115  void setGIC(Gicv3 *_gic);
116 
117  static const uint32_t itsControl = 0x0;
118  static const uint32_t itsTranslate = 0x10000;
119 
120  // Address range part of Control frame
121  static const AddrRange GITS_BASER;
122 
123  static const uint32_t NUM_BASER_REGS = 8;
124 
125  // We currently don't support two level ITS tables
126  // The indirect bit is RAZ/WI for implementations that only
127  // support flat tables.
128  static const uint64_t BASER_INDIRECT = 0x4000000000000000;
129  static const uint64_t BASER_TYPE = 0x0700000000000000;
130  static const uint64_t BASER_ESZ = 0x001F000000000000;
131  static const uint64_t BASER_SZ = 0x00000000000000FF;
132  static const uint64_t BASER_WMASK =
134  static const uint64_t BASER_WMASK_UNIMPL =
136 
137  // GITS_CTLR.quiescent mask
138  static const uint32_t CTLR_QUIESCENT;
139 
140  enum : Addr
141  {
142  // Control frame
143  GITS_CTLR = itsControl + 0x0000,
144  GITS_IIDR = itsControl + 0x0004,
145  GITS_TYPER = itsControl + 0x0008,
149  GITS_PIDR2 = itsControl + 0xffe8,
150 
151  // Translation frame
152  GITS_TRANSLATER = itsTranslate + 0x0040
153  };
154 
155  AddrRangeList getAddrRanges() const override;
156 
157  Tick read(PacketPtr pkt) override;
158  Tick write(PacketPtr pkt) override;
159 
160  DrainState drain() override;
161  void serialize(CheckpointOut & cp) const override;
162  void unserialize(CheckpointIn & cp) override;
163 
164  void translate(PacketPtr pkt);
165 
167  Bitfield<31> quiescent;
168  Bitfield<7, 4> itsNumber;
169  Bitfield<1> imDe;
170  Bitfield<0> enabled;
172 
173  // Command read/write, (CREADR, CWRITER)
174  BitUnion64(CRDWR)
175  Bitfield<63, 32> high;
176  Bitfield<31, 0> low;
177  Bitfield<19, 5> offset;
178  Bitfield<0> retry;
179  Bitfield<0> stalled;
180  EndBitUnion(CRDWR)
181 
182  BitUnion64(CBASER)
183  Bitfield<63, 32> high;
184  Bitfield<31, 0> low;
185  Bitfield<63> valid;
186  Bitfield<61, 59> innerCache;
187  Bitfield<55, 53> outerCache;
188  Bitfield<51, 12> physAddr;
189  Bitfield<11, 10> shareability;
190  Bitfield<7, 0> size;
191  EndBitUnion(CBASER)
192 
193  BitUnion64(BASER)
194  Bitfield<63> valid;
195  Bitfield<62> indirect;
196  Bitfield<61, 59> innerCache;
197  Bitfield<58, 56> type;
198  Bitfield<55, 53> outerCache;
199  Bitfield<52, 48> entrySize;
200  Bitfield<47, 12> physAddr;
201  Bitfield<11, 10> shareability;
202  Bitfield<9, 8> pageSize;
203  Bitfield<7, 0> size;
204  EndBitUnion(BASER)
205 
206  BitUnion64(TYPER)
207  Bitfield<63, 32> high;
208  Bitfield<31, 0> low;
209  Bitfield<37> vmovp;
210  Bitfield<36> cil;
211  Bitfield<35, 32> cidBits;
212  Bitfield<31, 24> hcc;
213  Bitfield<19> pta;
214  Bitfield<18> seis;
215  Bitfield<17, 13> devBits;
216  Bitfield<12, 8> idBits;
217  Bitfield<7, 4> ittEntrySize;
218  Bitfield<2> cct;
219  Bitfield<1> _virtual;
220  Bitfield<0> physical;
221  EndBitUnion(TYPER)
222 
223  CTLR gitsControl;
224  TYPER gitsTyper;
225  CBASER gitsCbaser;
226  CRDWR gitsCreadr;
227  CRDWR gitsCwriter;
228  uint32_t gitsIidr;
229  uint32_t gitsTranslater;
230 
232 
237  bool idOutOfRange(uint32_t event_id, uint8_t itt_range) const;
238 
244  bool deviceOutOfRange(uint32_t device_id) const;
245 
252  bool sizeOutOfRange(uint32_t size) const;
253 
259  bool collectionOutOfRange(uint32_t collection_id) const;
260 
265  bool lpiOutOfRange(uint32_t intid) const;
266 
267  private: // Command
268  uint64_t maxCommands() const;
269  void checkCommandQueue();
270  void incrementReadPointer();
271 
272  public: // TableWalk
274  Bitfield<57, 53> ittRange;
275  Bitfield<52, 1> ittAddress;
276  Bitfield<0> valid;
278 
279  BitUnion64(ITTE)
280  Bitfield<59, 46> vpeid;
281  Bitfield<45, 30> icid;
282  Bitfield<29, 16> intNumHyp;
283  Bitfield<15, 2> intNum;
284  Bitfield<1> intType;
285  Bitfield<0> valid;
287 
288  BitUnion64(CTE)
289  Bitfield<40, 1> rdBase;
290  Bitfield<0> valid;
292 
293  enum InterruptType
294  {
295  VIRTUAL_INTERRUPT = 0,
296  PHYSICAL_INTERRUPT = 1
297  };
298 
299  private:
300  Gicv3Redistributor* getRedistributor(uint64_t rd_base);
302  {
303  return getRedistributor(cte.rdBase);
304  }
305 
309 
311  {
315  COLLECTION_TABLE = 4
316  };
317 
318  enum PageSize
319  {
322  SIZE_64K
323  };
324 
325  Addr pageAddress(enum ItsTables table);
326 
327  void moveAllPendingState(
329 
330  private:
331  std::queue<ItsAction> packetsToRetry;
332  uint32_t requestorId;
335 
338 };
339 
356 {
357  public:
358  using DTE = Gicv3Its::DTE;
359  using ITTE = Gicv3Its::ITTE;
360  using CTE = Gicv3Its::CTE;
363 
364  ItsProcess(Gicv3Its &_its);
365  virtual ~ItsProcess();
366 
368  const std::string name() const;
369 
370  ItsAction run(PacketPtr pkt);
371 
372  protected:
373  void reinit();
374  virtual void main(Yield &yield) = 0;
375 
376  void writeDeviceTable(Yield &yield, uint32_t device_id, DTE dte);
377 
379  Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte);
380 
382  Yield &yield, uint32_t collection_id, CTE cte);
383 
384  uint64_t readDeviceTable(
385  Yield &yield, uint32_t device_id);
386 
387  uint64_t readIrqTranslationTable(
388  Yield &yield, const Addr itt_base, uint32_t event_id);
389 
390  uint64_t readIrqCollectionTable(Yield &yield, uint32_t collection_id);
391 
392  void doRead(Yield &yield, Addr addr, void *ptr, size_t size);
393  void doWrite(Yield &yield, Addr addr, void *ptr, size_t size);
394  void terminate(Yield &yield);
395 
396  protected:
398 
399  private:
400  std::unique_ptr<Coroutine> coroutine;
401 };
402 
410 {
411  public:
412  ItsTranslation(Gicv3Its &_its);
413  ~ItsTranslation();
414 
415  protected:
416  void main(Yield &yield) override;
417 
419  translateLPI(Yield &yield, uint32_t device_id, uint32_t event_id);
420 };
421 
428 class ItsCommand : public ItsProcess
429 {
430  public:
432  {
433  struct
434  {
435  uint32_t type;
436  uint32_t deviceId;
437  uint32_t eventId;
438  uint32_t pintId;
439 
440  uint32_t data[4];
441  };
442  uint64_t raw[4];
443  };
444 
445  enum CommandType : uint32_t
446  {
447  CLEAR = 0x04,
448  DISCARD = 0x0F,
449  INT = 0x03,
450  INV = 0x0C,
451  INVALL = 0x0D,
452  MAPC = 0x09,
453  MAPD = 0x08,
454  MAPI = 0x0B,
455  MAPTI = 0x0A,
456  MOVALL = 0x0E,
457  MOVI = 0x01,
458  SYNC = 0x05,
459  VINVALL = 0x2D,
460  VMAPI = 0x2B,
461  VMAPP = 0x29,
462  VMAPTI = 0x2A,
463  VMOVI = 0x21,
464  VMOVP = 0x22,
465  VSYNC = 0x25
466  };
467 
468  ItsCommand(Gicv3Its &_its);
469  ~ItsCommand();
470 
471  protected:
478  {
479  using ExecFn = std::function<void(ItsCommand*, Yield&, CommandEntry&)>;
480 
481  DispatchEntry(std::string _name, ExecFn _exec)
482  : name(_name), exec(_exec)
483  {}
484 
485  std::string name;
487  };
488 
489  using DispatchTable = std::unordered_map<
491 
493 
494  static std::string commandName(uint32_t cmd);
495 
496  void main(Yield &yield) override;
497 
498  void readCommand(Yield &yield, CommandEntry &command);
499  void processCommand(Yield &yield, CommandEntry &command);
500 
501  // Commands
502  void clear(Yield &yield, CommandEntry &command);
503  void discard(Yield &yield, CommandEntry &command);
504  void mapc(Yield &yield, CommandEntry &command);
505  void mapd(Yield &yield, CommandEntry &command);
506  void mapi(Yield &yield, CommandEntry &command);
507  void mapti(Yield &yield, CommandEntry &command);
508  void movall(Yield &yield, CommandEntry &command);
509  void movi(Yield &yield, CommandEntry &command);
510  void sync(Yield &yield, CommandEntry &command);
511  void doInt(Yield &yield, CommandEntry &command);
512  void inv(Yield &yield, CommandEntry &command);
513  void invall(Yield &yield, CommandEntry &command);
514  void vinvall(Yield &yield, CommandEntry &command);
515  void vmapi(Yield &yield, CommandEntry &command);
516  void vmapp(Yield &yield, CommandEntry &command);
517  void vmapti(Yield &yield, CommandEntry &command);
518  void vmovi(Yield &yield, CommandEntry &command);
519  void vmovp(Yield &yield, CommandEntry &command);
520  void vsync(Yield &yield, CommandEntry &command);
521 
522  protected: // Helpers
523  bool idOutOfRange(CommandEntry &command, DTE dte) const
524  {
525  return its.idOutOfRange(command.eventId, dte.ittRange);
526  }
527 
528  bool deviceOutOfRange(CommandEntry &command) const
529  {
530  return its.deviceOutOfRange(command.deviceId);
531  }
532 
533  bool sizeOutOfRange(CommandEntry &command) const
534  {
535  const auto size = bits(command.raw[1], 4, 0);
536  const auto valid = bits(command.raw[2], 63);
537  if (valid)
538  return its.sizeOutOfRange(size);
539  else
540  return false;
541  }
542 
543  bool collectionOutOfRange(CommandEntry &command) const
544  {
545  return its.collectionOutOfRange(bits(command.raw[2], 15, 0));
546  }
547 };
548 
549 } // namespace gem5
550 
551 #endif
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:82
CallerType: A reference to an object of this class will be passed to the coroutine task.
Definition: coroutine.hh:86
This template defines a Coroutine wrapper type with a Boost-like interface.
Definition: coroutine.hh:65
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: gic_v3_its.hh:103
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:104
DataPort(const std::string &_name, Gicv3Its &_its)
Definition: gic_v3_its.hh:96
GICv3 ITS module.
Definition: gic_v3_its.hh:84
static const uint32_t CTLR_QUIESCENT
Definition: gic_v3_its.hh:138
BitUnion64(DTE) Bitfield< 57
uint32_t gitsTranslater
Definition: gic_v3_its.hh:229
Bitfield< 31, 0 > low
Definition: gic_v3_its.hh:176
Bitfield< 0 > enabled
Definition: gic_v3_its.hh:170
void moveAllPendingState(Gicv3Redistributor *rd1, Gicv3Redistributor *rd2)
Definition: gic_v3_its.cc:1275
Bitfield< 58, 56 > type
Definition: gic_v3_its.hh:197
Bitfield< 9, 8 > pageSize
Definition: gic_v3_its.hh:202
void checkCommandQueue()
Definition: gic_v3_its.cc:1086
uint32_t gitsIidr
Definition: gic_v3_its.hh:228
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:1023
EndBitUnion(CTLR) BitUnion64(CRDWR) Bitfield< 63
Bitfield< 12, 8 > idBits
Definition: gic_v3_its.hh:216
Port & getPort(const std::string &if_name, PortID idx) override
Get a port with a given name and index.
Definition: gic_v3_its.cc:1114
Bitfield< 18 > seis
Definition: gic_v3_its.hh:214
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic_v3_its.cc:825
Bitfield< 35, 32 > cidBits
Definition: gic_v3_its.hh:211
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:1000
Bitfield< 52, 48 > entrySize
Definition: gic_v3_its.hh:199
Bitfield< 7, 0 > size
Definition: gic_v3_its.hh:190
Bitfield< 0 > physical
Definition: gic_v3_its.hh:220
static const uint64_t BASER_WMASK_UNIMPL
Definition: gic_v3_its.hh:134
bool pendingCommands
Definition: gic_v3_its.hh:336
static const uint32_t NUM_BASER_REGS
Definition: gic_v3_its.hh:123
CBASER gitsCbaser
Definition: gic_v3_its.hh:225
Bitfield< 61, 59 > innerCache
Definition: gic_v3_its.hh:186
Gicv3Redistributor * getRedistributor(CTE cte)
Definition: gic_v3_its.hh:301
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:1012
void translate(PacketPtr pkt)
Definition: gic_v3_its.cc:1229
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: gic_v3_its.cc:1055
Bitfield< 1 > imDe
Definition: gic_v3_its.hh:169
EventFunctionWrapper commandEvent
Definition: gic_v3_its.hh:334
Gicv3Redistributor * getRedistributor(uint64_t rd_base)
Definition: gic_v3_its.cc:1238
DataPort dmaPort
Definition: gic_v3_its.hh:107
std::vector< BASER > tableBases
Definition: gic_v3_its.hh:231
Bitfield< 52, 1 > ittAddress
Definition: gic_v3_its.hh:275
Bitfield< 29, 16 > intNumHyp
Definition: gic_v3_its.hh:282
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:992
ItsAction runProcessTiming(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1166
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:815
Bitfield< 11, 10 > shareability
Definition: gic_v3_its.hh:189
Bitfield< 1 > intType
Definition: gic_v3_its.hh:284
Bitfield< 19, 5 > offset
Definition: gic_v3_its.hh:177
ItsAction runProcess(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1154
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic_v3_its.cc:899
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: gic_v3_its.cc:1042
Bitfield< 19 > pta
Definition: gic_v3_its.hh:213
static const uint64_t BASER_INDIRECT
Definition: gic_v3_its.hh:128
Gicv3Its(const Gicv3ItsParams &params)
Definition: gic_v3_its.cc:782
ItsAction runProcessAtomic(ItsProcess *proc, PacketPtr pkt)
Definition: gic_v3_its.cc:1197
static const uint64_t BASER_SZ
Definition: gic_v3_its.hh:131
Bitfield< 0 > stalled
Definition: gic_v3_its.hh:179
Bitfield< 63 > valid
Definition: gic_v3_its.hh:185
static const uint32_t itsTranslate
Definition: gic_v3_its.hh:118
Bitfield< 2 > cct
Definition: gic_v3_its.hh:218
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:1031
Addr pageAddress(enum ItsTables table)
Definition: gic_v3_its.cc:1250
Bitfield< 62 > indirect
Definition: gic_v3_its.hh:195
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:1006
Bitfield< 0 > retry
Definition: gic_v3_its.hh:178
uint32_t requestorId
Definition: gic_v3_its.hh:332
void recvReqRetry()
Definition: gic_v3_its.cc:1123
Bitfield< 7, 4 > ittEntrySize
Definition: gic_v3_its.hh:217
uint64_t maxCommands() const
Definition: gic_v3_its.cc:1080
Bitfield< 36 > cil
Definition: gic_v3_its.hh:210
Bitfield< 51, 12 > physAddr
Definition: gic_v3_its.hh:188
Bitfield< 17, 13 > devBits
Definition: gic_v3_its.hh:215
Bitfield< 1 > _virtual
Definition: gic_v3_its.hh:219
Bitfield< 7, 4 > itsNumber
Definition: gic_v3_its.hh:168
Bitfield< 55, 53 > outerCache
Definition: gic_v3_its.hh:187
static const uint64_t BASER_WMASK
Definition: gic_v3_its.hh:132
static const AddrRange GITS_BASER
Definition: gic_v3_its.hh:121
void setGIC(Gicv3 *_gic)
Definition: gic_v3_its.cc:808
static const uint64_t BASER_TYPE
Definition: gic_v3_its.hh:129
static const uint32_t itsControl
Definition: gic_v3_its.hh:117
Bitfield< 31, 24 > hcc
Definition: gic_v3_its.hh:212
static const uint64_t BASER_ESZ
Definition: gic_v3_its.hh:130
Bitfield< 37 > vmovp
Definition: gic_v3_its.hh:209
bool recvTimingResp(PacketPtr pkt)
Definition: gic_v3_its.cc:1140
Bitfield< 45, 30 > icid
Definition: gic_v3_its.hh:281
BitUnion32(CTLR) Bitfield< 31 > quiescent
std::queue< ItsAction > packetsToRetry
Definition: gic_v3_its.hh:331
Bitfield< 15, 2 > intNum
Definition: gic_v3_its.hh:283
void incrementReadPointer()
Definition: gic_v3_its.cc:1068
uint32_t pendingTranslations
Definition: gic_v3_its.hh:337
An ItsCommand is created whenever there is a new command in the command queue.
Definition: gic_v3_its.hh:429
void movall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:660
bool sizeOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:533
void doInt(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:468
bool idOutOfRange(CommandEntry &command, DTE dte) const
Definition: gic_v3_its.hh:523
void main(Yield &yield) override
Definition: gic_v3_its.cc:343
ItsCommand(Gicv3Its &_its)
Definition: gic_v3_its.cc:318
void sync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:735
void vsync(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:777
void invall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:537
void vmapp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:753
void readCommand(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:366
void mapd(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:574
void discard(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:429
void processCommand(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:381
void vmovp(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:771
void vmovi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:765
void vmapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:759
void clear(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:394
void movi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:674
std::unordered_map< std::underlying_type< enum CommandType >::type, DispatchEntry > DispatchTable
Definition: gic_v3_its.hh:490
void mapc(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:557
void vinvall(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:741
void inv(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:503
void vmapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:747
static std::string commandName(uint32_t cmd)
Definition: gic_v3_its.cc:336
bool deviceOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:528
static DispatchTable cmdDispatcher
Definition: gic_v3_its.hh:492
bool collectionOutOfRange(CommandEntry &command) const
Definition: gic_v3_its.hh:543
void mapi(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:590
void mapti(Yield &yield, CommandEntry &command)
Definition: gic_v3_its.cc:624
ItsProcess is a base coroutine wrapper which is spawned by the Gicv3Its module when the latter needs ...
Definition: gic_v3_its.hh:356
void writeIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id, ITTE itte)
Definition: gic_v3_its.cc:163
Gicv3Its & its
Definition: gic_v3_its.hh:397
uint64_t readIrqCollectionTable(Yield &yield, uint32_t collection_id)
Definition: gic_v3_its.cc:212
const std::string name() const
Returns the Gicv3Its name.
Definition: gic_v3_its.cc:80
void terminate(Yield &yield)
Definition: gic_v3_its.cc:142
Gicv3Its::DTE DTE
Definition: gic_v3_its.hh:358
virtual ~ItsProcess()
Definition: gic_v3_its.cc:68
ItsAction run(PacketPtr pkt)
Definition: gic_v3_its.cc:86
void writeDeviceTable(Yield &yield, uint32_t device_id, DTE dte)
Definition: gic_v3_its.cc:152
void doWrite(Yield &yield, Addr addr, void *ptr, size_t size)
Definition: gic_v3_its.cc:118
ItsProcess(Gicv3Its &_its)
Definition: gic_v3_its.cc:63
std::unique_ptr< Coroutine > coroutine
Definition: gic_v3_its.hh:400
void doRead(Yield &yield, Addr addr, void *ptr, size_t size)
Definition: gic_v3_its.cc:94
uint64_t readIrqTranslationTable(Yield &yield, const Addr itt_base, uint32_t event_id)
Definition: gic_v3_its.cc:199
Gicv3Its::CTE CTE
Definition: gic_v3_its.hh:360
virtual void main(Yield &yield)=0
uint64_t readDeviceTable(Yield &yield, uint32_t device_id)
Definition: gic_v3_its.cc:186
void writeIrqCollectionTable(Yield &yield, uint32_t collection_id, CTE cte)
Definition: gic_v3_its.cc:174
Gicv3Its::ITTE ITTE
Definition: gic_v3_its.hh:359
An ItsTranslation is created whenever a peripheral writes a message in GITS_TRANSLATER (MSI).
Definition: gic_v3_its.hh:410
void main(Yield &yield) override
Definition: gic_v3_its.cc:241
ItsTranslation(Gicv3Its &_its)
Definition: gic_v3_its.cc:224
std::pair< uint32_t, Gicv3Redistributor * > translateLPI(Yield &yield, uint32_t device_id, uint32_t event_id)
Definition: gic_v3_its.cc:265
const std::string _name
Definition: named.hh:41
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
Ports are used to interface objects to each other.
Definition: port.hh:62
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:79
STL pair class.
Definition: stl.hh:58
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:76
DrainState
Object drain/handover states.
Definition: drain.hh:75
const Params & params() const
Definition: sim_object.hh:176
Bitfield< 3 > addr
Definition: types.hh:84
Bitfield< 15, 8 > vector
Definition: intmessage.hh:48
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::ostream CheckpointOut
Definition: serialize.hh:66
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
ItsActionType
Definition: gic_v3_its.hh:63
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: misc.hh:2826
PacketPtr pkt
Definition: gic_v3_its.hh:72
ItsActionType type
Definition: gic_v3_its.hh:71
Dispatch entry is a metadata struct which contains information about the command (like the name) and ...
Definition: gic_v3_its.hh:478
DispatchEntry(std::string _name, ExecFn _exec)
Definition: gic_v3_its.hh:481
std::function< void(ItsCommand *, Yield &, CommandEntry &)> ExecFn
Definition: gic_v3_its.hh:479
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:468

Generated on Wed Dec 21 2022 10:22:33 for gem5 by doxygen 1.9.1