]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/ppc/vm_param.h
5d10cbb9630df839e843794198b9a009e3e93eb3
3 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. The rights granted to you under the
11 * License may not be used to create, or enable the creation or
12 * redistribution of, unlawful or unlicensed copies of an Apple operating
13 * system, or to circumvent, violate, or enable the circumvention or
14 * violation of, any terms of an Apple operating system software license
17 * Please obtain a copy of the License at
18 * http://www.opensource.apple.com/apsl/ and read it before using this
21 * The Original Code and all software distributed under the License are
22 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
23 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
24 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
26 * Please see the License for the specific language governing rights and
27 * limitations under the License.
29 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
35 #ifndef _MACH_PPC_VM_PARAM_H_
36 #define _MACH_PPC_VM_PARAM_H_
39 * These are the global definitions
42 #define BYTE_SIZE 8 /* byte size in bits */
44 #define PPC_PGBYTES 4096 /* bytes per ppc page */
45 #define PPC_PGSHIFT 12 /* number of bits to shift for pages */
47 #define PAGE_SIZE PPC_PGBYTES
48 #define PAGE_SHIFT PPC_PGSHIFT
49 #define PAGE_MASK (PAGE_SIZE - 1)
52 #define VM_MAX_PAGE_ADDRESS 0xFFFFFFFFFFFFF000ULL
55 * LP64todo - For now, we are limited to 51-bits of user addressing
57 #define VM_MAX_PAGE_ADDRESS 0x0007FFFFFFFFF000ULL
60 #define MACH_VM_MIN_ADDRESS ((mach_vm_offset_t) 0)
61 #define MACH_VM_MAX_ADDRESS ((mach_vm_offset_t) VM_MAX_PAGE_ADDRESS)
64 * These are the values relative to the local process.
66 #if defined (__ppc64__)
68 * LP64todo - We don't have the 64-bit address space layout yet.
69 * Use the 32-bit stack layout for now.
71 #define VM_MIN_ADDRESS ((vm_offset_t) MACH_VM_MIN_ADDRESS)
72 #define VM_MAX_ADDRESS ((vm_offset_t) MACH_VM_MAX_ADDRESS)
73 #define USER_STACK_END ((vm_offset_t) 0x00000000ffff0000ULL)
75 #define VM_MIN_ADDRESS ((vm_offset_t) 0)
76 #define VM_MAX_ADDRESS ((vm_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
77 #define USER_STACK_END ((vm_offset_t) 0xffff0000U)
78 #endif /* defined(__ppc64__) */
82 /* Kernel-wide values */
83 #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t) 0x00001000)
84 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t) 0xDFFFFFFF)
85 #define KERNEL_STACK_SIZE (4 * PPC_PGBYTES)
86 #define INTSTACK_SIZE (5 * PPC_PGBYTES)
88 #define VM_MAP_MIN_ADDRESS MACH_VM_MIN_ADDRESS
89 #define VM_MAP_MAX_ADDRESS MACH_VM_MAX_ADDRESS
91 #ifdef MACH_KERNEL_PRIVATE
93 /* For implementing legacy 32-bit interfaces */
95 #define VM32_MIN_ADDRESS ((vm32_offset_t) 0)
96 #define VM32_MAX_ADDRESS ((vm32_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
98 #endif /* MACH_KERNEL_PRIVATE */
100 #endif /* KERNEL_PRIVATE */
102 #endif /* _MACH_PPC_VM_PARAM_H_ */