Subversion Repositories Kolibri OS

Rev

Rev 2385 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
431 serge 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2540 hidnplayr 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
 
2540 hidnplayr 8
$Revision $
593 mikedld 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
 
2382 hidnplayr 146
IRQ_PIC        equ    0
147
IRQ_APIC       equ    1
164 serge 148
 
2382 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
2540 hidnplayr 179
        _io_map_1   rb 4096
180
ends
164 serge 181
 
2540 hidnplayr 182
OS_BASE             equ 0x80000000
183
 
184
window_data         equ (OS_BASE+0x0001000)
185
 
380 serge 186
CURRENT_TASK        equ (OS_BASE+0x0003000)
187
TASK_COUNT          equ (OS_BASE+0x0003004)
188
TASK_BASE           equ (OS_BASE+0x0003010)
189
TASK_DATA           equ (OS_BASE+0x0003020)
190
TASK_EVENT          equ (OS_BASE+0x0003020)
164 serge 191
 
380 serge 192
mouseunder          equ (OS_BASE+0x0006900)
533 diamond 193
CDDataBuf           equ (OS_BASE+0x0007000)
380 serge 194
FLOPPY_BUFF         equ (OS_BASE+0x0008000)
381 serge 195
ACTIVE_PROC_STACK   equ (OS_BASE+0x000A400) ;unused
380 serge 196
idts                equ (OS_BASE+0x000B100)
197
WIN_STACK           equ (OS_BASE+0x000C000)
198
WIN_POS             equ (OS_BASE+0x000C400)
199
FDD_BUFF            equ (OS_BASE+0x000D000)
164 serge 200
 
381 serge 201
;unused ? only one reference
380 serge 202
ENABLE_TASKSWITCH   equ (OS_BASE+0x000E000)
381 serge 203
 
380 serge 204
PUTPIXEL            equ (OS_BASE+0x000E020)
205
GETPIXEL            equ (OS_BASE+0x000E024)
381 serge 206
 
207
;unused ? only one reference
380 serge 208
BANK_SWITCH         equ (OS_BASE+0x000E030)
164 serge 209
 
381 serge 210
;unused ? store mousepointer
380 serge 211
MOUSE_PICTURE       equ (OS_BASE+0x000F200)
381 serge 212
 
2540 hidnplayr 213
;MOUSE_VISIBLE       equ (OS_BASE+0x000F204)
381 serge 214
WIN_TEMP_XY         equ (OS_BASE+0x000F300)
380 serge 215
KEY_COUNT           equ (OS_BASE+0x000F400)
216
KEY_BUFF            equ (OS_BASE+0x000F401)
164 serge 217
 
380 serge 218
BTN_COUNT           equ (OS_BASE+0x000F500)
219
BTN_BUFF            equ (OS_BASE+0x000F501)
164 serge 220
 
380 serge 221
CPU_FREQ            equ (OS_BASE+0x000F600)
381 serge 222
 
223
;unused ? no active references
380 serge 224
MOUSE_PORT          equ (OS_BASE+0x000F604)
164 serge 225
 
381 serge 226
;unused
380 serge 227
PS2_CHUNK           equ (OS_BASE+0x000FB00)
381 serge 228
 
479 kastigar 229
MOUSE_SCROLL_H      equ (OS_BASE+0x000FB08)
380 serge 230
MOUSE_X             equ (OS_BASE+0x000FB0A)
231
MOUSE_Y             equ (OS_BASE+0x000FB0C)
479 kastigar 232
MOUSE_SCROLL_V      equ (OS_BASE+0x000FB0E)
164 serge 233
 
380 serge 234
MOUSE_COLOR_MEM     equ (OS_BASE+0x000FB10)
235
COLOR_TEMP          equ (OS_BASE+0x000FB30)
236
BTN_DOWN            equ (OS_BASE+0x000FB40)
237
MOUSE_DOWN          equ (OS_BASE+0x000FB44)
238
X_UNDER             equ (OS_BASE+0x000FB4A)
239
Y_UNDER             equ (OS_BASE+0x000FB4C)
240
ScreenBPP           equ (OS_BASE+0x000FBF1)
381 serge 241
 
242
;unused ? only one reference
380 serge 243
MOUSE_BUFF_COUNT    equ (OS_BASE+0x000FCFF)
381 serge 244
 
