gem5  v19.0.0.0
isa_traits.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2005 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  * Authors: Steve Reinhardt
29  * Gabe Black
30  */
31 
32 #ifndef __ARCH_ALPHA_ISA_TRAITS_HH__
33 #define __ARCH_ALPHA_ISA_TRAITS_HH__
34 
35 #include "arch/alpha/ipr.hh"
36 #include "arch/alpha/types.hh"
37 #include "base/types.hh"
38 #include "cpu/static_inst_fwd.hh"
39 
40 namespace AlphaISA {
41 
43 
45 
46 const Addr PageShift = 13;
47 const Addr PageBytes = ULL(1) << PageShift;
48 const Addr PageMask = ~(PageBytes - 1);
49 const Addr PageOffset = PageBytes - 1;
50 
52 //
53 // Translation stuff
54 //
55 
56 const Addr PteShift = 3;
57 const Addr NPtePageShift = PageShift - PteShift;
59 const Addr PteMask = NPtePage - 1;
60 
61 // User Virtual
62 const Addr USegBase = ULL(0x0);
63 const Addr USegEnd = ULL(0x000003ffffffffff);
64 
65 // Kernel Direct Mapped
66 const Addr K0SegBase = ULL(0xfffffc0000000000);
67 const Addr K0SegEnd = ULL(0xfffffdffffffffff);
68 
69 // Kernel Virtual
70 const Addr K1SegBase = ULL(0xfffffe0000000000);
71 const Addr K1SegEnd = ULL(0xffffffffffffffff);
72 
74 //
75 // Interrupt levels
76 //
78 {
81 
84 
91 
93 
95 };
96 
97 // EV5 modes
99 {
100  mode_kernel = 0, // kernel
101  mode_executive = 1, // executive (unused by unix)
102  mode_supervisor = 2, // supervisor (unused by unix)
103  mode_user = 3, // user mode
104  mode_number // number of modes
105 };
106 
107 const int MachineBytes = 8;
108 
109 // Memory accesses cannot be unaligned
110 const bool HasUnalignedMemAcc = false;
111 
112 const bool CurThreadInfoImplemented = true;
114 
115 } // namespace AlphaISA
116 
117 #endif // __ARCH_ALPHA_ISA_TRAITS_HH__
const Addr K1SegEnd
Definition: isa_traits.hh:71
const Addr USegBase
Definition: isa_traits.hh:62
const Addr NPtePage
Definition: isa_traits.hh:58
const Addr K1SegBase
Definition: isa_traits.hh:70
const Addr PageShift
Definition: isa_traits.hh:46
const Addr USegEnd
Definition: isa_traits.hh:63
StaticInstPtr decodeInst(ExtMachInst)
const bool CurThreadInfoImplemented
Definition: isa_traits.hh:112
const bool HasUnalignedMemAcc
Definition: isa_traits.hh:110
const Addr PageOffset
Definition: isa_traits.hh:49
const Addr PteShift
Definition: isa_traits.hh:56
const Addr K0SegEnd
Definition: isa_traits.hh:67
const ByteOrder GuestByteOrder
Definition: isa_traits.hh:42
const Addr NPtePageShift
Definition: isa_traits.hh:57
const Addr PageMask
Definition: isa_traits.hh:48
ByteOrder
Definition: types.hh:247
const Addr PteMask
Definition: isa_traits.hh:59
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
uint64_t ExtMachInst
Definition: types.hh:41
#define ULL(N)
uint64_t constant
Definition: types.hh:50
const Addr PageBytes
Definition: isa_traits.hh:47
const int MachineBytes
Definition: isa_traits.hh:107
const int CurThreadInfoReg
Definition: isa_traits.hh:113
const Addr K0SegBase
Definition: isa_traits.hh:66

Generated on Fri Feb 28 2020 16:26:56 for gem5 by doxygen 1.8.13