]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/ppc/vm_param.h
3 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
7 * The contents of this file constitute Original Code as defined in and
8 * are subject to the Apple Public Source License Version 1.1 (the
9 * "License"). You may not use this file except in compliance with the
10 * License. Please obtain a copy of the License at
11 * http://www.apple.com/publicsource and read it before using this file.
13 * This Original Code and all software distributed under the License are
14 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18 * License for the specific language governing rights and limitations
21 * @APPLE_LICENSE_HEADER_END@
27 #ifndef _MACH_PPC_VM_PARAM_H_
28 #define _MACH_PPC_VM_PARAM_H_
31 * These are the global definitions
34 #define BYTE_SIZE 8 /* byte size in bits */
36 #define PPC_PGBYTES 4096 /* bytes per ppc page */
37 #define PPC_PGSHIFT 12 /* number of bits to shift for pages */
39 #define PAGE_SIZE PPC_PGBYTES
40 #define PAGE_SHIFT PPC_PGSHIFT
41 #define PAGE_MASK (PAGE_SIZE - 1)
44 #define VM_MAX_PAGE_ADDRESS 0xFFFFFFFFFFFFF000ULL
47 * LP64todo - For now, we are limited to 51-bits of user addressing
49 #define VM_MAX_PAGE_ADDRESS 0x0007FFFFFFFFF000ULL
52 #define MACH_VM_MIN_ADDRESS ((mach_vm_offset_t) 0)
53 #define MACH_VM_MAX_ADDRESS ((mach_vm_offset_t) VM_MAX_PAGE_ADDRESS)
56 * These are the values relative to the local process.
58 #if defined (__ppc64__)
60 * LP64todo - We don't have the 64-bit address space layout yet.
61 * Use the 32-bit stack layout for now.
63 #define VM_MIN_ADDRESS ((vm_offset_t) MACH_VM_MIN_ADDRESS)
64 #define VM_MAX_ADDRESS ((vm_offset_t) MACH_VM_MAX_ADDRESS)
65 #define USER_STACK_END ((vm_offset_t) 0x00000000ffff0000ULL)
67 #define VM_MIN_ADDRESS ((vm_offset_t) 0)
68 #define VM_MAX_ADDRESS ((vm_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
69 #define USER_STACK_END ((vm_offset_t) 0xffff0000U)
70 #endif /* defined(__ppc64__) */
74 /* Kernel-wide values */
75 #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t) 0x00001000)
76 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t) 0xDFFFFFFF)
77 #define KERNEL_STACK_SIZE (4 * PPC_PGBYTES)
78 #define INTSTACK_SIZE (5 * PPC_PGBYTES)
80 #define VM_MAP_MIN_ADDRESS MACH_VM_MIN_ADDRESS
81 #define VM_MAP_MAX_ADDRESS MACH_VM_MAX_ADDRESS
83 #ifdef MACH_KERNEL_PRIVATE
85 /* For implementing legacy 32-bit interfaces */
87 #define VM32_MIN_ADDRESS ((vm32_offset_t) 0)
88 #define VM32_MAX_ADDRESS ((vm32_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
90 #endif /* MACH_KERNEL_PRIVATE */
92 #endif /* KERNEL_PRIVATE */
94 #endif /* _MACH_PPC_VM_PARAM_H_ */