gem5
v19.0.0.0
arch
alpha
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
42
const
ByteOrder
GuestByteOrder
=
LittleEndianByteOrder
;
43
44
StaticInstPtr
decodeInst
(
ExtMachInst
);
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
;
58
const
Addr
NPtePage
=
ULL
(1) <<
NPtePageShift
;
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
//
77
enum
InterruptLevels
78
{
79
INTLEVEL_SOFTWARE_MIN
= 4,
80
INTLEVEL_SOFTWARE_MAX
= 19,
81
82
INTLEVEL_EXTERNAL_MIN
= 20,
83
INTLEVEL_EXTERNAL_MAX
= 34,
84
85
INTLEVEL_IRQ0
= 20,
86
INTLEVEL_IRQ1
= 21,
87
INTINDEX_ETHERNET
= 0,
88
INTINDEX_SCSI
= 1,
89
INTLEVEL_IRQ2
= 22,
90
INTLEVEL_IRQ3
= 23,
91
92
INTLEVEL_SERIAL
= 33,
93
94
NumInterruptLevels
=
INTLEVEL_EXTERNAL_MAX
95
};
96
97
// EV5 modes
98
enum
mode_type
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
;
113
const
int
CurThreadInfoReg
=
AlphaISA::IPR_PALtemp23
;
114
115
}
// namespace AlphaISA
116
117
#endif // __ARCH_ALPHA_ISA_TRAITS_HH__
AlphaISA::INTLEVEL_IRQ1
Definition:
isa_traits.hh:86
AlphaISA::K1SegEnd
const Addr K1SegEnd
Definition:
isa_traits.hh:71
AlphaISA::USegBase
const Addr USegBase
Definition:
isa_traits.hh:62
AlphaISA::NPtePage
const Addr NPtePage
Definition:
isa_traits.hh:58
AlphaISA::INTLEVEL_EXTERNAL_MIN
Definition:
isa_traits.hh:82
AlphaISA::K1SegBase
const Addr K1SegBase
Definition:
isa_traits.hh:70
static_inst_fwd.hh
ipr.hh
AlphaISA::PageShift
const Addr PageShift
Definition:
isa_traits.hh:46
AlphaISA::USegEnd
const Addr USegEnd
Definition:
isa_traits.hh:63
AlphaISA::decodeInst
StaticInstPtr decodeInst(ExtMachInst)
AlphaISA::CurThreadInfoImplemented
const bool CurThreadInfoImplemented
Definition:
isa_traits.hh:112
AlphaISA::INTLEVEL_SOFTWARE_MIN
Definition:
isa_traits.hh:79
AlphaISA::HasUnalignedMemAcc
const bool HasUnalignedMemAcc
Definition:
isa_traits.hh:110
AlphaISA::PageOffset
const Addr PageOffset
Definition:
isa_traits.hh:49
AlphaISA::NumInterruptLevels
Definition:
isa_traits.hh:94
AlphaISA::mode_supervisor
Definition:
isa_traits.hh:102
AlphaISA::PteShift
const Addr PteShift
Definition:
isa_traits.hh:56
AlphaISA::mode_number
Definition:
isa_traits.hh:104
AlphaISA::InterruptLevels
InterruptLevels
Definition:
isa_traits.hh:77
RefCountingPtr< StaticInst >
types.hh
AlphaISA::K0SegEnd
const Addr K0SegEnd
Definition:
isa_traits.hh:67
AlphaISA::GuestByteOrder
const ByteOrder GuestByteOrder
Definition:
isa_traits.hh:42
AlphaISA::NPtePageShift
const Addr NPtePageShift
Definition:
isa_traits.hh:57
AlphaISA::PageMask
const Addr PageMask
Definition:
isa_traits.hh:48
AlphaISA::INTLEVEL_EXTERNAL_MAX
Definition:
isa_traits.hh:83
AlphaISA::mode_user
Definition:
isa_traits.hh:103
ByteOrder
ByteOrder
Definition:
types.hh:247
AlphaISA::PteMask
const Addr PteMask
Definition:
isa_traits.hh:59
AlphaISA::INTLEVEL_SERIAL
Definition:
isa_traits.hh:92
AlphaISA::INTINDEX_SCSI
Definition:
isa_traits.hh:88
AlphaISA::INTINDEX_ETHERNET
Definition:
isa_traits.hh:87
types.hh
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition:
types.hh:142
AlphaISA::ExtMachInst
uint64_t ExtMachInst
Definition:
types.hh:41
ULL
#define ULL(N)
uint64_t constant
Definition:
types.hh:50
AlphaISA::mode_executive
Definition:
isa_traits.hh:101
AlphaISA::INTLEVEL_IRQ3
Definition:
isa_traits.hh:90
AlphaISA::PageBytes
const Addr PageBytes
Definition:
isa_traits.hh:47
AlphaISA::MachineBytes
const int MachineBytes
Definition:
isa_traits.hh:107
LittleEndianByteOrder
Definition:
types.hh:249
AlphaISA::INTLEVEL_SOFTWARE_MAX
Definition:
isa_traits.hh:80
AlphaISA::CurThreadInfoReg
const int CurThreadInfoReg
Definition:
isa_traits.hh:113
AlphaISA::mode_kernel
Definition:
isa_traits.hh:100
AlphaISA::INTLEVEL_IRQ2
Definition:
isa_traits.hh:89
AlphaISA
Definition:
decoder.cc:33
AlphaISA::IPR_PALtemp23
Definition:
ipr.hh:195
AlphaISA::INTLEVEL_IRQ0
Definition:
isa_traits.hh:85
AlphaISA::mode_type
mode_type
Definition:
isa_traits.hh:98
AlphaISA::K0SegBase
const Addr K0SegBase
Definition:
isa_traits.hh:66
Generated on Fri Feb 28 2020 16:26:56 for gem5 by
doxygen
1.8.13