]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/ppc/vm_param.h
e011515820df1505fdb102bbbd3711890e6136cc
[apple/xnu.git] / osfmk / mach / ppc / vm_param.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * @OSF_COPYRIGHT@
27 */
28 #ifndef _MACH_PPC_VM_PARAM_H_
29 #define _MACH_PPC_VM_PARAM_H_
30
31 #define BYTE_SIZE 8 /* byte size in bits */
32
33 #define PPC_PGBYTES 4096 /* bytes per ppc page */
34 #define PPC_PGSHIFT 12 /* number of bits to shift for pages */
35
36 #define VM_MIN_ADDRESS ((vm_offset_t) 0)
37 #define VM_MAX_ADDRESS ((vm_offset_t) 0xfffff000U)
38
39 #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t) 0x00001000)
40
41 /* We map the kernel using only SR0,SR1,SR2,SR3 leaving segments alone */
42 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t) 0x3fffffff)
43
44 #define USER_STACK_END ((vm_offset_t) 0xffff0000U)
45
46 #define ppc_round_page(x) ((((unsigned)(x)) + PPC_PGBYTES - 1) & \
47 ~(PPC_PGBYTES-1))
48 #define ppc_trunc_page(x) (((unsigned)(x)) & ~(PPC_PGBYTES-1))
49
50
51 #define KERNEL_STACK_SIZE (4 * PPC_PGBYTES)
52 #define INTSTACK_SIZE (5 * PPC_PGBYTES)
53
54 #endif /* _PPC_VM_PARAM_H_ */