753 serge 245
Screen_Max_X        equ (OS_BASE+0x000FE00)
246
Screen_Max_Y        equ (OS_BASE+0x000FE04)
381 serge 247
BytesPerScanLine    equ (OS_BASE+0x000FE08)
380 serge 248
SCR_MODE            equ (OS_BASE+0x000FE0C)
164 serge 249
 
2382 hidnplayr 250
LFBAddress          equ (OS_BASE+0x000FE80)
380 serge 251
BTN_ADDR            equ (OS_BASE+0x000FE88)
2382 hidnplayr 252
MEM_AMOUNT          equ (OS_BASE+0x000FE8C)
253
 
380 serge 254
SYS_SHUTDOWN        equ (OS_BASE+0x000FF00)
255
TASK_ACTIVATE       equ (OS_BASE+0x000FF01)
164 serge 256
 
380 serge 257
REDRAW_BACKGROUND   equ (OS_BASE+0x000FFF0)
2540 hidnplayr 258
 
380 serge 259
BANK_RW             equ (OS_BASE+0x000FFF2)
260
MOUSE_BACKGROUND    equ (OS_BASE+0x000FFF4)
261
DONT_DRAW_MOUSE     equ (OS_BASE+0x000FFF5)
262
DONT_SWITCH         equ (OS_BASE+0x000FFFF)
164 serge 263
 
516 serge 264
TMP_STACK_TOP       equ 0x006CC00
164 serge 265
 
516 serge 266
FONT_II             equ (OS_BASE+0x006DC00)
267
FONT_I              equ (OS_BASE+0x006E600)
513 serge 268
 
516 serge 269
sys_pgdir           equ (OS_BASE+0x006F000)
513 serge 270
 
516 serge 271
DRIVE_DATA          equ (OS_BASE+0x0070000)
272
 
380 serge 273
SLOT_BASE           equ (OS_BASE+0x0080000)
381 serge 274
 
275
;unused
380 serge 276
TMP_BUFF            equ (OS_BASE+0x0090000)
164 serge 277
 
380 serge 278
VGABasePtr          equ (OS_BASE+0x00A0000)
164 serge 279
 
380 serge 280
RAMDISK             equ (OS_BASE+0x0100000)
281
RAMDISK_FAT         equ (OS_BASE+0x0280000)
282
FLOPPY_FAT          equ (OS_BASE+0x0282000)
381 serge 283
 
2382 hidnplayr 284
CLEAN_ZONE          equ 0x284000
581 serge 285
IDE_DMA             equ 0x284000
286
 
555 diamond 287
BgrAuxTable         equ (OS_BASE+0x0298000)
381 serge 288
; unused?
2382 hidnplayr 289
SB16Buffer          equ (OS_BASE+0x02A0000)
380 serge 290
SB16_Status         equ (OS_BASE+0x02B0000)
381 serge 291
 
2540 hidnplayr 292
BUTTON_INFO         equ (OS_BASE+0x02B3FEE)
293
 
294
BPSLine_calc_area   equ (OS_BASE+0x02C4000)
295
d_width_calc_area   equ (OS_BASE+0x02CA000)
296
 
380 serge 297
RESERVED_PORTS      equ (OS_BASE+0x02D0000)
2382 hidnplayr 298
BOOT_VAR            equ (OS_BASE+0x02E0000)
381 serge 299
 
2382 hidnplayr 300
stack_data_start    equ (OS_BASE+0x02F0000)
301
eth_data_start      equ (OS_BASE+0x02F0000)
302
stack_data          equ (OS_BASE+0x02F4000)
303
stack_data_end      equ (OS_BASE+0x030ffff)
304
resendQ             equ (OS_BASE+0x0310000)
381 serge 305
 
2382 hidnplayr 306
skin_data           equ (OS_BASE+0x0318000)
307
draw_data           equ (OS_BASE+0x0320000)
164 serge 308
 
2382 hidnplayr 309
BgrDrawMode         equ (OS_BASE+0x0323FF4)
310
BgrDataWidth        equ (OS_BASE+0x0323FF8)
311
BgrDataHeight       equ (OS_BASE+0x0323FFC)
1310 diamond 312
 
2382 hidnplayr 313
sys_pgmap           equ (OS_BASE+0x0324000)
314
 
315
UPPER_KERNEL_PAGES  equ (OS_BASE+0x0400000)
316
 
1310 diamond 317
virtual at              (OS_BASE+0x05FFF80)
465 serge 318
  tss  TSS
319
end virtual
164 serge 320
 
