gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
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
41namespace gem5
42{
43
44namespace 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
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
#define BitUnion32(name)
Definition bitunion.hh:495
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
void allocate()
Allocate memory for the packet.
Definition packet.hh:1367
@ 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
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Definition bitunion.hh:428
static const Addr TriggerIntOffset
Definition intmessage.hh:81
static PacketPtr buildIntAcknowledgePacket()
Definition intmessage.hh:91
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:84
Bitfield< 15, 8 > vector
Definition intmessage.hh:48
Bitfield< 3 > mode
Definition types.hh:192
Bitfield< 21 > trigger
Definition intmessage.hh:52
const Addr PhysAddrIntA
Definition x86_traits.hh:77
static Addr x86InterruptAddress(const uint8_t id, const uint16_t addr)
Definition x86_traits.hh:99
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
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 Tue Jun 18 2024 16:24:00 for gem5 by doxygen 1.11.0