gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
intmessage.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 __ARCH_X86_INTMESSAGE_HH__
30 #define __ARCH_X86_INTMESSAGE_HH__
31 
32 #include "arch/x86/x86_traits.hh"
33 #include "base/bitunion.hh"
34 #include "base/compiler.hh"
35 #include "base/types.hh"
36 #include "dev/x86/intdev.hh"
37 #include "mem/packet.hh"
38 #include "mem/packet_access.hh"
39 #include "mem/request.hh"
40 
41 namespace gem5
42 {
43 
44 namespace X86ISA
45 {
46  BitUnion32(TriggerIntMessage)
47  Bitfield<7, 0> destination;
48  Bitfield<15, 8> vector;
49  Bitfield<18, 16> deliveryMode;
50  Bitfield<19> destMode;
51  Bitfield<20> level;
52  Bitfield<21> trigger;
53  EndBitUnion(TriggerIntMessage)
54 
55  namespace delivery_mode
56  {
57  enum IntDeliveryMode
58  {
59  Fixed = 0,
60  LowestPriority = 1,
61  SMI = 2,
62  NMI = 4,
63  INIT = 5,
64  SIPI = 6,
65  ExtInt = 7,
66  NumModes
67  };
68 
69  static const char * const names[NumModes] = {
70  "Fixed", "LowestPriority", "SMI", "Reserved",
71  "NMI", "INIT", "Startup", "ExtInt"
72  };
73 
74  static inline bool
75  isReserved(int mode)
76  {
77  return mode == 3;
78  }
79  } // namespace delivery_mode
80 
81  static const Addr TriggerIntOffset = 0;
82 
83  static inline PacketPtr
84  buildIntTriggerPacket(int id, TriggerIntMessage message)
85  {
87  return buildIntPacket(addr, message);
88  }
89 
90  static inline PacketPtr
92  {
93  RequestPtr req = std::make_shared<Request>(
96  PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
97  pkt->allocate();
98  return pkt;
99  }
100 
101 } // namespace X86ISA
102 } // namespace gem5
103 
104 #endif
gem5::X86ISA::level
Bitfield< 20 > level
Definition: intmessage.hh:51
x86_traits.hh
gem5::X86ISA::mode
Bitfield< 3 > mode
Definition: types.hh:192
gem5::X86ISA::vector
Bitfield< 15, 8 > vector
Definition: intmessage.hh:48
gem5::X86ISA::destination
destination
Definition: intmessage.hh:47
request.hh
packet.hh
intdev.hh
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::probing::Packet
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:108
bitunion.hh
gem5::RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:92
gem5::MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:87
gem5::X86ISA::buildIntPacket
PacketPtr buildIntPacket(Addr addr, T payload)
Definition: intdev.hh:89
compiler.hh
gem5::X86ISA::EndBitUnion
EndBitUnion(TriggerIntMessage) namespace delivery_mode
Definition: intmessage.hh:53
gem5::Request::UNCACHEABLE
@ UNCACHEABLE
The request is to an uncacheable address.
Definition: request.hh:125
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
packet_access.hh
gem5::X86ISA::destMode
Bitfield< 19 > destMode
Definition: intmessage.hh:50
gem5::X86ISA::BitUnion32
BitUnion32(TriggerIntMessage) Bitfield< 7
gem5::X86ISA::buildIntTriggerPacket
static PacketPtr buildIntTriggerPacket(int id, TriggerIntMessage message)
Definition: intmessage.hh:84
gem5::Packet::allocate
void allocate()
Allocate memory for the packet.
Definition: packet.hh:1367
gem5::X86ISA::x86InterruptAddress
static Addr x86InterruptAddress(const uint8_t id, const uint16_t addr)
Definition: x86_traits.hh:98
types.hh
gem5::X86ISA::buildIntAcknowledgePacket
static PacketPtr buildIntAcknowledgePacket()
Definition: intmessage.hh:91
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::Request::intRequestorId
@ intRequestorId
This requestor id is used for message signaled interrupts.
Definition: request.hh:281
gem5::X86ISA::deliveryMode
Bitfield< 18, 16 > deliveryMode
Definition: intmessage.hh:49
gem5::X86ISA::TriggerIntOffset
static const Addr TriggerIntOffset
Definition: intmessage.hh:81
gem5::X86ISA::PhysAddrIntA
const Addr PhysAddrIntA
Definition: x86_traits.hh:76
gem5::X86ISA::trigger
Bitfield< 21 > trigger
Definition: intmessage.hh:52
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Sun Jul 30 2023 01:56:50 for gem5 by doxygen 1.8.17