513 serge 321
HEAP_BASE           equ (OS_BASE+0x0800000)
465 serge 322
HEAP_MIN_SIZE       equ 0x01000000
164 serge 323
 
465 serge 324
page_tabs           equ 0xFDC00000
325
app_page_tabs       equ 0xFDC00000
326
kernel_tabs         equ (page_tabs+ (OS_BASE shr 10))   ;0xFDE00000
327
master_tab          equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000
164 serge 328
 
465 serge 329
LFB_BASE            equ 0xFE000000
164 serge 330
 
331
 
465 serge 332
new_app_base        equ 0;
378 serge 333
 
1172 diamond 334
twdw                equ 0x2000   ;(CURRENT_TASK-window_data)
164 serge 335
 
336
std_application_base_address   equ new_app_base
465 serge 337
RING0_STACK_SIZE    equ (0x2000 - 512)    ;512 áàéò äëÿ êîíòåêñòà FPU
164 serge 338
 
465 serge 339
REG_SS              equ (RING0_STACK_SIZE-4)
340
REG_APP_ESP         equ (RING0_STACK_SIZE-8)
341
REG_EFLAGS          equ (RING0_STACK_SIZE-12)
342
REG_CS              equ (RING0_STACK_SIZE-16)
343
REG_EIP             equ (RING0_STACK_SIZE-20)
344
REG_EAX             equ (RING0_STACK_SIZE-24)
345
REG_ECX             equ (RING0_STACK_SIZE-28)
346
REG_EDX             equ (RING0_STACK_SIZE-32)
347
REG_EBX             equ (RING0_STACK_SIZE-36)
348
REG_ESP             equ (RING0_STACK_SIZE-40)  ;RING0_STACK_SIZE-20
349
REG_EBP             equ (RING0_STACK_SIZE-44)
350
REG_ESI             equ (RING0_STACK_SIZE-48)
351
REG_EDI             equ (RING0_STACK_SIZE-52)
352
REG_RET             equ (RING0_STACK_SIZE-56)  ;irq0.return
353
 
354
 
188 serge 355
PG_UNMAP            equ 0x000
356
PG_MAP              equ 0x001
357
PG_WRITE            equ 0x002
358
PG_SW               equ 0x003
359
PG_USER             equ 0x005
360
PG_UW               equ 0x007
361
PG_NOCACHE          equ 0x018
362
PG_LARGE            equ 0x080
363
PG_GLOBAL           equ 0x100
164 serge 364
 
940 serge 365
PG_SHARED           equ 0x200
366
 
164 serge 367
;;;;;;;;;;;boot time variables
368
 
2540 hidnplayr 369
BOOT_BPP            equ 0x9000    ;byte   bits per pixel
370
BOOT_PITCH          equ 0x9001    ;word   scanline length
164 serge 371
BOOT_VESA_MODE      equ 0x9008    ;word   vesa video mode
2540 hidnplayr 372
BOOT_X_RES          equ 0x900A    ;word   X res
373
BOOT_Y_RES          equ 0x900C    ;word   Y res
164 serge 374
;;BOOT_MOUSE_PORT     equ 0x9010    ;byte   mouse port  - not used
375
BOOT_BANK_SW        equ 0x9014    ;dword  Vesa 1.2 pm bank switch
376
BOOT_LFB            equ 0x9018    ;dword  Vesa 2.0 LFB address
377
BOOT_MTRR           equ 0x901C    ;byte   0 or 1 : enable MTRR graphics acceleration
378
BOOT_LOG            equ 0x901D    ;byte   not used anymore (0 or 1 : enable system log display)
2540 hidnplayr 379
;BOOT_DIRECT_LFB     equ 0x901E    ;byte   0 or 1 : enable direct lfb write, paging disabled
380
BOOT_DMA            equ 0x901F    ;
164 serge 381
BOOT_PCI_DATA       equ 0x9020    ;8bytes pci data
382
BOOT_VRR            equ 0x9030    ;byte   VRR start enabled 1, 2-no
383
BOOT_IDE_BASE_ADDR  equ 0x9031   ;word   IDEContrRegsBaseAddr
384
BOOT_MEM_AMOUNT     equ 0x9034    ;dword  memory amount
385
 
2540 hidnplayr 386
BOOT_APM_ENTRY      equ 0x9040
387
BOOT_APM_VERSION    equ 0x9044
388
BOOT_APM_FLAGS      equ 0x9046    ;unused
389
BOOT_APM_CODE_32    equ 0x9050
390
BOOT_APM_CODE_16    equ 0x9052
391
BOOT_APM_DATA_16    equ 0x9054
392
 
