]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/ppc/vm_param.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / osfmk / mach / ppc / vm_param.h
CommitLineData
55e303ae 1
1c79356b 2/*
91447636 3 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
1c79356b 4 *
6601e61a 5 * @APPLE_LICENSE_HEADER_START@
1c79356b 6 *
6601e61a
A
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.
8f6c56a5 12 *
6601e61a
A
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
8f6c56a5
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
6601e61a
A
17 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18 * License for the specific language governing rights and limitations
19 * under the License.
8f6c56a5 20 *
6601e61a 21 * @APPLE_LICENSE_HEADER_END@
1c79356b
A
22 */
23/*
24 * @OSF_COPYRIGHT@
25 */
91447636 26
1c79356b
A
27#ifndef _MACH_PPC_VM_PARAM_H_
28#define _MACH_PPC_VM_PARAM_H_
29
91447636
A
30/*
31 * These are the global definitions
32 */
1c79356b 33
91447636 34#define BYTE_SIZE 8 /* byte size in bits */
1c79356b 35
91447636
A
36#define PPC_PGBYTES 4096 /* bytes per ppc page */
37#define PPC_PGSHIFT 12 /* number of bits to shift for pages */
55e303ae 38
91447636
A
39#define PAGE_SIZE PPC_PGBYTES
40#define PAGE_SHIFT PPC_PGSHIFT
41#define PAGE_MASK (PAGE_SIZE - 1)
42
43#if 0
44#define VM_MAX_PAGE_ADDRESS 0xFFFFFFFFFFFFF000ULL
45#else
46/*
47 * LP64todo - For now, we are limited to 51-bits of user addressing
48 */
49#define VM_MAX_PAGE_ADDRESS 0x0007FFFFFFFFF000ULL
50#endif
51
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)
54
55/*
56 * These are the values relative to the local process.
57 */
58#if defined (__ppc64__)
59/*
60 * LP64todo - We don't have the 64-bit address space layout yet.
61 * Use the 32-bit stack layout for now.
62 */
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)
66#else
1c79356b 67#define VM_MIN_ADDRESS ((vm_offset_t) 0)
55e303ae 68#define VM_MAX_ADDRESS ((vm_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
91447636
A
69#define USER_STACK_END ((vm_offset_t) 0xffff0000U)
70#endif /* defined(__ppc64__) */
1c79356b 71
91447636 72#ifdef KERNEL_PRIVATE
1c79356b 73
91447636
A
74/* Kernel-wide values */
75#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t) 0x00001000)
55e303ae 76#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t) 0xDFFFFFFF)
91447636
A
77#define KERNEL_STACK_SIZE (4 * PPC_PGBYTES)
78#define INTSTACK_SIZE (5 * PPC_PGBYTES)
1c79356b 79
91447636
A
80#define VM_MAP_MIN_ADDRESS MACH_VM_MIN_ADDRESS
81#define VM_MAP_MAX_ADDRESS MACH_VM_MAX_ADDRESS
1c79356b 82
91447636
A
83#ifdef MACH_KERNEL_PRIVATE
84
85/* For implementing legacy 32-bit interfaces */
86#define VM32_SUPPORT
87#define VM32_MIN_ADDRESS ((vm32_offset_t) 0)
88#define VM32_MAX_ADDRESS ((vm32_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF))
89
90#endif /* MACH_KERNEL_PRIVATE */
91
92#endif /* KERNEL_PRIVATE */
1c79356b 93
91447636 94#endif /* _MACH_PPC_VM_PARAM_H_ */