2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 * Mach Operating System
27 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
28 * All Rights Reserved.
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
40 * Carnegie Mellon requests users of this software to return to
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
55 * Author: Avadis Tevanian, Jr.
58 * Header file for VM data types. PPC version.
61 #ifndef _MACH_PPC_VM_TYPES_H_
62 #define _MACH_PPC_VM_TYPES_H_
66 #include <ppc/_types.h>
67 #include <ppc/vmparam.h>
71 * natural_t and integer_t are Mach's legacy types for machine-
72 * independent integer types (unsigned, and signed, respectively).
73 * Their original purpose was to define other types in a machine/
74 * compiler independent way.
76 * They also had an implicit "same size as pointer" characteristic
77 * to them (i.e. Mach's traditional types are very ILP32 or ILP64
78 * centric). We support PowerPC ABIs that do not follow either of
79 * these models (specifically LP64). Therefore, we had to make a
80 * choice between making these types scale with pointers or stay
81 * tied to integers. Because their use is predominantly tied to
82 * to the size of an integer, we are keeping that association and
83 * breaking free from pointer size guarantees.
85 * New use of these types is discouraged.
87 typedef __darwin_natural_t natural_t
;
88 typedef int integer_t
;
93 * For 32-bit PowerPC ABIs, the scalable types were
94 * always based upon natural_t (unsigned int).
95 * Because of potential legacy issues with name mangling,
96 * we cannot use the stdint uintptr_t type.
98 typedef natural_t vm_offset_t
;
99 typedef natural_t vm_size_t
;
101 #else /* __ppc64__ */
104 * For 64-bit PowerPC ABIs, we have no legacy name mangling
105 * issues, so we use the stdint types for scaling these
106 * types to the same size as a pointer.
108 typedef uintptr_t vm_offset_t
;
109 typedef uintptr_t vm_size_t
;
114 * This new type is independent of a particular vm map's
115 * implementation size - and represents appropriate types
116 * for all possible maps. This is used for interfaces
117 * where the size of the map is not known - or we don't
118 * want to have to distinguish.
120 typedef uint64_t mach_vm_address_t
;
121 typedef uint64_t mach_vm_offset_t
;
122 typedef uint64_t mach_vm_size_t
;
124 /* LP64todo - convert these over for good */
126 typedef uint64_t vm_map_offset_t
;
127 typedef uint64_t vm_map_address_t
;
128 typedef uint64_t vm_map_size_t
;
130 typedef uint32_t vm_map_offset_t
;
131 typedef uint32_t vm_map_address_t
;
132 typedef uint32_t vm_map_size_t
;
135 #ifdef MACH_KERNEL_PRIVATE
140 * These are types used internal to Mach to implement the
141 * legacy 32-bit VM APIs published by the kernel.
143 typedef uint32_t vm32_address_t
;
144 typedef uint32_t vm32_offset_t
;
145 typedef uint32_t vm32_size_t
;
147 #endif /* VM32_SUPPORT */
149 #endif /* MACH_KERNEL_PRIVATE */
151 #endif /* ASSEMBLER */
154 * If composing messages by hand (please do not)
156 #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
158 #endif /* _MACH_PPC_VM_TYPES_H_ */