Rev 3555 | Rev 3725 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
431 | serge | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
2465 | Serge | 3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
431 | serge | 4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
164 | serge | 7 | |
593 | mikedld | 8 | $Revision: 3629 $ |
9 | |||
10 | |||
586 | serge | 11 | dpl0 equ 10010000b ; data read dpl0 |
164 | serge | 12 | drw0 equ 10010010b ; data read/write dpl0 |
13 | drw3 equ 11110010b ; data read/write dpl3 |
||
14 | cpl0 equ 10011010b ; code read dpl0 |
||
15 | cpl3 equ 11111010b ; code read dpl3 |
||
16 | |||
17 | D32 equ 01000000b ; 32bit segment |
||
557 | serge | 18 | G32 equ 10000000b ; page gran |
164 | serge | 19 | |
20 | |||
21 | ;;;;;;;;;;;;cpu_caps flags;;;;;;;;;;;;;;;; |
||
22 | |||
23 | CPU_386 equ 3 |
||
24 | CPU_486 equ 4 |
||
25 | CPU_PENTIUM equ 5 |
||
26 | CPU_P6 equ 6 |
||
27 | CPU_PENTIUM4 equ 0x0F |
||
28 | |||
29 | CAPS_FPU equ 00 ;on-chip x87 floating point unit |
||
30 | CAPS_VME equ 01 ;virtual-mode enhancements |
||
31 | CAPS_DE equ 02 ;debugging extensions |
||
32 | CAPS_PSE equ 03 ;page-size extensions |
||
33 | CAPS_TSC equ 04 ;time stamp counter |
||
34 | CAPS_MSR equ 05 ;model-specific registers |
||
35 | CAPS_PAE equ 06 ;physical-address extensions |
||
36 | CAPS_MCE equ 07 ;machine check exception |
||
37 | CAPS_CX8 equ 08 ;CMPXCHG8B instruction |
||
38 | CAPS_APIC equ 09 ;on-chip advanced programmable |
||
39 | ; interrupt controller |
||
40 | ; 10 ;unused |
||
41 | CAPS_SEP equ 11 ;SYSENTER and SYSEXIT instructions |
||
42 | CAPS_MTRR equ 12 ;memory-type range registers |
||
43 | CAPS_PGE equ 13 ;page global extension |
||
44 | CAPS_MCA equ 14 ;machine check architecture |
||
45 | CAPS_CMOV equ 15 ;conditional move instructions |
||
46 | CAPS_PAT equ 16 ;page attribute table |
||
47 | |||
48 | CAPS_PSE36 equ 17 ;page-size extensions |
||
49 | CAPS_PSN equ 18 ;processor serial number |
||
50 | CAPS_CLFLUSH equ 19 ;CLFUSH instruction |
||
51 | |||
52 | CAPS_DS equ 21 ;debug store |
||
53 | CAPS_ACPI equ 22 ;thermal monitor and software |
||
54 | ;controlled clock supported |
||
55 | CAPS_MMX equ 23 ;MMX instructions |
||
56 | CAPS_FXSR equ 24 ;FXSAVE and FXRSTOR instructions |
||
57 | CAPS_SSE equ 25 ;SSE instructions |
||
58 | CAPS_SSE2 equ 26 ;SSE2 instructions |
||
59 | CAPS_SS equ 27 ;self-snoop |
||
60 | CAPS_HTT equ 28 ;hyper-threading technology |
||
61 | CAPS_TM equ 29 ;thermal monitor supported |
||
62 | CAPS_IA64 equ 30 ;IA64 capabilities |
||
63 | CAPS_PBE equ 31 ;pending break enable |
||
64 | |||
65 | ;ecx |
||
66 | CAPS_SSE3 equ 32 ;SSE3 instructions |
||
67 | ; 33 |
||
68 | ; 34 |
||
69 | CAPS_MONITOR equ 35 ;MONITOR/MWAIT instructions |
||
70 | CAPS_DS_CPL equ 36 ; |
||
71 | CAPS_VMX equ 37 ;virtual mode extensions |
||
72 | ; 38 ; |
||
73 | CAPS_EST equ 39 ;enhansed speed step |
||
74 | CAPS_TM2 equ 40 ;thermal monitor2 supported |
||
75 | ; 41 |
||
76 | CAPS_CID equ 42 ; |
||
77 | ; 43 |
||
78 | ; 44 |
||
79 | CAPS_CX16 equ 45 ;CMPXCHG16B instruction |
||
80 | CAPS_xTPR equ 46 ; |
||
81 | ; |
||
82 | ;reserved |
||
83 | ; |
||
84 | ;ext edx /ecx |
||
85 | CAPS_SYSCAL equ 64 ; |
||
86 | CAPS_XD equ 65 ;execution disable |
||
87 | CAPS_FFXSR equ 66 ; |
||
88 | CAPS_RDTSCP equ 67 ; |
||
89 | CAPS_X64 equ 68 ; |
||
90 | CAPS_3DNOW equ 69 ; |
||
91 | CAPS_3DNOWEXT equ 70 ; |
||
92 | CAPS_LAHF equ 71 ; |
||
93 | CAPS_CMP_LEG equ 72 ; |
||
94 | CAPS_SVM equ 73 ;secure virual machine |
||
95 | CAPS_ALTMOVCR8 equ 74 ; |
||
96 | |||
378 | serge | 97 | ; CPU MSR names |
1055 | Galkov | 98 | MSR_SYSENTER_CS equ 0x174 |
99 | MSR_SYSENTER_ESP equ 0x175 |
||
100 | MSR_SYSENTER_EIP equ 0x176 |
||
101 | MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register |
||
102 | MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register |
||
164 | serge | 103 | |
168 | serge | 104 | CR0_PE equ 0x00000001 ;protected mode |
105 | CR0_MP equ 0x00000002 ;monitor fpu |
||
106 | CR0_EM equ 0x00000004 ;fpu emulation |
||
107 | CR0_TS equ 0x00000008 ;task switch |
||
108 | CR0_ET equ 0x00000010 ;extension type hardcoded to 1 |
||
109 | CR0_NE equ 0x00000020 ;numeric error |
||
110 | CR0_WP equ 0x00010000 ;write protect |
||
111 | CR0_AM equ 0x00040000 ;alignment check |
||
112 | CR0_NW equ 0x20000000 ;not write-through |
||
113 | CR0_CD equ 0x40000000 ;cache disable |
||
114 | CR0_PG equ 0x80000000 ;paging |
||
115 | |||
116 | |||
164 | serge | 117 | CR4_VME equ 0x0001 |
118 | CR4_PVI equ 0x0002 |
||
119 | CR4_TSD equ 0x0004 |
||
120 | CR4_DE equ 0x0008 |
||
121 | CR4_PSE equ 0x0010 |
||
122 | CR4_PAE equ 0x0020 |
||
123 | CR4_MCE equ 0x0040 |
||
124 | CR4_PGE equ 0x0080 |
||
125 | CR4_PCE equ 0x0100 |
||
126 | CR4_OSFXSR equ 0x0200 |
||
127 | CR4_OSXMMEXPT equ 0x0400 |
||
128 | |||
168 | serge | 129 | SSE_IE equ 0x0001 |
130 | SSE_DE equ 0x0002 |
||
131 | SSE_ZE equ 0x0004 |
||
132 | SSE_OE equ 0x0008 |
||
133 | SSE_UE equ 0x0010 |
||
134 | SSE_PE equ 0x0020 |
||
135 | SSE_DAZ equ 0x0040 |
||
136 | SSE_IM equ 0x0080 |
||
137 | SSE_DM equ 0x0100 |
||
138 | SSE_ZM equ 0x0200 |
||
139 | SSE_OM equ 0x0400 |
||
140 | SSE_UM equ 0x0800 |
||
141 | SSE_PM equ 0x1000 |
||
142 | SSE_FZ equ 0x8000 |
||
164 | serge | 143 | |
168 | serge | 144 | SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM) |
164 | serge | 145 | |
2219 | Serge | 146 | IRQ_PIC equ 0 |
147 | IRQ_APIC equ 1 |
||
164 | serge | 148 | |
2434 | Serge | 149 | struct TSS |
150 | _back rw 2 |
||
151 | _esp0 rd 1 |
||
152 | _ss0 rw 2 |
||
153 | _esp1 rd 1 |
||
154 | _ss1 rw 2 |
||
155 | _esp2 rd 1 |
||
156 | _ss2 rw 2 |
||
157 | _cr3 rd 1 |
||
158 | _eip rd 1 |
||
159 | _eflags rd 1 |
||
160 | _eax rd 1 |
||
161 | _ecx rd 1 |
||
162 | _edx rd 1 |
||
163 | _ebx rd 1 |
||
164 | _esp rd 1 |
||
165 | _ebp rd 1 |
||
166 | _esi rd 1 |
||
167 | _edi rd 1 |
||
168 | _es rw 2 |
||
169 | _cs rw 2 |
||
170 | _ss rw 2 |
||
171 | _ds rw 2 |
||
172 | _fs rw 2 |
||
173 | _gs rw 2 |
||
174 | _ldt rw 2 |
||
175 | _trap rw 1 |
||
176 | _io rw 1 |
||
177 | rb 24 |
||
178 | _io_map_0 rb 4096 |
||
179 | _io_map_1 rb 4096 |
||
180 | ends |
||
164 | serge | 181 | |
3629 | Serge | 182 | PARTITION_COUNT equ 64 |
183 | DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100) |
||
184 | |||
465 | serge | 185 | OS_BASE equ 0x80000000 |
186 | |||
3629 | Serge | 187 | TASK_COUNT equ (CURRENT_TASK+0x04) |
188 | TASK_BASE equ (CURRENT_TASK+0x10) |
||
189 | TASK_DATA equ (CURRENT_TASK+0x20) |
||
190 | TASK_EVENT equ (CURRENT_TASK+0x20) |
||
191 | FDD_BUFF equ (OS_BASE+0x000D000) |
||
465 | serge | 192 | |
3629 | Serge | 193 | sys_pgdir equ (OS_BASE+0x006F000) |
2010 | serge | 194 | |
3629 | Serge | 195 | VGABasePtr equ (OS_BASE+0x00A0000) |
196 | CLEAN_ZONE equ (_CLEAN_ZONE-OS_BASE) |
||
197 | IDE_DMA equ (_IDE_DMA-OS_BASE) |
||
198 | |||
1454 | art_zh | 199 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
200 | |||
1310 | diamond | 201 | virtual at (OS_BASE+0x05FFF80) |
465 | serge | 202 | tss TSS |
203 | end virtual |
||
164 | serge | 204 | |
513 | serge | 205 | HEAP_BASE equ (OS_BASE+0x0800000) |
465 | serge | 206 | HEAP_MIN_SIZE equ 0x01000000 |
164 | serge | 207 | |
465 | serge | 208 | page_tabs equ 0xFDC00000 |
209 | app_page_tabs equ 0xFDC00000 |
||
210 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
||
211 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
||
164 | serge | 212 | |
465 | serge | 213 | LFB_BASE equ 0xFE000000 |
164 | serge | 214 | |
215 | |||
465 | serge | 216 | new_app_base equ 0; |
378 | serge | 217 | |
1172 | diamond | 218 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
164 | serge | 219 | |
220 | std_application_base_address equ new_app_base |
||
3555 | Serge | 221 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 байт для контекста FPU |
164 | serge | 222 | |
465 | serge | 223 | REG_SS equ (RING0_STACK_SIZE-4) |
224 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
||
225 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
||
226 | REG_CS equ (RING0_STACK_SIZE-16) |
||
227 | REG_EIP equ (RING0_STACK_SIZE-20) |
||
228 | REG_EAX equ (RING0_STACK_SIZE-24) |
||
229 | REG_ECX equ (RING0_STACK_SIZE-28) |
||
230 | REG_EDX equ (RING0_STACK_SIZE-32) |
||
231 | REG_EBX equ (RING0_STACK_SIZE-36) |
||
232 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
||
233 | REG_EBP equ (RING0_STACK_SIZE-44) |
||
234 | REG_ESI equ (RING0_STACK_SIZE-48) |
||
235 | REG_EDI equ (RING0_STACK_SIZE-52) |
||
236 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
||
237 | |||
238 | |||
188 | serge | 239 | PG_UNMAP equ 0x000 |
240 | PG_MAP equ 0x001 |
||
241 | PG_WRITE equ 0x002 |
||
242 | PG_SW equ 0x003 |
||
243 | PG_USER equ 0x005 |
||
244 | PG_UW equ 0x007 |
||
245 | PG_NOCACHE equ 0x018 |
||
246 | PG_LARGE equ 0x080 |
||
247 | PG_GLOBAL equ 0x100 |
||
164 | serge | 248 | |
940 | serge | 249 | PG_SHARED equ 0x200 |
250 | |||
164 | serge | 251 | ;;;;;;;;;;;boot time variables |
252 | |||
2441 | Serge | 253 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
254 | BOOT_PITCH equ 0x9001 ;word scanline length |
||
164 | serge | 255 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
2441 | Serge | 256 | BOOT_X_RES equ 0x900A ;word X res |
257 | BOOT_Y_RES equ 0x900C ;word Y res |
||
164 | serge | 258 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
259 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
||
260 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
||
261 | BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
||
2441 | Serge | 262 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
263 | BOOT_DMA equ 0x901F ; |
||
164 | serge | 264 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
265 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
||
2441 | Serge | 266 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
164 | serge | 267 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
268 | |||
2441 | Serge | 269 | BOOT_APM_ENTRY equ 0x9040 |
270 | BOOT_APM_VERSION equ 0x9044 |
||
271 | BOOT_APM_FLAGS equ 0x9046 ;unused |
||
272 | BOOT_APM_CODE_32 equ 0x9050 |
||
273 | BOOT_APM_CODE_16 equ 0x9052 |
||
274 | BOOT_APM_DATA_16 equ 0x9054 |
||
275 | |||
164 | serge | 276 | TMP_FILE_NAME equ 0 |
277 | TMP_CMD_LINE equ 1024 |
||
278 | TMP_ICON_OFFS equ 1280 |
||
279 | |||
280 | |||
281 | EVENT_REDRAW equ 0x00000001 |
||
282 | EVENT_KEY equ 0x00000002 |
||
283 | EVENT_BUTTON equ 0x00000004 |
||
284 | EVENT_BACKGROUND equ 0x00000010 |
||
285 | EVENT_MOUSE equ 0x00000020 |
||
286 | EVENT_IPC equ 0x00000040 |
||
287 | EVENT_NETWORK equ 0x00000080 |
||
288 | EVENT_DEBUG equ 0x00000100 |
||
3555 | Serge | 289 | EVENT_NETWORK2 equ 0x00000200 |
290 | EVENT_EXTENDED equ 0x00000400 |
||
164 | serge | 291 | |
292 | EV_INTR equ 1 |
||
293 | |||
2434 | Serge | 294 | struct THR_DATA |
295 | rb (8192-512) |
||
296 | ; pl0_stack |
||
297 | fpu_state rb 512 |
||
298 | tls_page rb 4096 |
||
299 | pdbr rb 4096 |
||
300 | ends |
||
465 | serge | 301 | |
2434 | Serge | 302 | virtual at (OS_BASE-sizeof.THR_DATA) |
465 | serge | 303 | thr_data THR_DATA |
304 | end virtual |
||
305 | |||
2434 | Serge | 306 | struct SYS_VARS |
307 | bpp dd ? |
||
308 | scanline dd ? |
||
309 | vesa_mode dd ? |
||
310 | x_res dd ? |
||
311 | y_res dd ? |
||
312 | ends |
||
164 | serge | 313 | |
2434 | Serge | 314 | struct APPOBJ ; common object header |
315 | magic dd ? ; |
||
316 | destroy dd ? ; internal destructor |
||
317 | fd dd ? ; next object in list |
||
318 | bk dd ? ; prev object in list |
||
319 | pid dd ? ; owner id |
||
320 | ends |
||
281 | serge | 321 | |
322 | APP_OBJ_OFFSET equ 48 |
||
354 | serge | 323 | APP_EV_OFFSET equ 40 |
281 | serge | 324 | |
2434 | Serge | 325 | struct CURSOR APPOBJ |
326 | base dd ? ;allocated memory |
||
327 | hot_x dd ? ;hotspot coords |
||
328 | hot_y dd ? |
||
281 | serge | 329 | |
2434 | Serge | 330 | list_next dd ? ;next cursor in cursor list |
331 | list_prev dd ? ;prev cursor in cursor list |
||
332 | dev_obj dd ? ;device depended data |
||
333 | ends |
||
1313 | serge | 334 | |
335 | |||
2434 | Serge | 336 | struct EVENT APPOBJ |
337 | id dd ? ;event uid |
||
338 | state dd ? ;internal flags |
||
339 | code dd ? |
||
340 | rd 5 |
||
341 | ends |
||
221 | serge | 342 | |
343 | |||
2434 | Serge | 344 | struct SMEM |
345 | bk dd ? |
||
346 | fd dd ? ;+4 |
||
347 | base dd ? ;+8 |
||
348 | size dd ? ;+12 |
||
349 | access dd ? ;+16 |
||
350 | refcount dd ? ;+20 |
||
351 | name rb 32 ;+24 |
||
352 | ends |
||
354 | serge | 353 | |
2434 | Serge | 354 | struct SMAP APPOBJ |
355 | base dd ? ;mapped base |
||
356 | parent dd ? ;SMEM |
||
357 | ends |
||
354 | serge | 358 | |
2434 | Serge | 359 | struct DLLDESCR |
360 | bk dd ? |
||
361 | fd dd ? ;+4 |
||
362 | data dd ? ;+8 |
||
363 | size dd ? ;+12 |
||
364 | timestamp dq ? |
||
365 | refcount dd ? |
||
366 | defaultbase dd ? |
||
367 | coff_hdr dd ? |
||
368 | symbols_ptr dd ? |
||
369 | symbols_num dd ? |
||
370 | symbols_lim dd ? |
||
371 | exports dd ? ;export table |
||
372 | name rb 260 |
||
373 | ends |
||
354 | serge | 374 | |
2434 | Serge | 375 | struct HDLL |
376 | fd dd ? ;next object in list |
||
377 | bk dd ? ;prev object in list |
||
378 | pid dd ? ;owner id |
||
354 | serge | 379 | |
2434 | Serge | 380 | base dd ? ;mapped base |
381 | size dd ? ;mapped size |
||
382 | refcount dd ? ;reference counter for this process and this lib |
||
383 | parent dd ? ;DLLDESCR |
||
384 | ends |
||
940 | serge | 385 | |
2434 | Serge | 386 | struct display_t |
387 | x dd ? |
||
388 | y dd ? |
||
389 | width dd ? |
||
390 | height dd ? |
||
391 | bpp dd ? |
||
392 | vrefresh dd ? |
||
393 | pitch dd ? |
||
394 | lfb dd ? |
||
940 | serge | 395 | |
2434 | Serge | 396 | modes dd ? |
397 | ddev dd ? |
||
398 | connector dd ? |
||
399 | crtc dd ? |
||
940 | serge | 400 | |
2434 | Serge | 401 | cr_list.next dd ? |
402 | cr_list.prev dd ? |
||
940 | serge | 403 | |
2434 | Serge | 404 | cursor dd ? |
940 | serge | 405 | |
2434 | Serge | 406 | init_cursor dd ? |
407 | select_cursor dd ? |
||
408 | show_cursor dd ? |
||
409 | move_cursor dd ? |
||
410 | restore_cursor dd ? |
||
2465 | Serge | 411 | disable_mouse dd ? |
2434 | Serge | 412 | mask_seqno dd ? |
413 | check_mouse dd ? |
||
414 | check_m_pixel dd ? |
||
415 | ends |
||
1289 | diamond | 416 | |
2434 | Serge | 417 | struct BOOT_DATA |
418 | bpp dd ? |
||
419 | scanline dd ? |
||
420 | vesa_mode dd ? |
||
421 | x_res dd ? |
||
422 | y_res dd ? |
||
423 | mouse_port dd ? |
||
424 | bank_switch dd ? |
||
425 | lfb dd ? |
||
426 | vesa_mem dd ? |
||
427 | log dd ? |
||
428 | direct_lfb dd ? |
||
429 | pci_data dd ? |
||
430 | dd ? |
||
431 | vrr dd ? |
||
432 | ide_base dd ? |
||
433 | mem_amount dd ? |
||
434 | pages_count dd ? |
||
435 | pagemap_size dd ? |
||
436 | kernel_max dd ? |
||
437 | kernel_pages dd ? |
||
438 | kernel_tables dd ? |
||
1289 | diamond | 439 | |
2434 | Serge | 440 | cpu_vendor dd ? |
441 | dd ? |
||
442 | dd ? |
||
443 | cpu_sign dd ? |
||
444 | cpu_info dd ? |
||
445 | cpu_caps dd ? |
||
446 | dd ? |
||
447 | dd ? |
||
448 | ends |
||
1289 | diamond | 449 | |
2434 | Serge | 450 | struct LHEAD |
451 | next dd ? ;next object in list |
||
452 | prev dd ? ;prev object in list |
||
453 | ends |
||
1289 | diamond | 454 | |
2434 | Serge | 455 | struct MUTEX |
456 | lhead LHEAD |
||
457 | count dd ? |
||
458 | ends |
||
1289 | diamond | 459 | |
3500 | Serge | 460 | struct PCIDEV |
461 | bk dd ? |
||
462 | fd dd ? |
||
463 | vendor_device_id dd ? |
||
464 | class dd ? |
||
465 | devfn db ? |
||
466 | bus db ? |
||
467 | ends |
||
468 | |||
469 | ; The following macro assume that we are on uniprocessor machine. |
||
470 | ; Serious work is needed for multiprocessor machines. |
||
471 | macro spin_lock_irqsave spinlock |
||
472 | { |
||
473 | pushf |
||
474 | cli |
||
475 | } |
||
476 | macro spin_unlock_irqrestore spinlock |
||
477 | { |
||
478 | popf |
||
479 | } |
||
480 | macro spin_lock_irq spinlock |
||
481 | { |
||
482 | cli |
||
483 | } |
||
484 | macro spin_unlock_irq spinlock |
||
485 | { |
||
486 | sti |
||
487 | } |
||
488 | |||
2434 | Serge | 489 | struct MEM_STATE |
490 | mutex MUTEX |
||
491 | smallmap dd ? |
||
492 | treemap dd ? |
||
493 | topsize dd ? |
||
494 | top dd ? |
||
495 | smallbins rd 4*32 |
||
496 | treebins rd 32 |
||
497 | ends |
||
940 | serge | 498 | |
2434 | Serge | 499 | struct PG_DATA |
500 | mem_amount dd ? |
||
501 | vesa_mem dd ? |
||
502 | pages_count dd ? |
||
503 | pages_free dd ? |
||
504 | pages_faults dd ? |
||
505 | pagemap_size dd ? |
||
506 | kernel_pages dd ? |
||
507 | kernel_tables dd ? |
||
508 | sys_page_dir dd ? |
||
509 | mutex MUTEX |
||
510 | ends |
||
1275 | serge | 511 | |
2434 | Serge | 512 | struct SRV |
513 | srv_name rb 16 ;ASCIIZ string |
||
514 | magic dd ? ;+0x10 ;'SRV ' |
||
515 | size dd ? ;+0x14 ;size of structure SRV |
||
516 | fd dd ? ;+0x18 ;next SRV descriptor |
||
517 | bk dd ? ;+0x1C ;prev SRV descriptor |
||
518 | base dd ? ;+0x20 ;service base address |
||
519 | entry dd ? ;+0x24 ;service START function |
||
520 | srv_proc dd ? ;+0x28 ;user mode service handler |
||
521 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
||
522 | ends |
||
1275 | serge | 523 | |
3555 | Serge | 524 | struct USBSRV |
525 | srv SRV |
||
526 | usb_func dd ? |
||
527 | ends |
||
528 | |||
529 | struct USBFUNC |
||
530 | strucsize dd ? |
||
531 | add_device dd ? |
||
532 | device_disconnect dd ? |
||
533 | ends |
||
534 | |||
465 | serge | 535 | DRV_ENTRY equ 1 |
536 | DRV_EXIT equ -1 |
||
537 | |||
2434 | Serge | 538 | struct COFF_HEADER |
539 | machine dw ? |
||
540 | nSections dw ? |
||
541 | DataTime dd ? |
||
542 | pSymTable dd ? |
||
543 | nSymbols dd ? |
||
544 | optHeader dw ? |
||
545 | flags dw ? |
||
546 | ends |
||
164 | serge | 547 | |
2434 | Serge | 548 | struct COFF_SECTION |
549 | Name rb 8 |
||
550 | VirtualSize dd ? |
||
551 | VirtualAddress dd ? |
||
552 | SizeOfRawData dd ? |
||
553 | PtrRawData dd ? |
||
554 | PtrReloc dd ? |
||
555 | PtrLinenumbers dd ? |
||
556 | NumReloc dw ? |
||
557 | NumLinenum dw ? |
||
558 | Characteristics dd ? |
||
559 | ends |
||
164 | serge | 560 | |
2434 | Serge | 561 | struct COFF_RELOC |
562 | VirtualAddress dd ? |
||
563 | SymIndex dd ? |
||
564 | Type dw ? |
||
565 | ends |
||
164 | serge | 566 | |
2434 | Serge | 567 | struct COFF_SYM |
568 | Name rb 8 |
||
569 | Value dd ? |
||
570 | SectionNumber dw ? |
||
571 | Type dw ? |
||
572 | StorageClass db ? |
||
573 | NumAuxSymbols db ? |
||
574 | ends |
||
164 | serge | 575 | |
2434 | Serge | 576 | struct IOCTL |
577 | handle dd ? |
||
578 | io_code dd ? |
||
579 | input dd ? |
||
580 | inp_size dd ? |
||
581 | output dd ? |
||
582 | out_size dd ? |
||
583 | ends |
||
164 | serge | 584 | |
2434 | Serge | 585 | struct IRQH |
586 | list LHEAD |
||
587 | handler dd ? ;handler roututine |
||
588 | data dd ? ;user-specific data |
||
3555 | Serge | 589 | num_ints dd ? ;how many times handled |
2434 | Serge | 590 | ends |