164 serge 393
TMP_FILE_NAME       equ     0
394
TMP_CMD_LINE        equ  1024
395
TMP_ICON_OFFS       equ  1280
396
 
397
 
398
EVENT_REDRAW       equ 0x00000001
399
EVENT_KEY          equ 0x00000002
400
EVENT_BUTTON       equ 0x00000004
401
EVENT_BACKGROUND   equ 0x00000010
402
EVENT_MOUSE        equ 0x00000020
403
EVENT_IPC          equ 0x00000040
404
EVENT_NETWORK      equ 0x00000080
405
EVENT_DEBUG        equ 0x00000100
227 serge 406
EVENT_EXTENDED     equ 0x00000200
2540 hidnplayr 407
 
408
EV_INTR            equ 1
409
 
410
struct  THR_DATA
411
                        rb (8192-512)
412
;       pl0_stack
413
        fpu_state       rb 512
414
        tls_page        rb 4096
415
        pdbr            rb 4096
416
ends
417
 
418
virtual at (OS_BASE-sizeof.THR_DATA)
419
  thr_data  THR_DATA
420
end virtual
421
 
422
struct  SYS_VARS
423
        bpp             dd ?
424
        scanline        dd ?
425
        vesa_mode       dd ?
426
        x_res           dd ?
427
        y_res           dd ?
428
ends
429
 
430
struct  APPOBJ                  ; common object header
431
        magic           dd ?    ;
432
        destroy         dd ?    ; internal destructor
433
        fd              dd ?    ; next object in list
434
        bk              dd ?    ; prev object in list
435
        pid             dd ?    ; owner id
436
ends
437
 
438
APP_OBJ_OFFSET  equ 48
439
APP_EV_OFFSET   equ 40
440
 
441
struct  CURSOR          APPOBJ
442
        base            dd ?   ;allocated memory
443
        hot_x           dd ?   ;hotspot coords
444
        hot_y           dd ?
445
 
446
        list_next       dd ?   ;next cursor in cursor list
447
        list_prev       dd ?   ;prev cursor in cursor list
448
        dev_obj         dd ?   ;device depended data
449
ends
450
 
451
 
452
struct  EVENT           APPOBJ
453
        id              dd ?   ;event uid
454
        state           dd ?   ;internal flags
455
        code            dd ?
456
                        rd 5
457
ends
458
 
459
 
460
struct  SMEM
461
        bk              dd ?
462
        fd              dd ?    ;+4
463
        base            dd ?    ;+8
464
        size            dd ?    ;+12
465
        access          dd ?    ;+16
466
        refcount        dd ?    ;+20
467
        name            rb 32   ;+24
468
ends
469
 
470
struct  SMAP            APPOBJ
471
        base            dd ?   ;mapped base
472
        parent          dd ?   ;SMEM
473
ends
474
 
475
struct  DLLDESCR
476
        bk              dd ?
477
        fd              dd ?    ;+4
478
        data            dd ?    ;+8
479
        size            dd ?    ;+12
480
        timestamp       dq ?
481
        refcount        dd ?
482
        defaultbase     dd ?
483
        coff_hdr        dd ?
484
        symbols_ptr     dd ?
485
        symbols_num     dd ?
486
        symbols_lim     dd ?
487
        exports         dd ?   ;export table
488
        name            rb 260
489
ends
490
 
491
struct  HDLL
492
        fd              dd ?   ;next object in list
493
        bk              dd ?   ;prev object in list
494
        pid             dd ?   ;owner id
495
 
496
        base            dd ?   ;mapped base
497
        size            dd ?   ;mapped size
498
        refcount        dd ?   ;reference counter for this process and this lib
499
        parent          dd ?   ;DLLDESCR
500
ends
501
 
502
struct  display_t
503
        x               dd ?
504
        y               dd ?
505
        width           dd ?
506
        height          dd ?
507
        bpp             dd ?
508
        vrefresh        dd ?
509
        pitch           dd ?
510
        lfb             dd ?
511
 
512
        modes           dd ?
513
        ddev            dd ?
514
        connector       dd ?
515
        crtc            dd ?
516
 
517
        cr_list.next    dd ?
518
        cr_list.prev    dd ?
519
 
520
        cursor          dd ?
521
 
522
        init_cursor     dd ?
523
        select_cursor   dd ?
524
        show_cursor     dd ?
