2 * Copyright (c) 2003 Cray, Inc.
4 * The contents of this file are proprietary information of Cray Inc.
5 * and may not be disclosed without prior written consent.
8 * This code is licensed under the GNU General Public License,
9 * Version 2. See the file COPYING for more details.
14 #ifndef __RCA_DEFS_H__
15 #define __RCA_DEFS_H__
18 // Definitions moved from rs_event_name.h
20 #define RS_CONSOLE_LOG (28)
22 #define RS_CONSOLE_INPUT (51)
23 #define RS_KGDB_INPUT (52)
24 #define RS_KGDB_OUTPUT (53)
26 #define RS_DBG_CLASS 0x00010000
27 #define RS_LOG_CLASS 0x00001000
30 #define ec_console_log (RS_LOG_CLASS | RS_CONSOLE_LOG)
33 #define ec_console_input (RS_DBG_CLASS | RS_CONSOLE_INPUT)
34 #define ec_kgdb_input (RS_DBG_CLASS | RS_KGDB_INPUT)
35 #define ec_kgdb_output (RS_DBG_CLASS | RS_KGDB_OUTPUT)
37 #define RS_RCA_SVC_CLASS 7 /* RCA service class */
38 /* service type class bits */
39 #define RS_CLASS_BITS 8
40 #define RS_CLASS_MASK ((1 << RS_CLASS_BITS) - 1)
42 #define RS_SUBCLASS_BITS 24
43 #define RS_SUBCLASS_MASK ((1 << RS_SUBCLASS_BITS) -1)
45 /* generate service type */
46 #define RCA_MAKE_SERVICE_INDEX(class, subclass) \
47 ( (((class)&RS_CLASS_MASK) << RS_SUBCLASS_BITS) | \
48 ((subclass) & RS_SUBCLASS_MASK) )
51 /* macro for setting up service id */
52 #define RS_MKSVC(i, t, n) (rs_service_id_t){(i), (t), (n)}
55 /* need to set RS_MSG_LEN before including rs_event.h */
56 #define RS_MSG_LEN 256
58 #define RCA_SVC_CLASS RS_RCA_SVC_CLASS /* 7 */
60 #define RCA_CLASS_BITS RS_CLASS_BITS
61 #define RCA_CLASS_MASK RS_CLASS_MASK
63 /* number of bits client may use in subclass */
64 #define RCA_SUBCLASS_BITS RS_SUBCLASS_BITS
65 #define RCA_SUBCLASS_MASK RS_SUBCLASS_MASK
67 #define RCA_INST_ANY 0xffffffffUL
69 /* system console log */
70 #define RCA_SVCTYPE_CONS RCA_MAKE_SERVICE_INDEX(RCA_SVC_CLASS, 6)
71 #define RCA_SVCTYPE_TEST0 RCA_MAKE_SERVICE_INDEX(RCA_SVC_CLASS, 10)
73 /* rs_service_id_t constants and helpers */
74 #define RCA_MKSVC(i, t, n) RS_MKSVC((i), (t), (n))
76 #define RCA_LOG_DEBUG 7
78 #endif /* !_RCA_TYPES_H_ */