]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/lowglobals.h
5895029fa03f555b957c93372410cac1b22d9fc1
[apple/xnu.git] / osfmk / ppc / lowglobals.h
1 /*
2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_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. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28 /*
29 * Header files for the Low Memory Globals (lg)
30 */
31 #ifndef _LOW_MEMORY_GLOBALS_H_
32 #define _LOW_MEMORY_GLOBALS_H_
33
34 #include <mach/mach_types.h>
35 #include <mach/vm_types.h>
36 #include <mach/machine/vm_types.h>
37 #include <mach/vm_prot.h>
38 #include <ppc/proc_reg.h>
39 #include <ppc/savearea.h>
40 #include <ppc/low_trace.h>
41 #include <ppc/Diagnostics.h>
42 #include <ppc/mappings.h>
43
44 /*
45 * Don't change these structures unless you change the corresponding assembly code
46 * which is in lowmem_vectors.s
47 */
48
49 /*
50 * This is where we put constants, pointers, and data areas that must be accessed
51 * quickly through assembler. They are designed to be accessed directly with
52 * absolute addresses, not via a base register. This is a global area, and not
53 * per processor.
54 */
55
56 #pragma pack(4) /* Make sure the structure stays as we defined it */
57 typedef struct lowglo {
58
59 unsigned long lgForceAddr[5*1024]; /* 0000 Force to page 5 */
60 unsigned char lgVerCode[8]; /* 5000 System verification code */
61 unsigned long long lgZero; /* 5008 Double constant 0 */
62 unsigned int lgPPStart; /* 5010 Start of per_proc blocks */
63 unsigned int lgCHUDXNUfnStart; /* 5014 CHUD XNU function glue table */
64 unsigned int lgMckFlags; /* 5018 Machine check flags */
65 unsigned int lgVersion; /* 501C Pointer to kernel version string */
66 uint64_t lgPMWvaddr; /* 5020 physical memory window virtual address */
67 uint64_t lgUMWvaddr; /* 5028 user memory window virtual address */
68 unsigned int lgVMMforcedFeats; /* 5030 VMM boot-args forced feature flags */
69 unsigned int lgMaxDec; /* 5034 Maximum decrementer we can set */
70 unsigned int lgPmsCtlp; /* 5038 Pointer to power management stepper control */
71 unsigned int lgRsv03C[17]; /* 503C reserved */
72 traceWork lgTrcWork; /* 5080 Tracing control block - trcWork */
73 unsigned int lgRsv0A0[24]; /* 50A0 reserved */
74 struct Saveanchor lgSaveanchor; /* 5100 Savearea anchor - saveanchor */
75 unsigned int lgRsv140[16]; /* 5140 reserved */
76 unsigned int lgTlbieLck; /* 5180 TLBIE lock */
77 unsigned int lgRsv184[31]; /* 5184 reserved - push to next line */
78 struct diagWork lgdgWork; /* 5200 Start of diagnostic work area */
79 unsigned int lglcksWork; /* 5220 lcks option */
80 unsigned int lgRsv224[23]; /* 5224 reserved */
81 pcfg lgpPcfg[8]; /* 5280 Page configurations */
82 unsigned int lgRst2A0[24]; /* 52A0 reserved */
83 unsigned int lgKillResv; /* 5300 line used to kill reservations */
84 unsigned int lgKillResvpad[31]; /* 5304 pad reservation kill line */
85
86 unsigned int lgRsv380[32]; /* 5380 - 5400 reserved */
87
88 unsigned int lgRsv400[32]; /* 5400 - 5480 reserved */
89
90 uint32_t lgRsv480[704]; /* 5480 reserved - push to 1 page */
91
92 } lowglo;
93
94 extern lowglo lowGlo;
95
96 #endif /* _LOW_MEMORY_GLOBALS_H_ */