forked from KolibriOS/kolibrios
acpi: bugfixes
git-svn-id: svn://kolibrios.org@2229 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
db9a61710d
commit
7e141ac4d8
@ -5,7 +5,6 @@
|
|||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
IRQ_RESERVED = 24 ; 16 or 24
|
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
IRQ_COUNT dd 24
|
IRQ_COUNT dd 24
|
||||||
@ -54,9 +53,11 @@ APIC_init:
|
|||||||
|
|
||||||
stdcall load_file, dev_data_path
|
stdcall load_file, dev_data_path
|
||||||
test eax, eax
|
test eax, eax
|
||||||
mov [acpi_dev_data], eax
|
|
||||||
jz .no_apic
|
jz .no_apic
|
||||||
|
|
||||||
|
mov [acpi_dev_data], eax
|
||||||
|
mov [acpi_dev_size], ebx
|
||||||
|
|
||||||
call IRQ_mask_all
|
call IRQ_mask_all
|
||||||
|
|
||||||
; IOAPIC init
|
; IOAPIC init
|
||||||
@ -112,28 +113,9 @@ APIC_init:
|
|||||||
mov al, 1
|
mov al, 1
|
||||||
out 0x23, al
|
out 0x23, al
|
||||||
|
|
||||||
|
call pci_irq_fixup
|
||||||
.no_apic:
|
.no_apic:
|
||||||
|
|
||||||
;init handlers table
|
|
||||||
|
|
||||||
mov ecx, IRQ_RESERVED
|
|
||||||
mov edi, irqh_tab
|
|
||||||
@@:
|
|
||||||
mov eax, edi
|
|
||||||
stosd
|
|
||||||
stosd
|
|
||||||
loop @B
|
|
||||||
|
|
||||||
mov ecx, 47
|
|
||||||
mov eax, irqh_pool+IRQH.sizeof
|
|
||||||
mov [next_irqh], irqh_pool
|
|
||||||
@@:
|
|
||||||
mov [eax-IRQH.sizeof], eax
|
|
||||||
add eax, IRQH.sizeof
|
|
||||||
loop @B
|
|
||||||
|
|
||||||
mov [eax-IRQH.sizeof], dword 0
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;===========================================================
|
;===========================================================
|
||||||
@ -430,137 +412,6 @@ pci_irq_fixup:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
; IRQ_TYPE_DISABLE equ 0
|
|
||||||
; IRQ_TYPE_PIC equ 1
|
|
||||||
; IRQ_TYPE_APIC equ 2
|
|
||||||
|
|
||||||
; uglobal
|
|
||||||
; irq_type_to_set rd 1
|
|
||||||
; irq_types rd IRQ_RESERVE
|
|
||||||
; endg
|
|
||||||
|
|
||||||
; -----------------------------------------
|
|
||||||
; End Of Interrupt
|
|
||||||
; al - IRQ number
|
|
||||||
; align 16
|
|
||||||
; IRQ_EOI:
|
|
||||||
; movzx eax, al
|
|
||||||
; cmp dword[irq_types + eax * 4], IRQ_TYPE_APIC
|
|
||||||
; jne @f
|
|
||||||
; mov eax, [LAPIC_BASE]
|
|
||||||
; mov dword [eax + APIC_EOI], 0 ; EOI
|
|
||||||
; ret
|
|
||||||
; @@:
|
|
||||||
; cmp al, 8
|
|
||||||
; mov al, 0x20
|
|
||||||
; jb @f
|
|
||||||
; out 0xa0, al
|
|
||||||
; @@: out 0x20, al
|
|
||||||
; ret
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc enable_irq stdcall, irq_line:dword
|
|
||||||
; cmp dword[irq_type_to_set], IRQ_TYPE_APIC
|
|
||||||
; jne @f
|
|
||||||
; stdcall APIC_enable_irq, [irq_line]
|
|
||||||
; ret
|
|
||||||
; @@: stdcall PIC_enable_irq, [irq_line]
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc disable_irq stdcall, irq_line:dword
|
|
||||||
; push eax
|
|
||||||
; mov eax, [irq_line]
|
|
||||||
; cmp dword[irq_types + eax * 4], IRQ_TYPE_APIC
|
|
||||||
; jne @f
|
|
||||||
; stdcall APIC_disable_irq, eax
|
|
||||||
; pop eax
|
|
||||||
; ret
|
|
||||||
; @@: stdcall PIC_disable_irq, eax
|
|
||||||
; pop eax
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc PIC_enable_irq stdcall, irq_line:dword
|
|
||||||
; pusha
|
|
||||||
; mov ebx, [irq_line]
|
|
||||||
; mov eax, [irq_types + ebx * 4]
|
|
||||||
; cmp eax, IRQ_TYPE_DISABLE
|
|
||||||
; je @f
|
|
||||||
; cmp eax, IRQ_TYPE_PIC
|
|
||||||
; je @f
|
|
||||||
; stdcall disable_irq, ebx
|
|
||||||
; @@: mov dword[irq_types + ebx * 4], IRQ_TYPE_PIC
|
|
||||||
; mov edx, 0x21
|
|
||||||
; cmp ebx, 8
|
|
||||||
; jb @F
|
|
||||||
; mov edx, 0xA1
|
|
||||||
; sub ebx,8
|
|
||||||
; @@: in al,dx
|
|
||||||
; btr eax, ebx
|
|
||||||
; out dx, al
|
|
||||||
; popa
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc PIC_disable_irq stdcall, irq_line:dword
|
|
||||||
; pusha
|
|
||||||
; mov ebx, [irq_line]
|
|
||||||
; mov dword[irq_types + ebx * 4], IRQ_TYPE_DISABLE
|
|
||||||
; mov edx, 0x21
|
|
||||||
; cmp ebx, 8
|
|
||||||
; jb @F
|
|
||||||
; mov edx, 0xA1
|
|
||||||
; sub ebx,8
|
|
||||||
; @@: in al,dx
|
|
||||||
; bts eax, ebx
|
|
||||||
; out dx, al
|
|
||||||
; popa
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc APIC_enable_irq stdcall, irq_line:dword
|
|
||||||
; pusha
|
|
||||||
; mov ebx, [irq_line]
|
|
||||||
; mov eax, [irq_types + ebx * 4]
|
|
||||||
; cmp eax, IRQ_TYPE_DISABLE
|
|
||||||
; je @f
|
|
||||||
; cmp eax, IRQ_TYPE_APIC
|
|
||||||
; je @f
|
|
||||||
; stdcall disable_irq, ebx
|
|
||||||
; @@: mov dword[irq_types + ebx * 4], IRQ_TYPE_APIC
|
|
||||||
; shl ebx, 1
|
|
||||||
; add ebx, 0x10
|
|
||||||
; mov eax, ebx
|
|
||||||
; call IOAPIC_read
|
|
||||||
; and eax, 0xfffeffff ; bit 16
|
|
||||||
; xchg eax, ebx
|
|
||||||
; call IOAPIC_write
|
|
||||||
; popa
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
; align 4
|
|
||||||
; proc APIC_disable_irq stdcall, irq_line:dword
|
|
||||||
; pusha
|
|
||||||
; mov ebx, [irq_line]
|
|
||||||
; mov dword[irq_types + ebx * 4], IRQ_TYPE_DISABLE
|
|
||||||
; shl ebx, 1
|
|
||||||
; add ebx, 0x10
|
|
||||||
; mov eax, ebx
|
|
||||||
; call IOAPIC_read
|
|
||||||
; or eax, 0x10000
|
|
||||||
; xchg eax, ebx
|
|
||||||
; call IOAPIC_write
|
|
||||||
; popa
|
|
||||||
; ret
|
|
||||||
; endp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
IRQ_RESERVED equ 24
|
||||||
|
|
||||||
IRQ_POOL_SIZE equ 48
|
IRQ_POOL_SIZE equ 48
|
||||||
|
|
||||||
@ -21,6 +22,29 @@ irq_failed rd IRQ_RESERVED
|
|||||||
|
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
align 4
|
||||||
|
init_irqs:
|
||||||
|
|
||||||
|
mov ecx, IRQ_RESERVED
|
||||||
|
mov edi, irqh_tab
|
||||||
|
@@:
|
||||||
|
mov eax, edi
|
||||||
|
stosd
|
||||||
|
stosd
|
||||||
|
loop @B
|
||||||
|
|
||||||
|
mov ecx, IRQ_POOL_SIZE-1
|
||||||
|
mov eax, irqh_pool+IRQH.sizeof
|
||||||
|
mov [next_irqh], irqh_pool
|
||||||
|
@@:
|
||||||
|
mov [eax-IRQH.sizeof], eax
|
||||||
|
add eax, IRQH.sizeof
|
||||||
|
loop @B
|
||||||
|
|
||||||
|
mov [eax-IRQH.sizeof], dword 0
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc attach_int_handler stdcall, irq:dword, handler:dword, user_data:dword
|
proc attach_int_handler stdcall, irq:dword, handler:dword, user_data:dword
|
||||||
locals
|
locals
|
||||||
|
@ -226,7 +226,7 @@ B32:
|
|||||||
mov fs,ax
|
mov fs,ax
|
||||||
mov gs,ax
|
mov gs,ax
|
||||||
mov ss,ax
|
mov ss,ax
|
||||||
mov esp,0x5ec00 ; Set stack
|
mov esp,0x006CC00 ; Set stack
|
||||||
|
|
||||||
; CLEAR 0x280000 - HEAP_BASE
|
; CLEAR 0x280000 - HEAP_BASE
|
||||||
|
|
||||||
@ -236,13 +236,11 @@ B32:
|
|||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
mov edi,0x40000
|
|
||||||
mov ecx,(0x90000-0x40000)/4
|
|
||||||
rep stosd
|
|
||||||
|
|
||||||
; CLEAR KERNEL UNDEFINED GLOBALS
|
; CLEAR KERNEL UNDEFINED GLOBALS
|
||||||
mov edi, endofcode-OS_BASE
|
mov edi, endofcode-OS_BASE
|
||||||
mov ecx, (uglobals_size/4)+4
|
mov ecx, 0x90000
|
||||||
|
sub ecx, edi
|
||||||
|
shr ecx, 2
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
; SAVE & CLEAR 0-0xffff
|
; SAVE & CLEAR 0-0xffff
|
||||||
@ -604,7 +602,8 @@ high_code:
|
|||||||
|
|
||||||
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
|
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
|
||||||
|
|
||||||
call PIC_init
|
call init_irqs
|
||||||
|
call PIC_init
|
||||||
|
|
||||||
; Initialize system V86 machine
|
; Initialize system V86 machine
|
||||||
call init_sys_v86
|
call init_sys_v86
|
||||||
@ -615,8 +614,6 @@ high_code:
|
|||||||
; Try to Initialize APIC
|
; Try to Initialize APIC
|
||||||
call APIC_init
|
call APIC_init
|
||||||
|
|
||||||
call pci_irq_fixup
|
|
||||||
|
|
||||||
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
|
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
|
||||||
; they are used: when partitions are scanned, hd_read relies on timer
|
; they are used: when partitions are scanned, hd_read relies on timer
|
||||||
call unmask_timer
|
call unmask_timer
|
||||||
@ -680,11 +677,9 @@ end if
|
|||||||
; Display APIC status
|
; Display APIC status
|
||||||
mov esi, boot_APIC_found
|
mov esi, boot_APIC_found
|
||||||
cmp [irq_mode], IRQ_APIC
|
cmp [irq_mode], IRQ_APIC
|
||||||
jne @f
|
je @f
|
||||||
|
|
||||||
mov esi, boot_APIC_nfound
|
mov esi, boot_APIC_nfound
|
||||||
@@:
|
@@:
|
||||||
call boot_log
|
|
||||||
|
|
||||||
; PRINT AMOUNT OF MEMORY
|
; PRINT AMOUNT OF MEMORY
|
||||||
mov esi, boot_memdetect
|
mov esi, boot_memdetect
|
||||||
@ -822,7 +817,7 @@ end if
|
|||||||
mov edx, 0xFFFFFF
|
mov edx, 0xFFFFFF
|
||||||
xor edi,edi
|
xor edi,edi
|
||||||
mov eax, 0x00040000
|
mov eax, 0x00040000
|
||||||
inc edi
|
inc edi
|
||||||
call display_number_force
|
call display_number_force
|
||||||
|
|
||||||
; SET VARIABLES
|
; SET VARIABLES
|
||||||
|
@ -1,316 +1,316 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
;; Distributed under terms of the GNU General Public License ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; KERNEL32.INC ;;
|
;; KERNEL32.INC ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Included 32 bit kernel files for MenuetOS ;;
|
;; Included 32 bit kernel files for MenuetOS ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; This file is kept separate as it will be easier to ;;
|
;; This file is kept separate as it will be easier to ;;
|
||||||
;; maintain and compile with an automated SETUP program ;;
|
;; maintain and compile with an automated SETUP program ;;
|
||||||
;; in the future. ;;
|
;; in the future. ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
|
||||||
;struc db [a] { common . db a
|
;struc db [a] { common . db a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used db: ',`.,13,10
|
; display 'not used db: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
;struc dw [a] { common . dw a
|
;struc dw [a] { common . dw a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used dw: ',`.,13,10
|
; display 'not used dw: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
;struc dd [a] { common . dd a
|
;struc dd [a] { common . dd a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used dd: ',`.,13,10
|
; display 'not used dd: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
;struc dp [a] { common . dp a
|
;struc dp [a] { common . dp a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used dp: ',`.,13,10
|
; display 'not used dp: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
;struc dq [a] { common . dq a
|
;struc dq [a] { common . dq a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used dq: ',`.,13,10
|
; display 'not used dq: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
;struc dt [a] { common . dt a
|
;struc dt [a] { common . dt a
|
||||||
; if ~used .
|
; if ~used .
|
||||||
; display 'not used dt: ',`.,13,10
|
; display 'not used dt: ',`.,13,10
|
||||||
; end if }
|
; end if }
|
||||||
|
|
||||||
struc POINT {
|
struc POINT {
|
||||||
.x dd ?
|
.x dd ?
|
||||||
.y dd ?
|
.y dd ?
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
POINT POINT
|
POINT POINT
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc RECT {
|
struc RECT {
|
||||||
.left dd ?
|
.left dd ?
|
||||||
.top dd ?
|
.top dd ?
|
||||||
.right dd ?
|
.right dd ?
|
||||||
.bottom dd ?
|
.bottom dd ?
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
RECT RECT
|
RECT RECT
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc BOX {
|
struc BOX {
|
||||||
.left dd ?
|
.left dd ?
|
||||||
.top dd ?
|
.top dd ?
|
||||||
.width dd ?
|
.width dd ?
|
||||||
.height dd ?
|
.height dd ?
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
BOX BOX
|
BOX BOX
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
struc DISPMODE {
|
struc DISPMODE {
|
||||||
.width rw 1
|
.width rw 1
|
||||||
.height rw 1
|
.height rw 1
|
||||||
.bpp rw 1
|
.bpp rw 1
|
||||||
.freq rw 1
|
.freq rw 1
|
||||||
}
|
}
|
||||||
|
|
||||||
; constants definition
|
; constants definition
|
||||||
WSTATE_NORMAL = 00000000b
|
WSTATE_NORMAL = 00000000b
|
||||||
WSTATE_MAXIMIZED = 00000001b
|
WSTATE_MAXIMIZED = 00000001b
|
||||||
WSTATE_MINIMIZED = 00000010b
|
WSTATE_MINIMIZED = 00000010b
|
||||||
WSTATE_ROLLEDUP = 00000100b
|
WSTATE_ROLLEDUP = 00000100b
|
||||||
|
|
||||||
WSTATE_REDRAW = 00000001b
|
WSTATE_REDRAW = 00000001b
|
||||||
WSTATE_WNDDRAWN = 00000010b
|
WSTATE_WNDDRAWN = 00000010b
|
||||||
|
|
||||||
WSTYLE_HASCAPTION = 00010000b
|
WSTYLE_HASCAPTION = 00010000b
|
||||||
WSTYLE_CLIENTRELATIVE = 00100000b
|
WSTYLE_CLIENTRELATIVE = 00100000b
|
||||||
|
|
||||||
struc TASKDATA
|
struc TASKDATA
|
||||||
{
|
{
|
||||||
.event_mask dd ?
|
.event_mask dd ?
|
||||||
.pid dd ?
|
.pid dd ?
|
||||||
dw ?
|
dw ?
|
||||||
.state db ?
|
.state db ?
|
||||||
db ?
|
db ?
|
||||||
dw ?
|
dw ?
|
||||||
.wnd_number db ?
|
.wnd_number db ?
|
||||||
db ?
|
db ?
|
||||||
.mem_start dd ?
|
.mem_start dd ?
|
||||||
.counter_sum dd ?
|
.counter_sum dd ?
|
||||||
.counter_add dd ?
|
.counter_add dd ?
|
||||||
.cpu_usage dd ?
|
.cpu_usage dd ?
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
TASKDATA TASKDATA
|
TASKDATA TASKDATA
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
TSTATE_RUNNING = 0
|
TSTATE_RUNNING = 0
|
||||||
TSTATE_RUN_SUSPENDED = 1
|
TSTATE_RUN_SUSPENDED = 1
|
||||||
TSTATE_WAIT_SUSPENDED = 2
|
TSTATE_WAIT_SUSPENDED = 2
|
||||||
TSTATE_ZOMBIE = 3
|
TSTATE_ZOMBIE = 3
|
||||||
TSTATE_TERMINATING = 4
|
TSTATE_TERMINATING = 4
|
||||||
TSTATE_WAITING = 5
|
TSTATE_WAITING = 5
|
||||||
TSTATE_FREE = 9
|
TSTATE_FREE = 9
|
||||||
|
|
||||||
; structures definition
|
; structures definition
|
||||||
struc WDATA {
|
struc WDATA {
|
||||||
.box BOX
|
.box BOX
|
||||||
.cl_workarea dd ?
|
.cl_workarea dd ?
|
||||||
.cl_titlebar dd ?
|
.cl_titlebar dd ?
|
||||||
.cl_frames dd ?
|
.cl_frames dd ?
|
||||||
.reserved db ?
|
.reserved db ?
|
||||||
.fl_wstate db ?
|
.fl_wstate db ?
|
||||||
.fl_wdrawn db ?
|
.fl_wdrawn db ?
|
||||||
.fl_redraw db ?
|
.fl_redraw db ?
|
||||||
.sizeof:
|
.sizeof:
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
WDATA WDATA
|
WDATA WDATA
|
||||||
end virtual
|
end virtual
|
||||||
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
||||||
|
|
||||||
struc APPDATA
|
struc APPDATA
|
||||||
{
|
{
|
||||||
.app_name db 11 dup(?)
|
.app_name db 11 dup(?)
|
||||||
db 5 dup(?)
|
db 5 dup(?)
|
||||||
|
|
||||||
.fpu_state dd ? ;+16
|
.fpu_state dd ? ;+16
|
||||||
.ev_count_ dd ? ;unused ;+20
|
.ev_count_ dd ? ;unused ;+20
|
||||||
.exc_handler dd ? ;+24
|
.exc_handler dd ? ;+24
|
||||||
.except_mask dd ? ;+28
|
.except_mask dd ? ;+28
|
||||||
.pl0_stack dd ? ;+32
|
.pl0_stack dd ? ;+32
|
||||||
.heap_base dd ? ;+36
|
.heap_base dd ? ;+36
|
||||||
.heap_top dd ? ;+40
|
.heap_top dd ? ;+40
|
||||||
.cursor dd ? ;+44
|
.cursor dd ? ;+44
|
||||||
.fd_ev dd ? ;+48
|
.fd_ev dd ? ;+48
|
||||||
.bk_ev dd ? ;+52
|
.bk_ev dd ? ;+52
|
||||||
.fd_obj dd ? ;+56
|
.fd_obj dd ? ;+56
|
||||||
.bk_obj dd ? ;+60
|
.bk_obj dd ? ;+60
|
||||||
.saved_esp dd ? ;+64
|
.saved_esp dd ? ;+64
|
||||||
.io_map rd 2 ;+68
|
.io_map rd 2 ;+68
|
||||||
.dbg_state dd ? ;+76
|
.dbg_state dd ? ;+76
|
||||||
.cur_dir dd ? ;+80
|
.cur_dir dd ? ;+80
|
||||||
.wait_timeout dd ? ;+84
|
.wait_timeout dd ? ;+84
|
||||||
.saved_esp0 dd ? ;+88
|
.saved_esp0 dd ? ;+88
|
||||||
.wait_begin dd ? ;+92 +++
|
.wait_begin dd ? ;+92 +++
|
||||||
.wait_test dd ? ;+96 +++
|
.wait_test dd ? ;+96 +++
|
||||||
.wait_param dd ? ;+100 +++
|
.wait_param dd ? ;+100 +++
|
||||||
.tls_base dd ? ;+104
|
.tls_base dd ? ;+104
|
||||||
.dlls_list_ptr dd ? ;+108
|
.dlls_list_ptr dd ? ;+108
|
||||||
db 16 dup(?) ;+112
|
db 16 dup(?) ;+112
|
||||||
|
|
||||||
.wnd_shape dd ? ;+128
|
.wnd_shape dd ? ;+128
|
||||||
.wnd_shape_scale dd ? ;+132
|
.wnd_shape_scale dd ? ;+132
|
||||||
dd ? ;+136
|
dd ? ;+136
|
||||||
.mem_size dd ? ;+140
|
.mem_size dd ? ;+140
|
||||||
.saved_box BOX
|
.saved_box BOX
|
||||||
.ipc_start dd ?
|
.ipc_start dd ?
|
||||||
.ipc_size dd ?
|
.ipc_size dd ?
|
||||||
.event_mask dd ?
|
.event_mask dd ?
|
||||||
.debugger_slot dd ?
|
.debugger_slot dd ?
|
||||||
dd ?
|
dd ?
|
||||||
.keyboard_mode db ?
|
.keyboard_mode db ?
|
||||||
db 3 dup(?)
|
db 3 dup(?)
|
||||||
.dir_table dd ?
|
.dir_table dd ?
|
||||||
.dbg_event_mem dd ?
|
.dbg_event_mem dd ?
|
||||||
.dbg_regs:
|
.dbg_regs:
|
||||||
.dbg_regs.dr0 dd ?
|
.dbg_regs.dr0 dd ?
|
||||||
.dbg_regs.dr1 dd ?
|
.dbg_regs.dr1 dd ?
|
||||||
.dbg_regs.dr2 dd ?
|
.dbg_regs.dr2 dd ?
|
||||||
.dbg_regs.dr3 dd ?
|
.dbg_regs.dr3 dd ?
|
||||||
.dbg_regs.dr7 dd ?
|
.dbg_regs.dr7 dd ?
|
||||||
.wnd_caption dd ?
|
.wnd_caption dd ?
|
||||||
.wnd_clientbox BOX
|
.wnd_clientbox BOX
|
||||||
}
|
}
|
||||||
virtual at 0
|
virtual at 0
|
||||||
APPDATA APPDATA
|
APPDATA APPDATA
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
;// mike.dld, 2006-29-01 ]
|
;// mike.dld, 2006-29-01 ]
|
||||||
|
|
||||||
struc MUTEX
|
struc MUTEX
|
||||||
{
|
{
|
||||||
.wait LHEAD
|
.wait LHEAD
|
||||||
.count rd 1
|
.count rd 1
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual at 0
|
virtual at 0
|
||||||
MUTEX MUTEX
|
MUTEX MUTEX
|
||||||
end virtual
|
end virtual
|
||||||
|
|
||||||
|
|
||||||
; Core functions
|
; Core functions
|
||||||
include "core/sync.inc" ; macros for synhronization objects
|
include "core/sync.inc" ; macros for synhronization objects
|
||||||
include "core/sys32.inc" ; process management
|
include "core/sys32.inc" ; process management
|
||||||
include "core/sched.inc" ; process scheduling
|
include "core/sched.inc" ; process scheduling
|
||||||
include "core/syscall.inc" ; system call
|
include "core/syscall.inc" ; system call
|
||||||
include "core/fpu.inc" ; all fpu/sse support
|
include "core/fpu.inc" ; all fpu/sse support
|
||||||
include "core/memory.inc"
|
include "core/memory.inc"
|
||||||
include "core/heap.inc" ; kernel and app heap
|
include "core/heap.inc" ; kernel and app heap
|
||||||
include "core/malloc.inc" ; small kernel heap
|
include "core/malloc.inc" ; small kernel heap
|
||||||
include "core/taskman.inc"
|
include "core/taskman.inc"
|
||||||
include "core/dll.inc"
|
include "core/dll.inc"
|
||||||
include "core/peload.inc" ;
|
include "core/peload.inc" ;
|
||||||
include "core/exports.inc"
|
include "core/exports.inc"
|
||||||
include "core/string.inc"
|
include "core/string.inc"
|
||||||
include "core/v86.inc" ; virtual-8086 manager
|
include "core/v86.inc" ; virtual-8086 manager
|
||||||
include "core/apic.inc" ; Interrupt Controller functions
|
include "core/irq.inc" ; irq handling functions
|
||||||
include "core/irq.inc" ; irq handling functions
|
include "core/apic.inc" ; Interrupt Controller functions
|
||||||
include "core/timers.inc"
|
include "core/timers.inc"
|
||||||
|
|
||||||
; GUI stuff
|
; GUI stuff
|
||||||
include "gui/window.inc"
|
include "gui/window.inc"
|
||||||
include "gui/event.inc"
|
include "gui/event.inc"
|
||||||
include "gui/font.inc"
|
include "gui/font.inc"
|
||||||
include "gui/button.inc"
|
include "gui/button.inc"
|
||||||
|
|
||||||
; shutdown
|
; shutdown
|
||||||
|
|
||||||
; file system
|
; file system
|
||||||
|
|
||||||
include "blkdev/disk.inc" ; support for plug-n-play disks
|
include "blkdev/disk.inc" ; support for plug-n-play disks
|
||||||
include "blkdev/disk_cache.inc" ; caching for plug-n-play disks
|
include "blkdev/disk_cache.inc" ; caching for plug-n-play disks
|
||||||
include "fs/fs.inc" ; syscall
|
include "fs/fs.inc" ; syscall
|
||||||
include "fs/fat32.inc" ; read / write for fat32 filesystem
|
include "fs/fat32.inc" ; read / write for fat32 filesystem
|
||||||
include "fs/ntfs.inc" ; read / write for ntfs filesystem
|
include "fs/ntfs.inc" ; read / write for ntfs filesystem
|
||||||
include "fs/fat12.inc" ; read / write for fat12 filesystem
|
include "fs/fat12.inc" ; read / write for fat12 filesystem
|
||||||
include "blkdev/rd.inc" ; ramdisk read /write
|
include "blkdev/rd.inc" ; ramdisk read /write
|
||||||
include "fs/fs_lfn.inc" ; syscall, version 2
|
include "fs/fs_lfn.inc" ; syscall, version 2
|
||||||
include "fs/iso9660.inc" ; read for iso9660 filesystem CD
|
include "fs/iso9660.inc" ; read for iso9660 filesystem CD
|
||||||
include "fs/ext2.inc" ; read / write for ext2 filesystem
|
include "fs/ext2.inc" ; read / write for ext2 filesystem
|
||||||
|
|
||||||
; sound
|
; sound
|
||||||
|
|
||||||
include "sound/playnote.inc" ; player Note for Speaker PC
|
include "sound/playnote.inc" ; player Note for Speaker PC
|
||||||
|
|
||||||
; display
|
; display
|
||||||
|
|
||||||
include "video/vesa12.inc" ; Vesa 1.2 functions
|
include "video/vesa12.inc" ; Vesa 1.2 functions
|
||||||
include "video/vesa20.inc" ; Vesa 2.0 functions
|
include "video/vesa20.inc" ; Vesa 2.0 functions
|
||||||
include "video/blitter.inc" ;
|
include "video/blitter.inc" ;
|
||||||
include "video/vga.inc" ; VGA 16 color functions
|
include "video/vga.inc" ; VGA 16 color functions
|
||||||
include "video/cursors.inc" ; cursors functions
|
include "video/cursors.inc" ; cursors functions
|
||||||
|
|
||||||
; Network Interface & TCPIP Stack
|
; Network Interface & TCPIP Stack
|
||||||
|
|
||||||
include "network/stack.inc"
|
include "network/stack.inc"
|
||||||
|
|
||||||
;include "drivers/uart.inc"
|
;include "drivers/uart.inc"
|
||||||
|
|
||||||
|
|
||||||
; Mouse pointer
|
; Mouse pointer
|
||||||
|
|
||||||
include "gui/mouse.inc"
|
include "gui/mouse.inc"
|
||||||
|
|
||||||
; Window skinning
|
; Window skinning
|
||||||
|
|
||||||
include "gui/skincode.inc"
|
include "gui/skincode.inc"
|
||||||
|
|
||||||
; Pci functions
|
; Pci functions
|
||||||
|
|
||||||
include "bus/pci/pci32.inc"
|
include "bus/pci/pci32.inc"
|
||||||
|
|
||||||
; Floppy drive controller
|
; Floppy drive controller
|
||||||
|
|
||||||
include "blkdev/fdc.inc"
|
include "blkdev/fdc.inc"
|
||||||
include "blkdev/flp_drv.inc"
|
include "blkdev/flp_drv.inc"
|
||||||
|
|
||||||
; IDE cache
|
; IDE cache
|
||||||
include "blkdev/ide_cache.inc"
|
include "blkdev/ide_cache.inc"
|
||||||
|
|
||||||
; HD drive controller
|
; HD drive controller
|
||||||
include "blkdev/hd_drv.inc"
|
include "blkdev/hd_drv.inc"
|
||||||
|
|
||||||
; CD drive controller
|
; CD drive controller
|
||||||
|
|
||||||
include "blkdev/cdrom.inc"
|
include "blkdev/cdrom.inc"
|
||||||
include "blkdev/cd_drv.inc"
|
include "blkdev/cd_drv.inc"
|
||||||
|
|
||||||
; Character devices
|
; Character devices
|
||||||
|
|
||||||
include "hid/keyboard.inc"
|
include "hid/keyboard.inc"
|
||||||
include "hid/mousedrv.inc"
|
include "hid/mousedrv.inc"
|
||||||
|
|
||||||
; setting date,time,clock and alarm-clock
|
; setting date,time,clock and alarm-clock
|
||||||
|
|
||||||
include "hid/set_dtc.inc"
|
include "hid/set_dtc.inc"
|
||||||
|
|
||||||
;% -include
|
;% -include
|
||||||
|
|
||||||
;parser file names
|
;parser file names
|
||||||
include "fs/parse_fn.inc"
|
include "fs/parse_fn.inc"
|
||||||
|
|
||||||
; work with conf lib
|
; work with conf lib
|
||||||
include "core/conf_lib.inc"
|
include "core/conf_lib.inc"
|
||||||
|
|
||||||
; load external lib
|
; load external lib
|
||||||
include "core/ext_lib.inc"
|
include "core/ext_lib.inc"
|
||||||
|
|
||||||
; list of external functions
|
; list of external functions
|
||||||
include "imports.inc"
|
include "imports.inc"
|
||||||
|
Loading…
Reference in New Issue
Block a user