summaryrefslogtreecommitdiff
path: root/cpu.sym
blob: 5e3407482c1f4a1632f43a2e5eac0558907728f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
 * Copyright (c) 1992-1987 Carnegie Mellon University
 * All Rights Reserved.
 *
 * Permission to use, copy, modify and distribute this software and its
 * documentation is hereby granted, provided that both the copyright
 * notice and this permission notice appear in all copies of the
 * software, derivative works or modified versions, and any portions
 * thereof, and that both notices appear in supporting documentation.
 *
 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
 *
 * Carnegie Mellon requests users of this software to return to
 *
 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
 *  School of Computer Science
 *  Carnegie Mellon University
 *  Pittsburgh PA 15213-3890
 *
 * any improvements or extensions that they make and grant Carnegie Mellon
 * the rights to redistribute these changes.
 */
/*
 *	Mach IPC message and primitive function definitions.
 */

/*
 * Fetch values from the Mach header.
 */
#include <mach/message.h>

/*
 *	Known values for the msgt_name field.
 *
 *	The only types known to the Mach kernel are
 *	the port types, and those types used in the
 *	kernel RPC interface.
 */

expr MACH_MSG_TYPE_UNSTRUCTURED
expr MACH_MSG_TYPE_BIT
expr MACH_MSG_TYPE_BOOLEAN
expr MACH_MSG_TYPE_INTEGER_16
expr MACH_MSG_TYPE_INTEGER_32
expr MACH_MSG_TYPE_CHAR
expr MACH_MSG_TYPE_BYTE
expr MACH_MSG_TYPE_INTEGER_8
expr MACH_MSG_TYPE_REAL
expr MACH_MSG_TYPE_INTEGER_64
expr MACH_MSG_TYPE_STRING
expr MACH_MSG_TYPE_STRING_C

/*
 *  Values used when sending a port right.
 */

/* Must hold receive rights */
expr MACH_MSG_TYPE_MOVE_RECEIVE
/* Must hold send rights */
expr MACH_MSG_TYPE_MOVE_SEND
/* Must hold sendonce rights */
expr MACH_MSG_TYPE_MOVE_SEND_ONCE
/* Must hold send rights */
expr MACH_MSG_TYPE_COPY_SEND
/* Must hold receive rights */
expr MACH_MSG_TYPE_MAKE_SEND
/* Must hold receive rights */
expr MACH_MSG_TYPE_MAKE_SEND_ONCE

/*
 *  Values received/carried in messages.  Tells the receiver what
 *  sort of port right he now has.
 *
 *  MACH_MSG_TYPE_PORT_NAME is used to transfer a port name
 *  which should remain uninterpreted by the kernel.  (Port rights
 *  are not transferred, just the port name.)
 */

expr MACH_MSG_TYPE_PORT_NAME
expr MACH_MSG_TYPE_PORT_RECEIVE
expr MACH_MSG_TYPE_PORT_SEND
expr MACH_MSG_TYPE_PORT_SEND_ONCE

expr MACH_MSG_TYPE_PROTECTED_PAYLOAD

/*
 *  A dummy value.  Mostly used to indicate that the actual value
 *  will be filled in later, dynamically.
 */

expr MACH_MSG_TYPE_POLYMORPHIC


/* Types used in interfaces */
expr sizeof(integer_t)			word_size
expr (sizeof(integer_t)*8)		word_size_in_bits
expr sizeof(void*)			sizeof_pointer
expr sizeof(char)			sizeof_char
expr sizeof(short)			sizeof_short
expr sizeof(int)			sizeof_int
expr sizeof(long)			sizeof_long
expr sizeof(float)			sizeof_float
expr sizeof(double)			sizeof_double
expr sizeof(mach_msg_header_t)		sizeof_mach_msg_header_t
expr sizeof(mach_msg_type_long_t)	sizeof_mach_msg_type_long_t
expr sizeof(mach_msg_type_t)		sizeof_mach_msg_type_t
expr sizeof(vm_offset_t)		vm_offset_size
expr (sizeof(vm_offset_t)*8)		vm_offset_size_in_bits
expr sizeof(mach_port_name_t)		port_name_size
expr (sizeof(mach_port_name_t)*8)	port_name_size_in_bits