Rev 3606 | Rev 3702 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2288 | clevermous | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
2455 | mario79 | 3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
2288 | clevermous | 4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
7 | |||
8 | $Revision: 3627 $ |
||
9 | |||
10 | |||
11 | dpl0 equ 10010000b ; data read dpl0 |
||
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 |
||
18 | G32 equ 10000000b ; page gran |
||
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 | |||
97 | ; CPU MSR names |
||
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 |
||
103 | |||
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 | |||
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 | |||
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 |
||
143 | |||
144 | SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM) |
||
145 | |||
146 | IRQ_PIC equ 0 |
||
147 | IRQ_APIC equ 1 |
||
148 | |||
2381 | hidnplayr | 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 |
||
2288 | clevermous | 181 | |
3627 | Serge | 182 | PARTITION_COUNT equ 64 |
183 | DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100) |
||
184 | |||
2288 | clevermous | 185 | OS_BASE equ 0x80000000 |
186 | |||
187 | window_data equ (OS_BASE+0x0001000) |
||
188 | |||
189 | CURRENT_TASK equ (OS_BASE+0x0003000) |
||
190 | TASK_COUNT equ (OS_BASE+0x0003004) |
||
191 | TASK_BASE equ (OS_BASE+0x0003010) |
||
192 | TASK_DATA equ (OS_BASE+0x0003020) |
||
193 | TASK_EVENT equ (OS_BASE+0x0003020) |
||
194 | |||
195 | CDDataBuf equ (OS_BASE+0x0007000) |
||
196 | FLOPPY_BUFF equ (OS_BASE+0x0008000) |
||
197 | idts equ (OS_BASE+0x000B100) |
||
198 | WIN_STACK equ (OS_BASE+0x000C000) |
||
199 | WIN_POS equ (OS_BASE+0x000C400) |
||
200 | FDD_BUFF equ (OS_BASE+0x000D000) |
||
201 | |||
202 | WIN_TEMP_XY equ (OS_BASE+0x000F300) |
||
203 | KEY_COUNT equ (OS_BASE+0x000F400) |
||
204 | KEY_BUFF equ (OS_BASE+0x000F401) |
||
205 | |||
206 | BTN_COUNT equ (OS_BASE+0x000F500) |
||
207 | BTN_BUFF equ (OS_BASE+0x000F501) |
||
208 | |||
209 | |||
210 | BTN_ADDR equ (OS_BASE+0x000FE88) |
||
211 | MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
||
212 | |||
213 | SYS_SHUTDOWN equ (OS_BASE+0x000FF00) |
||
214 | TASK_ACTIVATE equ (OS_BASE+0x000FF01) |
||
215 | |||
2513 | mario79 | 216 | |
2288 | clevermous | 217 | TMP_STACK_TOP equ 0x006CC00 |
218 | |||
219 | sys_pgdir equ (OS_BASE+0x006F000) |
||
220 | |||
221 | SLOT_BASE equ (OS_BASE+0x0080000) |
||
222 | |||
223 | VGABasePtr equ (OS_BASE+0x00A0000) |
||
224 | |||
225 | RAMDISK equ (OS_BASE+0x0100000) |
||
226 | RAMDISK_FAT equ (OS_BASE+0x0280000) |
||
227 | FLOPPY_FAT equ (OS_BASE+0x0282000) |
||
228 | |||
229 | CLEAN_ZONE equ 0x284000 |
||
230 | IDE_DMA equ 0x284000 |
||
231 | |||
232 | BgrAuxTable equ (OS_BASE+0x0298000) |
||
233 | ; unused? |
||
234 | SB16Buffer equ (OS_BASE+0x02A0000) |
||
235 | SB16_Status equ (OS_BASE+0x02B0000) |
||
236 | |||
2525 | mario79 | 237 | BUTTON_INFO equ (OS_BASE+0x02B3FEE) |
2485 | mario79 | 238 | |
239 | BPSLine_calc_area equ (OS_BASE+0x02C4000) |
||
240 | d_width_calc_area equ (OS_BASE+0x02CA000) |
||
241 | |||
2288 | clevermous | 242 | RESERVED_PORTS equ (OS_BASE+0x02D0000) |
243 | BOOT_VAR equ (OS_BASE+0x02E0000) |
||
244 | |||
245 | draw_data equ (OS_BASE+0x0320000) |
||
246 | |||
247 | sys_pgmap equ (OS_BASE+0x0324000) |
||
248 | |||
249 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
||
250 | |||
251 | virtual at (OS_BASE+0x05FFF80) |
||
252 | tss TSS |
||
253 | end virtual |
||
254 | |||
255 | HEAP_BASE equ (OS_BASE+0x0800000) |
||
256 | HEAP_MIN_SIZE equ 0x01000000 |
||
257 | |||
258 | page_tabs equ 0xFDC00000 |
||
259 | app_page_tabs equ 0xFDC00000 |
||
260 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
||
261 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
||
262 | |||
263 | LFB_BASE equ 0xFE000000 |
||
264 | |||
265 | |||
266 | new_app_base equ 0; |
||
267 | |||
268 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
||
269 | |||
270 | std_application_base_address equ new_app_base |
||
3539 | clevermous | 271 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 байт для контекста FPU |
2288 | clevermous | 272 | |
273 | REG_SS equ (RING0_STACK_SIZE-4) |
||
274 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
||
275 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
||
276 | REG_CS equ (RING0_STACK_SIZE-16) |
||
277 | REG_EIP equ (RING0_STACK_SIZE-20) |
||
278 | REG_EAX equ (RING0_STACK_SIZE-24) |
||
279 | REG_ECX equ (RING0_STACK_SIZE-28) |
||
280 | REG_EDX equ (RING0_STACK_SIZE-32) |
||
281 | REG_EBX equ (RING0_STACK_SIZE-36) |
||
282 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
||
283 | REG_EBP equ (RING0_STACK_SIZE-44) |
||
284 | REG_ESI equ (RING0_STACK_SIZE-48) |
||
285 | REG_EDI equ (RING0_STACK_SIZE-52) |
||
286 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
||
287 | |||
288 | |||
289 | PG_UNMAP equ 0x000 |
||
290 | PG_MAP equ 0x001 |
||
291 | PG_WRITE equ 0x002 |
||
292 | PG_SW equ 0x003 |
||
293 | PG_USER equ 0x005 |
||
294 | PG_UW equ 0x007 |
||
295 | PG_NOCACHE equ 0x018 |
||
296 | PG_LARGE equ 0x080 |
||
297 | PG_GLOBAL equ 0x100 |
||
298 | |||
299 | PG_SHARED equ 0x200 |
||
300 | |||
301 | ;;;;;;;;;;;boot time variables |
||
302 | |||
2466 | Serge | 303 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
304 | BOOT_PITCH equ 0x9001 ;word scanline length |
||
2288 | clevermous | 305 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
2466 | Serge | 306 | BOOT_X_RES equ 0x900A ;word X res |
307 | BOOT_Y_RES equ 0x900C ;word Y res |
||
2288 | clevermous | 308 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
309 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
||
310 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
||
311 | BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
||
2466 | Serge | 312 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
313 | BOOT_DMA equ 0x901F ; |
||
2288 | clevermous | 314 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
315 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
||
316 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
||
317 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
||
318 | |||
2466 | Serge | 319 | BOOT_APM_ENTRY equ 0x9040 |
320 | BOOT_APM_VERSION equ 0x9044 |
||
321 | BOOT_APM_FLAGS equ 0x9046 ;unused |
||
322 | BOOT_APM_CODE_32 equ 0x9050 |
||
323 | BOOT_APM_CODE_16 equ 0x9052 |
||
324 | BOOT_APM_DATA_16 equ 0x9054 |
||
325 | |||
2288 | clevermous | 326 | TMP_FILE_NAME equ 0 |
327 | TMP_CMD_LINE equ 1024 |
||
328 | TMP_ICON_OFFS equ 1280 |
||
329 | |||
330 | |||
331 | EVENT_REDRAW equ 0x00000001 |
||
332 | EVENT_KEY equ 0x00000002 |
||
333 | EVENT_BUTTON equ 0x00000004 |
||
334 | EVENT_BACKGROUND equ 0x00000010 |
||
335 | EVENT_MOUSE equ 0x00000020 |
||
336 | EVENT_IPC equ 0x00000040 |
||
337 | EVENT_NETWORK equ 0x00000080 |
||
338 | EVENT_DEBUG equ 0x00000100 |
||
3545 | hidnplayr | 339 | EVENT_NETWORK2 equ 0x00000200 |
340 | EVENT_EXTENDED equ 0x00000400 |
||
2288 | clevermous | 341 | |
342 | EV_INTR equ 1 |
||
343 | |||
2384 | hidnplayr | 344 | struct THR_DATA |
345 | rb (8192-512) |
||
346 | ; pl0_stack |
||
347 | fpu_state rb 512 |
||
348 | tls_page rb 4096 |
||
349 | pdbr rb 4096 |
||
350 | ends |
||
2288 | clevermous | 351 | |
2384 | hidnplayr | 352 | virtual at (OS_BASE-sizeof.THR_DATA) |
2288 | clevermous | 353 | thr_data THR_DATA |
354 | end virtual |
||
355 | |||
2384 | hidnplayr | 356 | struct SYS_VARS |
357 | bpp dd ? |
||
358 | scanline dd ? |
||
359 | vesa_mode dd ? |
||
360 | x_res dd ? |
||
361 | y_res dd ? |
||
362 | ends |
||
2288 | clevermous | 363 | |
2384 | hidnplayr | 364 | struct APPOBJ ; common object header |
365 | magic dd ? ; |
||
366 | destroy dd ? ; internal destructor |
||
367 | fd dd ? ; next object in list |
||
368 | bk dd ? ; prev object in list |
||
369 | pid dd ? ; owner id |
||
370 | ends |
||
2288 | clevermous | 371 | |
372 | APP_OBJ_OFFSET equ 48 |
||
373 | APP_EV_OFFSET equ 40 |
||
374 | |||
2384 | hidnplayr | 375 | struct CURSOR APPOBJ |
376 | base dd ? ;allocated memory |
||
377 | hot_x dd ? ;hotspot coords |
||
378 | hot_y dd ? |
||
2288 | clevermous | 379 | |
2384 | hidnplayr | 380 | list_next dd ? ;next cursor in cursor list |
381 | list_prev dd ? ;prev cursor in cursor list |
||
382 | dev_obj dd ? ;device depended data |
||
383 | ends |
||
2288 | clevermous | 384 | |
385 | |||
2384 | hidnplayr | 386 | struct EVENT APPOBJ |
387 | id dd ? ;event uid |
||
388 | state dd ? ;internal flags |
||
389 | code dd ? |
||
390 | rd 5 |
||
391 | ends |
||
2288 | clevermous | 392 | |
393 | |||
2384 | hidnplayr | 394 | struct SMEM |
395 | bk dd ? |
||
396 | fd dd ? ;+4 |
||
397 | base dd ? ;+8 |
||
398 | size dd ? ;+12 |
||
399 | access dd ? ;+16 |
||
400 | refcount dd ? ;+20 |
||
401 | name rb 32 ;+24 |
||
402 | ends |
||
2288 | clevermous | 403 | |
2384 | hidnplayr | 404 | struct SMAP APPOBJ |
405 | base dd ? ;mapped base |
||
406 | parent dd ? ;SMEM |
||
407 | ends |
||
2288 | clevermous | 408 | |
2384 | hidnplayr | 409 | struct DLLDESCR |
410 | bk dd ? |
||
411 | fd dd ? ;+4 |
||
412 | data dd ? ;+8 |
||
413 | size dd ? ;+12 |
||
414 | timestamp dq ? |
||
415 | refcount dd ? |
||
416 | defaultbase dd ? |
||
417 | coff_hdr dd ? |
||
418 | symbols_ptr dd ? |
||
419 | symbols_num dd ? |
||
420 | symbols_lim dd ? |
||
421 | exports dd ? ;export table |
||
422 | name rb 260 |
||
423 | ends |
||
2288 | clevermous | 424 | |
2384 | hidnplayr | 425 | struct HDLL |
426 | fd dd ? ;next object in list |
||
427 | bk dd ? ;prev object in list |
||
428 | pid dd ? ;owner id |
||
2288 | clevermous | 429 | |
2384 | hidnplayr | 430 | base dd ? ;mapped base |
431 | size dd ? ;mapped size |
||
432 | refcount dd ? ;reference counter for this process and this lib |
||
433 | parent dd ? ;DLLDESCR |
||
434 | ends |
||
2288 | clevermous | 435 | |
2384 | hidnplayr | 436 | struct display_t |
437 | x dd ? |
||
438 | y dd ? |
||
439 | width dd ? |
||
440 | height dd ? |
||
441 | bpp dd ? |
||
442 | vrefresh dd ? |
||
443 | pitch dd ? |
||
444 | lfb dd ? |
||
2288 | clevermous | 445 | |
2384 | hidnplayr | 446 | modes dd ? |
447 | ddev dd ? |
||
448 | connector dd ? |
||
449 | crtc dd ? |
||
2288 | clevermous | 450 | |
2384 | hidnplayr | 451 | cr_list.next dd ? |
452 | cr_list.prev dd ? |
||
2288 | clevermous | 453 | |
2384 | hidnplayr | 454 | cursor dd ? |
2288 | clevermous | 455 | |
2384 | hidnplayr | 456 | init_cursor dd ? |
457 | select_cursor dd ? |
||
458 | show_cursor dd ? |
||
459 | move_cursor dd ? |
||
460 | restore_cursor dd ? |
||
2445 | Serge | 461 | disable_mouse dd ? |
2414 | Serge | 462 | mask_seqno dd ? |
2430 | mario79 | 463 | check_mouse dd ? |
464 | check_m_pixel dd ? |
||
2384 | hidnplayr | 465 | ends |
2288 | clevermous | 466 | |
2384 | hidnplayr | 467 | struct BOOT_DATA |
468 | bpp dd ? |
||
469 | scanline dd ? |
||
470 | vesa_mode dd ? |
||
471 | x_res dd ? |
||
472 | y_res dd ? |
||
473 | mouse_port dd ? |
||
474 | bank_switch dd ? |
||
475 | lfb dd ? |
||
476 | vesa_mem dd ? |
||
477 | log dd ? |
||
478 | direct_lfb dd ? |
||
479 | pci_data dd ? |
||
480 | dd ? |
||
481 | vrr dd ? |
||
482 | ide_base dd ? |
||
483 | mem_amount dd ? |
||
484 | pages_count dd ? |
||
485 | pagemap_size dd ? |
||
486 | kernel_max dd ? |
||
487 | kernel_pages dd ? |
||
488 | kernel_tables dd ? |
||
2288 | clevermous | 489 | |
2384 | hidnplayr | 490 | cpu_vendor dd ? |
491 | dd ? |
||
492 | dd ? |
||
493 | cpu_sign dd ? |
||
494 | cpu_info dd ? |
||
495 | cpu_caps dd ? |
||
496 | dd ? |
||
497 | dd ? |
||
498 | ends |
||
2288 | clevermous | 499 | |
2384 | hidnplayr | 500 | struct LHEAD |
501 | next dd ? ;next object in list |
||
502 | prev dd ? ;prev object in list |
||
503 | ends |
||
2288 | clevermous | 504 | |
2384 | hidnplayr | 505 | struct MUTEX |
506 | lhead LHEAD |
||
507 | count dd ? |
||
508 | ends |
||
2288 | clevermous | 509 | |
3393 | clevermous | 510 | struct PCIDEV |
511 | bk dd ? |
||
512 | fd dd ? |
||
513 | vendor_device_id dd ? |
||
514 | class dd ? |
||
515 | devfn db ? |
||
516 | bus db ? |
||
517 | ends |
||
518 | |||
3395 | clevermous | 519 | ; The following macro assume that we are on uniprocessor machine. |
520 | ; Serious work is needed for multiprocessor machines. |
||
521 | macro spin_lock_irqsave spinlock |
||
522 | { |
||
523 | pushf |
||
524 | cli |
||
525 | } |
||
526 | macro spin_unlock_irqrestore spinlock |
||
527 | { |
||
528 | popf |
||
529 | } |
||
530 | macro spin_lock_irq spinlock |
||
531 | { |
||
532 | cli |
||
533 | } |
||
534 | macro spin_unlock_irq spinlock |
||
535 | { |
||
536 | sti |
||
537 | } |
||
538 | |||
2384 | hidnplayr | 539 | struct MEM_STATE |
540 | mutex MUTEX |
||
541 | smallmap dd ? |
||
542 | treemap dd ? |
||
543 | topsize dd ? |
||
544 | top dd ? |
||
545 | smallbins rd 4*32 |
||
546 | treebins rd 32 |
||
547 | ends |
||
2288 | clevermous | 548 | |
2384 | hidnplayr | 549 | struct PG_DATA |
550 | mem_amount dd ? |
||
551 | vesa_mem dd ? |
||
552 | pages_count dd ? |
||
553 | pages_free dd ? |
||
554 | pages_faults dd ? |
||
555 | pagemap_size dd ? |
||
556 | kernel_pages dd ? |
||
557 | kernel_tables dd ? |
||
558 | sys_page_dir dd ? |
||
559 | mutex MUTEX |
||
560 | ends |
||
2288 | clevermous | 561 | |
2384 | hidnplayr | 562 | struct SRV |
563 | srv_name rb 16 ;ASCIIZ string |
||
564 | magic dd ? ;+0x10 ;'SRV ' |
||
565 | size dd ? ;+0x14 ;size of structure SRV |
||
566 | fd dd ? ;+0x18 ;next SRV descriptor |
||
567 | bk dd ? ;+0x1C ;prev SRV descriptor |
||
568 | base dd ? ;+0x20 ;service base address |
||
569 | entry dd ? ;+0x24 ;service START function |
||
570 | srv_proc dd ? ;+0x28 ;user mode service handler |
||
571 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
||
572 | ends |
||
2288 | clevermous | 573 | |
3520 | clevermous | 574 | struct USBSRV |
575 | srv SRV |
||
576 | usb_func dd ? |
||
577 | ends |
||
578 | |||
579 | struct USBFUNC |
||
580 | strucsize dd ? |
||
581 | add_device dd ? |
||
582 | device_disconnect dd ? |
||
583 | ends |
||
584 | |||
2288 | clevermous | 585 | DRV_ENTRY equ 1 |
586 | DRV_EXIT equ -1 |
||
587 | |||
2384 | hidnplayr | 588 | struct COFF_HEADER |
589 | machine dw ? |
||
590 | nSections dw ? |
||
591 | DataTime dd ? |
||
592 | pSymTable dd ? |
||
593 | nSymbols dd ? |
||
594 | optHeader dw ? |
||
595 | flags dw ? |
||
596 | ends |
||
2288 | clevermous | 597 | |
2384 | hidnplayr | 598 | struct COFF_SECTION |
599 | Name rb 8 |
||
600 | VirtualSize dd ? |
||
601 | VirtualAddress dd ? |
||
602 | SizeOfRawData dd ? |
||
603 | PtrRawData dd ? |
||
604 | PtrReloc dd ? |
||
605 | PtrLinenumbers dd ? |
||
606 | NumReloc dw ? |
||
607 | NumLinenum dw ? |
||
608 | Characteristics dd ? |
||
609 | ends |
||
2288 | clevermous | 610 | |
2384 | hidnplayr | 611 | struct COFF_RELOC |
612 | VirtualAddress dd ? |
||
613 | SymIndex dd ? |
||
614 | Type dw ? |
||
615 | ends |
||
2288 | clevermous | 616 | |
2384 | hidnplayr | 617 | struct COFF_SYM |
618 | Name rb 8 |
||
619 | Value dd ? |
||
620 | SectionNumber dw ? |
||
621 | Type dw ? |
||
622 | StorageClass db ? |
||
623 | NumAuxSymbols db ? |
||
624 | ends |
||
2288 | clevermous | 625 | |
2384 | hidnplayr | 626 | struct IOCTL |
627 | handle dd ? |
||
628 | io_code dd ? |
||
629 | input dd ? |
||
630 | inp_size dd ? |
||
631 | output dd ? |
||
632 | out_size dd ? |
||
633 | ends |
||
2288 | clevermous | 634 | |
2384 | hidnplayr | 635 | struct IRQH |
636 | list LHEAD |
||
637 | handler dd ? ;handler roututine |
||
638 | data dd ? ;user-specific data |
||
3506 | clevermous | 639 | num_ints dd ? ;how many times handled |
2414 | Serge | 640 | ends |