Chameleon

Chameleon Svn Source Tree

Root/tags/2.0/i386/include/mach/shared_region.h

Source at commit 1733 created 12 years 6 months ago.
By blackosx, Use the result from an intitial check to find if the target volume has an EFI system partition, later on in the installation process before checking for previous Chameleon installations. Add some feedback to the installer log.
1/*
2 * Copyright (c) 2007 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The 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, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 *
25 *File: mach/shared_region.h
26 *
27 * protos and struct definitions for shared region
28 */
29
30#ifndef _MACH_SHARED_REGION_H_
31#define _MACH_SHARED_REGION_H_
32
33#include <sys/cdefs.h>
34#include <mach/vm_prot.h>
35#include <mach/vm_types.h>
36#include <mach/mach_types.h>
37
38#define SHARED_REGION_BASE_I3860x90000000ULL
39#define SHARED_REGION_SIZE_I3860x20000000ULL
40#define SHARED_REGION_NESTING_BASE_I3860x90000000ULL
41#define SHARED_REGION_NESTING_SIZE_I3860x20000000ULL
42#define SHARED_REGION_NESTING_MIN_I3860x00200000ULL
43#define SHARED_REGION_NESTING_MAX_I3860xFFE00000ULL
44
45#define SHARED_REGION_BASE_X86_640x00007FFF70000000ULL
46#define SHARED_REGION_SIZE_X86_640x000000008FE00000ULL
47#define SHARED_REGION_NESTING_BASE_X86_640x00007FFF80000000ULL
48#define SHARED_REGION_NESTING_SIZE_X86_640x0000000040000000ULL
49#define SHARED_REGION_NESTING_MIN_X86_640x0000000000200000ULL
50#define SHARED_REGION_NESTING_MAX_X86_640xFFFFFFFFFFE00000ULL
51
52#define SHARED_REGION_BASE_PPC0x90000000ULL
53#define SHARED_REGION_SIZE_PPC0x20000000ULL
54#define SHARED_REGION_NESTING_BASE_PPC0x90000000ULL
55#define SHARED_REGION_NESTING_SIZE_PPC0x10000000ULL
56#define SHARED_REGION_NESTING_MIN_PPC0x10000000ULL
57#define SHARED_REGION_NESTING_MAX_PPC0x10000000ULL
58
59#define SHARED_REGION_BASE_PPC640x00007FFF60000000ULL
60#define SHARED_REGION_SIZE_PPC640x00000000A0000000ULL
61#define SHARED_REGION_NESTING_BASE_PPC640x00007FFF60000000ULL
62#define SHARED_REGION_NESTING_SIZE_PPC640x00000000A0000000ULL
63#define SHARED_REGION_NESTING_MIN_PPC640x0000000010000000ULL
64#define SHARED_REGION_NESTING_MAX_PPC640x0000000010000000ULL
65
66#define SHARED_REGION_BASE_ARM0x30000000ULL
67#define SHARED_REGION_SIZE_ARM0x10000000ULL
68#define SHARED_REGION_NESTING_BASE_ARM0x30000000ULL
69#define SHARED_REGION_NESTING_SIZE_ARM0x08000000ULL
70#define SHARED_REGION_NESTING_MIN_ARM?
71#define SHARED_REGION_NESTING_MAX_ARM?
72
73#if defined(__i386__)
74#define SHARED_REGION_BASESHARED_REGION_BASE_I386
75#define SHARED_REGION_SIZESHARED_REGION_SIZE_I386
76#define SHARED_REGION_NESTING_BASESHARED_REGION_NESTING_BASE_I386
77#define SHARED_REGION_NESTING_SIZESHARED_REGION_NESTING_SIZE_I386
78#define SHARED_REGION_NESTING_MINSHARED_REGION_NESTING_MIN_I386
79#define SHARED_REGION_NESTING_MAXSHARED_REGION_NESTING_MAX_I386
80#elif defined(__x86_64__)
81#define SHARED_REGION_BASESHARED_REGION_BASE_X86_64
82#define SHARED_REGION_SIZESHARED_REGION_SIZE_X86_64
83#define SHARED_REGION_NESTING_BASESHARED_REGION_NESTING_BASE_X86_64
84#define SHARED_REGION_NESTING_SIZESHARED_REGION_NESTING_SIZE_X86_64
85#define SHARED_REGION_NESTING_MINSHARED_REGION_NESTING_MIN_X86_64
86#define SHARED_REGION_NESTING_MAXSHARED_REGION_NESTING_MAX_X86_64
87#elif defined(__ppc__)
88#define SHARED_REGION_BASESHARED_REGION_BASE_PPC
89#define SHARED_REGION_SIZESHARED_REGION_SIZE_PPC
90#define SHARED_REGION_NESTING_BASESHARED_REGION_NESTING_BASE_PPC
91#define SHARED_REGION_NESTING_SIZESHARED_REGION_NESTING_SIZE_PPC
92#define SHARED_REGION_NESTING_MINSHARED_REGION_NESTING_MIN_PPC
93#define SHARED_REGION_NESTING_MAXSHARED_REGION_NESTING_MAX_PPC
94#elif defined(__ppc64__)
95#define SHARED_REGION_BASESHARED_REGION_BASE_PPC64
96#define SHARED_REGION_SIZESHARED_REGION_SIZE_PPC64
97#define SHARED_REGION_NESTING_BASESHARED_REGION_NESTING_BASE_PPC64
98#define SHARED_REGION_NESTING_SIZESHARED_REGION_NESTING_SIZE_PPC64
99#define SHARED_REGION_NESTING_MINSHARED_REGION_NESTING_MIN_PPC64
100#define SHARED_REGION_NESTING_MAXSHARED_REGION_NESTING_MAX_PPC64
101#elif defined(__arm__)
102#define SHARED_REGION_BASESHARED_REGION_BASE_ARM
103#define SHARED_REGION_SIZESHARED_REGION_SIZE_ARM
104#define SHARED_REGION_NESTING_BASESHARED_REGION_NESTING_BASE_ARM
105#define SHARED_REGION_NESTING_SIZESHARED_REGION_NESTING_SIZE_ARM
106#define SHARED_REGION_NESTING_MINSHARED_REGION_NESTING_MIN_ARM
107#define SHARED_REGION_NESTING_MAXSHARED_REGION_NESTING_MAX_ARM
108#endif
109
110/*
111 * All shared_region_* declarations are a private interface
112 * between dyld and the kernel.
113 *
114 */
115struct shared_file_mapping_np {
116mach_vm_address_tsfm_address;
117mach_vm_size_tsfm_size;
118mach_vm_offset_tsfm_file_offset;
119vm_prot_tsfm_max_prot;
120vm_prot_tsfm_init_prot;
121};
122#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */
123#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */
124
125
126__BEGIN_DECLS
127intshared_region_check_np(uint64_t*startaddress);
128intshared_region_map_np(int fd,
129 uint32_t mappingCount,
130 const struct shared_file_mapping_np *mappings);
131__END_DECLS
132
133
134#endif /* _MACH_SHARED_REGION_H_ */
135

Archive Download this file

Revision: 1733