525
        move_cursor     dd ?
526
        restore_cursor  dd ?
527
        disable_mouse   dd ?
528
        mask_seqno      dd ?
529
        check_mouse     dd ?
530
        check_m_pixel   dd ?
531
ends
532
 
533
struct  BOOT_DATA
534
        bpp             dd ?
535
        scanline        dd ?
536
        vesa_mode       dd ?
537
        x_res           dd ?
538
        y_res           dd ?
539
        mouse_port      dd ?
540
        bank_switch     dd ?
541
        lfb             dd ?
542
        vesa_mem        dd ?
543
        log             dd ?
544
        direct_lfb      dd ?
545
        pci_data        dd ?
546
                        dd ?
547
        vrr             dd ?
548
        ide_base        dd ?
549
        mem_amount      dd ?
550
        pages_count     dd ?
551
        pagemap_size    dd ?
552
        kernel_max      dd ?
553
        kernel_pages    dd ?
554
        kernel_tables   dd ?
555
 
556
        cpu_vendor      dd ?
557
                        dd ?
558
                        dd ?
559
        cpu_sign        dd ?
560
        cpu_info        dd ?
561
        cpu_caps        dd ?
562
                        dd ?
563
                        dd ?
564
ends
565
 
566
struct  LHEAD
567
        next            dd ?   ;next object in list
568
        prev            dd ?   ;prev object in list
569
ends
570
 
571
struct  MUTEX
572
        lhead   LHEAD
573
        count   dd ?
574
ends
575
 
576
struct  MEM_STATE
577
        mutex           MUTEX
578
        smallmap        dd ?
579
        treemap         dd ?
580
        topsize         dd ?
581
        top             dd ?
582
        smallbins       rd 4*32
583
        treebins        rd 32
584
ends
585
 
586
struct  PG_DATA
587
        mem_amount      dd ?
588
        vesa_mem        dd ?
589
        pages_count     dd ?
590
        pages_free      dd ?
591
        pages_faults    dd ?
592
        pagemap_size    dd ?
593
        kernel_pages    dd ?
594
        kernel_tables   dd ?
595
        sys_page_dir    dd ?
596
        mutex           MUTEX
597
ends
598
 
599
struct  SRV
600
        srv_name        rb 16    ;ASCIIZ string
601
        magic           dd ?     ;+0x10 ;'SRV '
602
        size            dd ?     ;+0x14 ;size of structure SRV
603
        fd              dd ?     ;+0x18 ;next SRV descriptor
604
        bk              dd ?     ;+0x1C ;prev SRV descriptor
605
        base            dd ?     ;+0x20 ;service base address
606
        entry           dd ?     ;+0x24 ;service START function
607
        srv_proc        dd ?     ;+0x28 ;user mode service handler
608
        srv_proc_ex     dd ?     ;+0x2C ;kernel mode service handler
609
ends
610
 
611
DRV_ENTRY    equ  1
612
DRV_EXIT     equ -1
613
 
614
struct  COFF_HEADER
615
        machine         dw ?
616
        nSections       dw ?
617
        DataTime        dd ?
618
        pSymTable       dd ?
619
        nSymbols        dd ?
620
        optHeader       dw ?
621
        flags           dw ?
622
ends
623
 
624
struct  COFF_SECTION
625
        Name            rb 8
626
        VirtualSize     dd ?
627
        VirtualAddress  dd ?
628
        SizeOfRawData   dd ?
629
        PtrRawData      dd ?
630
        PtrReloc        dd ?
631
        PtrLinenumbers  dd ?
632
        NumReloc        dw ?
633
        NumLinenum      dw ?
634
        Characteristics dd ?
635
ends
636
 
637
struct  COFF_RELOC
638
        VirtualAddress  dd ?
639
        SymIndex        dd ?
640
        Type            dw ?
641
ends
642
 
643
struct  COFF_SYM
644
        Name            rb 8
645
        Value           dd ?
646
        SectionNumber   dw ?
647
        Type            dw ?
648
        StorageClass    db ?
649
        NumAuxSymbols   db ?
650
ends
651
 
652
struct  IOCTL
653
        handle          dd ?
654
        io_code         dd ?
655
        input           dd ?
656
        inp_size        dd ?
657
        output          dd ?
658
        out_size        dd ?
659
ends
660
 
661
struct  IRQH
662
        list            LHEAD
663
        handler         dd ?   ;handler roututine
664
        data            dd ?   ;user-specific data
665
ends