misc: Get rid of the m5op_flags.h header.
[gem5.git] / include / gem5 / asm / generic / m5ops.h
1 /*
2 * Copyright (c) 2016 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2003-2006 The Regents of The University of Michigan
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40
41 #ifndef __GEM5_ASM_GENERIC_M5OPS_H__
42 #define __GEM5_ASM_GENERIC_M5OPS_H__
43
44 #define M5OP_ARM 0x00
45 #define M5OP_QUIESCE 0x01
46 #define M5OP_QUIESCE_NS 0x02
47 #define M5OP_QUIESCE_CYCLE 0x03
48 #define M5OP_QUIESCE_TIME 0x04
49 #define M5OP_RPNS 0x07
50 #define M5OP_WAKE_CPU 0x09
51 #define M5OP_DEPRECATED1 0x10 // obsolete ivlb
52 #define M5OP_DEPRECATED2 0x11 // obsolete ivle
53 #define M5OP_DEPRECATED3 0x20 // deprecated exit function
54 #define M5OP_EXIT 0x21
55 #define M5OP_FAIL 0x22
56 #define M5OP_INIT_PARAM 0x30
57 #define M5OP_LOAD_SYMBOL 0x31
58 #define M5OP_RESET_STATS 0x40
59 #define M5OP_DUMP_STATS 0x41
60 #define M5OP_DUMP_RESET_STATS 0x42
61 #define M5OP_CHECKPOINT 0x43
62 #define M5OP_WRITE_FILE 0x4F
63 #define M5OP_READ_FILE 0x50
64 #define M5OP_DEBUG_BREAK 0x51
65 #define M5OP_SWITCH_CPU 0x52
66 #define M5OP_ADD_SYMBOL 0x53
67 #define M5OP_PANIC 0x54
68
69 #define M5OP_RESERVED2 0x56 // Reserved for user
70 #define M5OP_RESERVED3 0x57 // Reserved for user
71 #define M5OP_RESERVED4 0x58 // Reserved for user
72 #define M5OP_RESERVED5 0x59 // Reserved for user
73
74 #define M5OP_WORK_BEGIN 0x5a
75 #define M5OP_WORK_END 0x5b
76
77 #define M5OP_SE_SYSCALL 0x60
78 #define M5OP_SE_PAGE_FAULT 0x61
79 #define M5OP_DIST_TOGGLE_SYNC 0x62
80
81 // These operations are for critical path annotation
82 #define M5OP_ANNOTATE 0x55
83 #define M5OP_AN_BSM 0x1
84 #define M5OP_AN_ESM 0x2
85 #define M5OP_AN_BEGIN 0x3
86 #define M5OP_AN_END 0x4
87 #define M5OP_AN_Q 0x6
88 #define M5OP_AN_DQ 0x7
89 #define M5OP_AN_WF 0x8
90 #define M5OP_AN_WE 0x9
91 #define M5OP_AN_RQ 0xA
92 #define M5OP_AN_WS 0xB
93 #define M5OP_AN_SQ 0xC
94 #define M5OP_AN_AQ 0xD
95 #define M5OP_AN_PQ 0xE
96 #define M5OP_AN_L 0xF
97 #define M5OP_AN_IDENTIFY 0x10
98 #define M5OP_AN_GETID 0x11
99
100
101 #define M5OP_FOREACH \
102 M5OP(m5_arm, M5OP_ARM); \
103 M5OP(m5_quiesce, M5OP_QUIESCE); \
104 M5OP(m5_quiesce_ns, M5OP_QUIESCE_NS); \
105 M5OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE); \
106 M5OP(m5_quiesce_time, M5OP_QUIESCE_TIME); \
107 M5OP(m5_rpns, M5OP_RPNS); \
108 M5OP(m5_wake_cpu, M5OP_WAKE_CPU); \
109 M5OP(m5_exit, M5OP_EXIT); \
110 M5OP(m5_fail, M5OP_FAIL); \
111 M5OP(m5_init_param, M5OP_INIT_PARAM); \
112 M5OP(m5_load_symbol, M5OP_LOAD_SYMBOL); \
113 M5OP(m5_reset_stats, M5OP_RESET_STATS); \
114 M5OP(m5_dump_stats, M5OP_DUMP_STATS); \
115 M5OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS); \
116 M5OP(m5_checkpoint, M5OP_CHECKPOINT); \
117 M5OP(m5_read_file, M5OP_READ_FILE); \
118 M5OP(m5_write_file, M5OP_WRITE_FILE); \
119 M5OP(m5_debug_break, M5OP_DEBUG_BREAK); \
120 M5OP(m5_switch_cpu, M5OP_SWITCH_CPU); \
121 M5OP(m5_add_symbol, M5OP_ADD_SYMBOL); \
122 M5OP(m5_panic, M5OP_PANIC); \
123 M5OP(m5_work_begin, M5OP_WORK_BEGIN); \
124 M5OP(m5_work_end, M5OP_WORK_END); \
125 M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC);
126
127 #endif // __GEM5_ASM_GENERIC_M5OPS_H__