gem5  v22.1.0.0
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 
56  namespace delivery_mode
57  {
59  {
60  Fixed = 0,
62  SMI = 2,
63  NMI = 4,
64  INIT = 5,
65  SIPI = 6,
66  ExtInt = 7,
67  NumModes
68  };
69 
70  static const char * const names[NumModes] = {
71  "Fixed", "LowestPriority", "SMI", "Reserved",
72  "NMI", "INIT", "Startup", "ExtInt"
73  };
74 
75  static inline bool
77  {
78  return mode == 3;
79  }
80  } // namespace delivery_mode
81 
82  static const Addr TriggerIntOffset = 0;
83 
84  static inline PacketPtr
85  buildIntTriggerPacket(int id, TriggerIntMessage message)
86  {
88  return buildIntPacket(addr, message);
89  }
90 
91  static inline PacketPtr
93  {
94  RequestPtr req = std::make_shared<Request>(
97  PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
98  pkt->allocate();
99  return pkt;
100  }
101 
102 } // namespace X86ISA
103 } // namespace gem5
104 
105 #endif
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
void allocate()
Allocate memory for the packet.
Definition: packet.hh:1354
@ UNCACHEABLE
The request is to an uncacheable address.
Definition: request.hh:125
@ intRequestorId
This requestor id is used for message signaled interrupts.
Definition: request.hh:281
static bool isReserved(int mode)
Definition: intmessage.hh:76
static const char *const names[NumModes]
Definition: intmessage.hh:70
static const Addr TriggerIntOffset
Definition: intmessage.hh:82
GEM5_DEPRECATED_NAMESPACE(IntelMP, intelmp)
static PacketPtr buildIntAcknowledgePacket()
Definition: intmessage.hh:92
Bitfield< 19 > destMode
Definition: intmessage.hh:50
Bitfield< 20 > level
Definition: intmessage.hh:51
Bitfield< 18, 16 > deliveryMode
Definition: intmessage.hh:49
PacketPtr buildIntPacket(Addr addr, T payload)
Definition: intdev.hh:89
Bitfield< 3 > addr
Definition: types.hh:84
static PacketPtr buildIntTriggerPacket(int id, TriggerIntMessage message)
Definition: intmessage.hh:85
Bitfield< 15, 8 > vector
Definition: intmessage.hh:48
Bitfield< 3 > mode
Definition: types.hh:192
Bitfield< 21 > trigger
Definition: intmessage.hh:52
EndBitUnion(TriggerIntMessage) GEM5_DEPRECATED_NAMESPACE(DeliveryMode
const Addr PhysAddrIntA
Definition: x86_traits.hh:76
BitUnion32(TriggerIntMessage) Bitfield< 7
static Addr x86InterruptAddress(const uint8_t id, const uint16_t addr)
Definition: x86_traits.hh:98
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:109
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< Request > RequestPtr
Definition: request.hh:92
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
Declaration of the Packet class.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...

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