gem5  v20.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/types.hh"
35 #include "dev/x86/intdev.hh"
36 #include "mem/packet.hh"
37 #include "mem/packet_access.hh"
38 #include "mem/request.hh"
39 
40 namespace X86ISA
41 {
42  BitUnion32(TriggerIntMessage)
43  Bitfield<7, 0> destination;
44  Bitfield<15, 8> vector;
45  Bitfield<18, 16> deliveryMode;
46  Bitfield<19> destMode;
47  Bitfield<20> level;
48  Bitfield<21> trigger;
49  EndBitUnion(TriggerIntMessage)
50 
51  namespace DeliveryMode
52  {
53  enum IntDeliveryMode {
54  Fixed = 0,
55  LowestPriority = 1,
56  SMI = 2,
57  NMI = 4,
58  INIT = 5,
59  SIPI = 6,
60  ExtInt = 7,
61  NumModes
62  };
63 
64  static const char * const names[NumModes] = {
65  "Fixed", "LowestPriority", "SMI", "Reserved",
66  "NMI", "INIT", "Startup", "ExtInt"
67  };
68 
69  static inline bool
70  isReserved(int mode)
71  {
72  return mode == 3;
73  }
74  }
75 
76  static const Addr TriggerIntOffset = 0;
77 
78  static inline PacketPtr
79  buildIntTriggerPacket(int id, TriggerIntMessage message)
80  {
82  return buildIntPacket(addr, message);
83  }
84 }
85 
86 #endif
x86_traits.hh
X86ISA::BitUnion32
BitUnion32(TriggerIntMessage) Bitfield< 7
X86ISA::x86InterruptAddress
static Addr x86InterruptAddress(const uint8_t id, const uint16_t addr)
Definition: x86_traits.hh:100
X86ISA::TriggerIntOffset
static const Addr TriggerIntOffset
Definition: intmessage.hh:76
request.hh
packet.hh
intdev.hh
bitunion.hh
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
X86ISA
This is exposed globally, independent of the ISA.
Definition: acpi.hh:55
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
packet_access.hh
X86ISA::destMode
Bitfield< 19 > destMode
Definition: intmessage.hh:46
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:79
X86ISA::level
Bitfield< 20 > level
Definition: intmessage.hh:47
X86ISA::buildIntTriggerPacket
static PacketPtr buildIntTriggerPacket(int id, TriggerIntMessage message)
Definition: intmessage.hh:79
X86ISA::vector
Bitfield< 15, 8 > vector
Definition: intmessage.hh:44
types.hh
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
X86ISA::EndBitUnion
EndBitUnion(TriggerIntMessage) namespace DeliveryMode
Definition: intmessage.hh:49
X86ISA::trigger
Bitfield< 21 > trigger
Definition: intmessage.hh:48
X86ISA::destination
destination
Definition: intmessage.hh:43
X86ISA::buildIntPacket
PacketPtr buildIntPacket(Addr addr, T payload)
Definition: intdev.hh:86
X86ISA::deliveryMode
Bitfield< 18, 16 > deliveryMode
Definition: intmessage.hh:45

Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17