blob: 96f5761c30908b5c8b208cd44b75fcafdc87bbd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
/*
* Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University
* Copyright (c) 1991 IBM Corporation
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation,
* and that the name IBM not be used in advertising or publicity
* pertaining to distribution of the software without specific, written
* prior permission.
*
* CARNEGIE MELLON AND IBM ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON AND IBM DISCLAIM ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* Pass field offsets to assembly code.
*/
#include <sys/reboot.h>
#include <kern/thread.h>
#include <kern/task.h>
#include <kern/syscall_emulation.h>
#include <i386/thread.h>
#include <i386/pmap.h>
#include <i386/vm_param.h>
#include <i386/seg.h>
#include <i386/tss.h>
#include <i386at/idt.h>
#include <i386/gdt.h>
#include <i386/ldt.h>
#include <i386/mp_desc.h>
#include <i386/xen.h>
offset thread th pcb
offset thread th task
offset thread th recover
offset thread th kernel_stack
offset thread th swap_func
offset task task eml_dispatch TASK_EMUL
offset eml_dispatch eml disp_min DISP_MIN
offset eml_dispatch eml disp_count DISP_COUNT
offset eml_dispatch eml disp_vector DISP_VECTOR
expr &STACK_IKS(0)->k_ebx KSS_EBX
expr &STACK_IKS(0)->k_esp KSS_ESP
expr &STACK_IKS(0)->k_ebp KSS_EBP
expr &STACK_IKS(0)->k_esi KSS_ESI
expr &STACK_IKS(0)->k_edi KSS_EDI
expr &STACK_IKS(0)->k_eip KSS_EIP
size i386_kernel_state iks
size i386_exception_link iel
offset i386_saved_state r cs
offset i386_saved_state r uesp
offset i386_saved_state r eax
offset i386_saved_state r trapno
offset i386_saved_state r err
offset i386_saved_state r efl R_EFLAGS
offset i386_saved_state r eip
offset i386_saved_state r cr2
offset i386_saved_state r edi
offset i386_interrupt_state i eip
offset i386_interrupt_state i cs
offset i386_interrupt_state i efl
offset i386_tss tss esp0
offset i386_tss tss ss0
offset machine_slot sub_type cpu_type
expr I386_PGBYTES NBPG
expr VM_MIN_ADDRESS
expr VM_MAX_ADDRESS
expr VM_MIN_KERNEL_ADDRESS KERNELBASE
expr KERNEL_STACK_SIZE
#if defined MACH_PSEUDO_PHYS && (VM_MIN_KERNEL_ADDRESS == LINEAR_MIN_KERNEL_ADDRESS)
expr PFN_LIST pfn_list
#endif
#if PAE
expr PDPSHIFT
#endif /* PAE */
expr PDESHIFT
expr PDEMASK
expr PTESHIFT
expr PTEMASK
expr sizeof(pt_entry_t) PTE_SIZE
expr INTEL_PTE_PFN PTE_PFN
expr INTEL_PTE_VALID PTE_V
expr INTEL_PTE_WRITE PTE_W
expr ~INTEL_PTE_VALID PTE_INVALID
expr NPTES PTES_PER_PAGE
expr INTEL_PTE_VALID|INTEL_PTE_WRITE INTEL_PTE_KERNEL
expr IDTSZ
expr GDTSZ
expr LDTSZ
expr KERNEL_RING
expr KERNEL_CS
expr KERNEL_DS
expr KERNEL_TSS
#ifndef MACH_PV_DESCRIPTORS
expr KERNEL_LDT
#endif /* MACH_PV_DESCRIPTORS */
expr (VM_MIN_KERNEL_ADDRESS>>PDESHIFT)*sizeof(pt_entry_t) KERNELBASEPDE
#if MACH_KDB
expr RB_KDB
#endif /* MACH_KDB */
expr INTSTACK_SIZE
#if !STAT_TIME
offset timer tm low_bits LOW_BITS
offset timer tm high_bits HIGH_BITS
offset timer tm high_bits_check HIGH_BITS_CHECK
expr TIMER_HIGH_UNIT
offset thread th system_timer
offset thread th user_timer
#endif
#ifdef MACH_XEN
offset shared_info si vcpu_info[0].evtchn_upcall_mask CPU_CLI
offset shared_info si vcpu_info[0].evtchn_upcall_pending CPU_PENDING
offset shared_info si vcpu_info[0].evtchn_pending_sel CPU_PENDING_SEL
offset shared_info si evtchn_pending PENDING
offset shared_info si evtchn_mask EVTMASK
offset shared_info si vcpu_info[0].arch.cr2 CR2
#endif /* MACH_XEN */
|