synchronization with flat kernel

git-svn-id: svn://kolibrios.org@412 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2007-03-10 16:04:35 +00:00
parent 375088cf8f
commit 391818d48f
9 changed files with 163 additions and 283 deletions

View File

@ -1031,90 +1031,8 @@ end if
mov al,[preboot_vrrm-0x10000] mov al,[preboot_vrrm-0x10000]
mov [es:0x9030],al mov [es:0x9030],al
; MEMORY MODEL
; movzx eax,byte [es:preboot_memory-0x10000]
; cmp eax,0
; jne pre_mem
;;;;;;;;;;;;;;;;;;;;;;;;;
; mario79 - memory size ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; mov ax,0E801h
;;; xor bx,bx ; thanks to Alexei for bugfix [18.07.2004]
; xor cx, cx
; xor dx, dx
; int 0x15
; movzx ebx, dx ;bx
; movzx eax, cx ;ax
; shl ebx,6 ; ïåðåâîä â êèëîáàéòû (x64)
; add eax,ebx
; add eax, 1000h ;440h
; cmp eax,40000h ; 256?
; jge mem_256_z
; cmp eax,20000h ; 128?
; jge mem_128_z
; cmp eax,10000h ; 64?
; jge mem_64_z
; cmp eax,8000h ; 32?
; jge mem_32_z
; jmp mem_16_z
;
;mem_256_z: mov si,memokz256-0x10000
; call printplain
; mov eax,5
; jmp pre_mem
;mem_128_z: mov si,memokz128-0x10000
; call printplain
; mov eax,4
; jmp pre_mem
;mem_64_z: mov si,memokz64-0x10000
; call printplain
; mov eax,3
; jmp pre_mem
;mem_32_z: mov si,memokz32-0x10000
; call printplain
; mov eax,2
; jmp pre_mem
;mem_16_z: mov si,memokz16-0x10000
; call printplain
; mov eax,1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pre_mem:
; push word 0x0000
; pop es
; mov [es:0x9030],al
; push word 0x1000
; pop es
; mov si,linef-0x10000
; call printplain
; DIRECT WRITE TO LFB, PAGING DISABLED
; movzx eax,byte [es:preboot_lfb-0x10000]
; mov eax,1 ; paging disabled
; cmp eax,0
; jne pre_lfb
; mov si,gr_direct-0x10000
; call printplain
; mov ebx,'12'
; call getkey
; pre_lfb:
; push word 0x0000
; pop es
; mov [es:0x901E],al
; mov ax,0x1000
; mov es,ax
; mov si,linef-0x10000
; call printplain
mov [es:0x901E],byte 1 mov [es:0x901E],byte 1
; BOOT DEVICE ; BOOT DEVICE
mov al, [preboot_device-0x10000] mov al, [preboot_device-0x10000]
@ -1331,42 +1249,9 @@ sayerr_floppy:
mov al,0 mov al,0
out dx,al out dx,al
push es
; PAGE TABLE
push dword [es:0x9018]
;
; mmap_mem equ 64 ; amount of memory to map
;
push 0x6000
pop es ; es:di = 6000:0
; xor di,di
; mov cx,256*mmap_mem ; Map (mapmem) M
;; initialize as identity mapping
; xor eax, eax
; call pagetable_set
;
;
; 4 KB PAGE DIRECTORY
;
push 0x7F00
pop es ; es:di = 7F00:0
; xor di, di
; mov cx, 64 / 4
; mov eax, 0x60007 ; for 0 M
; call pagetable_set
; xor si,si
; mov di,second_base_address shr 20
; mov cx,64/2
; rep movs word [es:di], [es:si]
; mov eax, 0x7F000 +8+16 ; Page directory and enable caches
; mov cr3, eax
; SET GRAPHICS ; SET GRAPHICS
pop es
xor ax, ax xor ax, ax
mov es, ax mov es, ax
@ -1377,7 +1262,7 @@ sayerr_floppy:
cmp ax,0x12 cmp ax,0x12
je setgr je setgr
mov ax,0x4f02 ; Vesa mov ax,0x4f02 ; Vesa
setgr: setgr:
int 0x10 int 0x10
test ah,ah test ah,ah
mov si, fatalsel-0x10000 mov si, fatalsel-0x10000
@ -1405,7 +1290,6 @@ sayerr_floppy:
pop dx pop dx
out dx,al ; select GDC bit mask register out dx,al ; select GDC bit mask register
; for writes to 0x03cf ; for writes to 0x03cf
gmok2:
gmok2:
push ds push ds
pop es pop es

View File

@ -3,7 +3,7 @@
cmp [boot_dev],1 cmp [boot_dev],1
jne no_sys_on_hd jne no_sys_on_hd
test [0x40001],byte 0x40 test [DRIVE_DATA+1],byte 0x40
jz position_2 jz position_2
mov [hdbase],0x1f0 mov [hdbase],0x1f0
mov [hdid],0x0 mov [hdid],0x0
@ -14,11 +14,11 @@
call search_and_read_image call search_and_read_image
cmp [image_retrieved],1 cmp [image_retrieved],1
je yes_sys_on_hd je yes_sys_on_hd
movzx eax,byte [0x40002] movzx eax,byte [DRIVE_DATA+2]
cmp [fat32part],eax cmp [fat32part],eax
jle position_1_1 jle position_1_1
position_2: position_2:
test [0x40001],byte 0x10 test [DRIVE_DATA+1],byte 0x10
jz position_3 jz position_3
mov [hdbase],0x1f0 mov [hdbase],0x1f0
mov [hdid],0x10 mov [hdid],0x10
@ -29,11 +29,11 @@
call search_and_read_image call search_and_read_image
cmp [image_retrieved],1 cmp [image_retrieved],1
je yes_sys_on_hd je yes_sys_on_hd
movzx eax,byte [0x40003] movzx eax,byte [DRIVE_DATA+3]
cmp eax,[fat32part] cmp eax,[fat32part]
jle position_2_1 jle position_2_1
position_3: position_3:
test [0x40001],byte 0x4 test [DRIVE_DATA+1],byte 0x4
jz position_4 jz position_4
mov [hdbase],0x170 mov [hdbase],0x170
mov [hdid],0x0 mov [hdid],0x0
@ -44,11 +44,11 @@
call search_and_read_image call search_and_read_image
cmp [image_retrieved],1 cmp [image_retrieved],1
je yes_sys_on_hd je yes_sys_on_hd
movzx eax,byte [0x40004] movzx eax,byte [DRIVE_DATA+4]
cmp eax,[fat32part] cmp eax,[fat32part]
jle position_3_1 jle position_3_1
position_4: position_4:
test [0x40001],byte 0x1 test [DRIVE_DATA+1],byte 0x1
jz no_sys_on_hd jz no_sys_on_hd
mov [hdbase],0x170 mov [hdbase],0x170
mov [hdid],0x10 mov [hdid],0x10
@ -59,7 +59,7 @@
call search_and_read_image call search_and_read_image
cmp [image_retrieved],1 cmp [image_retrieved],1
je yes_sys_on_hd je yes_sys_on_hd
movzx eax,byte [0x40005] movzx eax,byte [DRIVE_DATA+5]
cmp eax,[fat32part] cmp eax,[fat32part]
jle position_4_1 jle position_4_1
jmp yes_sys_on_hd jmp yes_sys_on_hd

View File

@ -235,7 +235,7 @@ SB16_Status equ (OS_BASE+0x02B0000)
BUTTON_INFO equ (OS_BASE+0x02C0000) BUTTON_INFO equ (OS_BASE+0x02C0000)
RESERVED_PORTS equ (OS_BASE+0x02D0000) RESERVED_PORTS equ (OS_BASE+0x02D0000)
IRQ_SAVE equ (OS_BASE+0x02E0000) IRQ_SAVE equ (OS_BASE+0x02E0000)
SYS_VAR equ (OS_BASE+0x02f0000) BOOT_VAR equ (OS_BASE+0x02f0000)
IMG_BACKGROUND equ (OS_BASE+0x0300000) IMG_BACKGROUND equ (OS_BASE+0x0300000)
WinMapAddress equ (OS_BASE+0x0460000) WinMapAddress equ (OS_BASE+0x0460000)
display_data equ (OS_BASE+0x0460000) display_data equ (OS_BASE+0x0460000)

View File

@ -382,14 +382,14 @@ proc init_LFB
cmp dword [LFBAddress], -1 cmp dword [LFBAddress], -1
jne @f jne @f
mov [0x2f0000+0x901c],byte 2 mov [BOOT_VAR+0x901c],byte 2
stdcall kernel_alloc, 0x280000 stdcall kernel_alloc, 0x280000
mov [LFBAddress], eax mov [LFBAddress], eax
ret ret
@@: @@:
test [SCR_MODE],word 0100000000000000b test [SCR_MODE],word 0100000000000000b
jnz @f jnz @f
mov [0x2f0000+0x901c],byte 2 mov [BOOT_VAR+0x901c],byte 2
ret ret
@@: @@:
mov edx, LFB_BASE mov edx, LFB_BASE
@ -1229,7 +1229,7 @@ MEM_UC equ 0 ;uncached memory
align 4 align 4
proc init_mtrr proc init_mtrr
cmp [0x2f0000+0x901c],byte 2 cmp [BOOT_VAR+0x901c],byte 2
je .exit je .exit
bt [cpu_caps], CAPS_MTRR bt [cpu_caps], CAPS_MTRR

View File

@ -50,13 +50,18 @@ align 32
SYSENTER_VAR equ 0 SYSENTER_VAR equ 0
sysenter_entry: sysenter_entry:
; Íàñòðàèâàåì ñòåê ; Íàñòðàèâàåì ñòåê
cli ; cli sysenter clear IF
push eax ; push eax
mov eax, [ss:CURRENT_TASK] ; mov eax, [ss:CURRENT_TASK]
shl eax, 8 ; shl eax, 8
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack] ; mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP ; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app ; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
mov esp, [ss:CURRENT_TASK]
shl esp, 8
mov esp, [ss:SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP
sti sti
;------------------ ;------------------
push ds es push ds es
@ -93,15 +98,22 @@ sysenter_entry:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 32 align 32
syscall_entry: syscall_entry:
cli ; cli syscall clear IF
xchg ecx, [esp] xchg ecx, [esp]
mov [SYSENTER_VAR + 4], esp mov [SYSENTER_VAR + 4], esp
mov [ss:sysenter_stack - 4], eax
mov eax, [ss:CURRENT_TASK] ; mov [ss:sysenter_stack - 4], eax
shl eax, 8 ; mov eax, [ss:CURRENT_TASK]
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack] ; shl eax, 8
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP ; mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app ; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
mov esp, [ss:CURRENT_TASK]
shl esp, 8
mov esp, [ss:SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP
sti sti
;------------------ ;------------------
push ds es push ds es
@ -127,6 +139,8 @@ syscall_entry:
popad popad
pop es ds pop es ds
;------------------ ;------------------
cli
mov esp, [SYSENTER_VAR + 4] mov esp, [SYSENTER_VAR + 4]
xchg ecx, [esp] xchg ecx, [esp]
sysret sysret

View File

@ -226,7 +226,6 @@ end if
mov eax, [save_cr3] mov eax, [save_cr3]
call set_cr3 call set_cr3
; popfd
xor ebx, ebx xor ebx, ebx
mov [application_table_status],ebx ;unlock application_table_status mutex mov [application_table_status],ebx ;unlock application_table_status mutex
mov eax,[process_number] ;set result mov eax,[process_number] ;set result
@ -235,7 +234,6 @@ end if
mov eax, [save_cr3] mov eax, [save_cr3]
call set_cr3 call set_cr3
.err: .err:
; popfd
.err_hdr: .err_hdr:
stdcall kernel_free,[file_base] stdcall kernel_free,[file_base]
.err_file: .err_file:
@ -334,9 +332,7 @@ proc get_new_process_place
cmp eax,256 cmp eax,256
jge .failed ;it should be <256 jge .failed ;it should be <256
mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary) mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary)
; mov [new_process_place], eax
ret ret
.failed: .failed:
xor eax,eax xor eax,eax
ret ret
@ -471,7 +467,6 @@ else
add edx, 0x1000 add edx, 0x1000
dec [app_pages] dec [app_pages]
jnz .alloc jnz .alloc
end if end if
.done: .done:
@ -531,7 +526,6 @@ proc destroy_app_space stdcall, pg_dir:dword
xor edx,edx xor edx,edx
mov eax,0x2 mov eax,0x2
mov ebx, [pg_dir] mov ebx, [pg_dir]
.loop: .loop:
;eax = current slot of process ;eax = current slot of process
mov ecx,eax mov ecx,eax

View File

@ -3,9 +3,9 @@
; è çàíåñåíèå äàííûõ â îáëàñòü òàáëèöû ; è çàíåñåíèå äàííûõ â îáëàñòü òàáëèöû
; àâòîð Mario79 ; àâòîð Mario79
;**************************************************** ;****************************************************
mov [transfer_adress],0x4000a mov [transfer_adress],DRIVE_DATA+0xa
search_partitions_ide0: search_partitions_ide0:
test [0x40001],byte 0x40 test [DRIVE_DATA+1],byte 0x40
jz search_partitions_ide1 jz search_partitions_ide1
mov [hdbase],0x1f0 mov [hdbase],0x1f0
mov [hdid],0x0 mov [hdid],0x0
@ -15,14 +15,14 @@
call set_FAT32_variables call set_FAT32_variables
cmp [problem_partition],0 cmp [problem_partition],0
jne search_partitions_ide1 jne search_partitions_ide1
inc byte [0x40002] inc byte [DRIVE_DATA+2]
call partition_data_transfer call partition_data_transfer
add [transfer_adress],100 add [transfer_adress],100
inc [fat32part] inc [fat32part]
jmp search_partitions_ide0_1 jmp search_partitions_ide0_1
search_partitions_ide1: search_partitions_ide1:
test [0x40001],byte 0x10 test [DRIVE_DATA+1],byte 0x10
jz search_partitions_ide2 jz search_partitions_ide2
mov [hdbase],0x1f0 mov [hdbase],0x1f0
mov [hdid],0x10 mov [hdid],0x10
@ -32,14 +32,14 @@
call set_FAT32_variables call set_FAT32_variables
cmp [problem_partition],0 cmp [problem_partition],0
jne search_partitions_ide2 jne search_partitions_ide2
inc byte [0x40003] inc byte [DRIVE_DATA+3]
call partition_data_transfer call partition_data_transfer
add [transfer_adress],100 add [transfer_adress],100
inc [fat32part] inc [fat32part]
jmp search_partitions_ide1_1 jmp search_partitions_ide1_1
search_partitions_ide2: search_partitions_ide2:
test [0x40001],byte 0x4 test [DRIVE_DATA+1],byte 0x4
jz search_partitions_ide3 jz search_partitions_ide3
mov [hdbase],0x170 mov [hdbase],0x170
mov [hdid],0x0 mov [hdid],0x0
@ -49,14 +49,14 @@
call set_FAT32_variables call set_FAT32_variables
cmp [problem_partition],0 cmp [problem_partition],0
jne search_partitions_ide3 jne search_partitions_ide3
inc byte [0x40004] inc byte [DRIVE_DATA+4]
call partition_data_transfer call partition_data_transfer
add [transfer_adress],100 add [transfer_adress],100
inc [fat32part] inc [fat32part]
jmp search_partitions_ide2_1 jmp search_partitions_ide2_1
search_partitions_ide3: search_partitions_ide3:
test [0x40001],byte 0x1 test [DRIVE_DATA+1],byte 0x1
jz end_search_partitions_ide jz end_search_partitions_ide
mov [hdbase],0x170 mov [hdbase],0x170
mov [hdid],0x10 mov [hdid],0x10
@ -66,14 +66,14 @@
call set_FAT32_variables call set_FAT32_variables
cmp [problem_partition],0 cmp [problem_partition],0
jne end_search_partitions_ide jne end_search_partitions_ide
inc byte [0x40005] inc byte [DRIVE_DATA+5]
call partition_data_transfer call partition_data_transfer
add [transfer_adress],100 add [transfer_adress],100
inc [fat32part] inc [fat32part]
jmp search_partitions_ide3_1 jmp search_partitions_ide3_1
partition_data_transfer: partition_data_transfer:
mov edi,[transfer_adress] mov edi,[transfer_adress]
mov esi,PARTITION_START mov esi,PARTITION_START
mov ecx,(file_system_data_size+3)/4 mov ecx,(file_system_data_size+3)/4

View File

@ -285,8 +285,8 @@ proc START stdcall, state:dword
call init_controller call init_controller
test eax, eax test eax, eax
jz .fail jz .fail
jmp .fail ;force fail
jmp .fail ;force fail
if DEBUG if DEBUG
mov esi, msgInitCodec mov esi, msgInitCodec
@ -609,13 +609,13 @@ proc init_controller
call SysMsgBoardStr call SysMsgBoardStr
stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x10 stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x10
and eax,0xFFFE ; and eax, -16
mov [ctrl.codec_io_base], eax mov [ctrl.ctrl_io_base], eax
call dword2str call dword2str
call SysMsgBoardStr call SysMsgBoardStr
mov esi, msgIntline mov esi, msgIRQline
call SysMsgBoardStr call SysMsgBoardStr
stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x3C stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x3C
@ -646,40 +646,36 @@ proc set_ICH
ret ret
endp endp
PG_SW equ 0x003
PG_NOCACHE equ 0x018
align 4 align 4
proc reset_controller proc reset_controller
xor eax, eax xor eax, eax
mov edx, PCM_IN_CR_REG mov edx, PCM_IN_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov edx, PCM_OUT_CR_REG mov edx, PCM_OUT_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov edx, MC_IN_CR_REG mov edx, MC_IN_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov eax, RR mov eax, RR
mov edx, PCM_IN_CR_REG mov edx, PCM_IN_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov edx, PCM_OUT_CR_REG mov edx, PCM_OUT_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov edx, MC_IN_CR_REG mov edx, MC_IN_CR_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
ret ret
endp endp
align 4 align 4
proc init_codec proc init_codec
locals locals
counter dd ? counter dd ?
endl endl
mov esi, msgControl mov esi, msgControl
call SysMsgBoardStr call SysMsgBoardStr
@ -701,38 +697,38 @@ proc init_codec
test eax, CTRL_ST_CREADY test eax, CTRL_ST_CREADY
jnz .ready jnz .ready
call reset_codec call reset_codec
and eax, eax and eax, eax
jz .err jz .err
xor edx, edx ;ac_reg_0 xor edx, edx ;ac_reg_0
call [ctrl.codec_write16] call [ctrl.codec_write16]
xor eax, eax xor eax, eax
mov edx, CODEC_REG_POWERDOWN mov edx, CODEC_REG_POWERDOWN
call [ctrl.codec_write16] call [ctrl.codec_write16]
mov [counter], 200 ; total 200*5 ms = 1s mov [counter], 200 ; total 200*5 ms = 1s
.wait: .wait:
mov edx, CODEC_REG_POWERDOWN mov edx, CODEC_REG_POWERDOWN
call [ctrl.codec_read16] call [ctrl.codec_read16]
and eax, 0x0F and eax, 0x0F
cmp eax, 0x0F cmp eax, 0x0F
jz .ready jz .ready
mov eax, 5000 ; wait 5 ms mov eax, 5000 ; wait 5 ms
call StallExec call StallExec
sub [counter] , 1 sub [counter] , 1
jnz .wait jnz .wait
.err: .err:
xor eax, eax ; timeout error xor eax, eax ; timeout error
ret ret
.ready: .ready:
call detect_codec call detect_codec
xor eax, eax xor eax, eax
inc eax inc eax
ret ret
endp endp
align 4 align 4
@ -866,22 +862,22 @@ endp
align 4 align 4
play: play:
mov eax, 16 mov eax, 16
mov [ctrl.lvi_reg], eax mov [ctrl.lvi_reg], eax
mov edx, PCM_OUT_LVI_REG mov edx, PCM_OUT_LVI_REG
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov edx, PCM_OUT_CR_REG mov edx, PCM_OUT_CR_REG
mov ax, 0x1D mov ax, 0x1D
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
xor eax, eax xor eax, eax
ret ret
align 4 align 4
stop: stop:
mov edx, PCM_OUT_CR_REG mov edx, PCM_OUT_CR_REG
mov ax, 0x0 mov ax, 0x0
call [ctrl.ctrl_write8] call [ctrl.ctrl_write8]
mov ax, 0x1c mov ax, 0x1c
mov edx, PCM_OUT_SR_REG mov edx, PCM_OUT_SR_REG
@ -988,17 +984,17 @@ endp
align 4 align 4
proc codec_check_ready proc codec_check_ready
mov edx, CTRL_ST mov edx, CTRL_ST
call [ctrl.ctrl_read32] call [ctrl.ctrl_read32]
and eax, CTRL_ST_CREADY and eax, CTRL_ST_CREADY
jz .not_ready jz .not_ready
xor eax, wax xor eax, wax
inc eax inc eax
ret ret
.not_ready: .not_ready:
xor eax, eax xor eax, eax
ret ret
endp endp
align 4 align 4
@ -1057,75 +1053,67 @@ endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 4 align 4
proc codec_io_r16 codec_io_r16:
add edx, [ctrl.codec_io_base] add edx, [ctrl.codec_io_base]
in ax, dx in ax, dx
ret ret
endp
align 4 align 4
proc codec_io_w16 codec_io_w16:
add edx, [ctrl.codec_io_base] add edx, [ctrl.codec_io_base]
out dx, ax out dx, ax
ret ret
endp
align 4 align 4
proc ctrl_io_r8 ctrl_io_r8:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
in al, dx in al, dx
ret ret
endp
align 4 align 4
proc ctrl_io_r16 ctrl_io_r16:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
in ax, dx in ax, dx
ret ret
endp
align 4 align 4
proc ctrl_io_r32 ctrl_io_r32:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
in eax, dx in eax, dx
ret ret
endp
align 4 align 4
proc ctrl_io_w8 ctrl_io_w8:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
out dx, al out dx, al
ret ret
endp
align 4 align 4
proc ctrl_io_w16 ctrl_io_w16:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
out dx, ax out dx, ax
ret ret
endp
align 4 align 4
proc ctrl_io_w32 ctrl_io_w32:
add edx, [ctrl.ctrl_io_base] add edx, [ctrl.ctrl_io_base]
out dx, eax out dx, eax
ret ret
endp
align 4 align 4
dword2str: dword2str:
mov esi, hex_buff mov esi, hex_buff
mov ecx, -8 mov ecx, -8
@@: @@:
rol eax, 4 rol eax, 4
mov ebx, eax mov ebx, eax
and ebx, 0x0F and ebx, 0x0F
mov bl, [ebx+hexletters] mov bl, [ebx+hexletters]
mov [8+esi+ecx], bl mov [8+esi+ecx], bl
inc ecx inc ecx
jnz @B jnz @B
ret ret
hexletters db '0123456789ABCDEF' hexletters db '0123456789ABCDEF'
hex_buff db 8 dup(0),13,10,0 hex_buff db 8 dup(0),13,10,0
@ -1134,14 +1122,14 @@ hex_buff db 8 dup(0),13,10,0
include "codec.inc" include "codec.inc"
align 4 align 4
devices dd (0x5000 shl 16)+0x1274,msgEnsoniq,set_ICH devices dd (0x5000 shl 16)+0x1274,msgEnsoniq,set_ICH
dd (0x5880 shl 16)+0x1274,msgVibra128,set_ICH dd (0x5880 shl 16)+0x1274,msgVibra128,set_ICH
dd 0 ;terminator dd 0 ;terminator
version dd 0x00040000 version dd 0x00040004
msgEnsoniq db 'Ensonic 1371',0 msgEnsoniq db 'Ensonic 1371',13,10,0
msgVibra128 db 'Sound Blaster AudioPCI Vibra 128',0 msgVibra128 db 'Sound Blaster AudioPCI Vibra 128',13,10,0
sz_sound_srv db 'SOUND',0 sz_sound_srv db 'SOUND',0
@ -1168,7 +1156,7 @@ msgStatus db 'global status ',0
msgControl db 'global control ',0 msgControl db 'global control ',0
msgPCIcmd db 'PCI command ',0 msgPCIcmd db 'PCI command ',0
msgIObase db 'IO base ',0 msgIObase db 'IO base ',0
msgIntline db 'Interrupt line ',0 msgIRQline db 'IRQ line ',0
section '.data' data readable writable align 16 section '.data' data readable writable align 16

View File

@ -72,10 +72,10 @@ SOCKET_INTERFACE equ 53
; 128KB allocated for the stack and network driver buffers and other ; 128KB allocated for the stack and network driver buffers and other
; data requirements ; data requirements
stack_data_start equ 0x700000 ;stack_data_start equ 0x700000
eth_data_start equ 0x700000 ;eth_data_start equ 0x700000
stack_data equ 0x704000 ;stack_data equ 0x704000
stack_data_end equ 0x71ffff ;stack_data_end equ 0x71ffff
; 32 bit word ; 32 bit word
stack_config equ stack_data stack_config equ stack_data
@ -123,7 +123,7 @@ last_1hsTick equ queueList + ( 2 * NUMQUEUEENTRIES )
resendQ equ 0x770000 ;resendQ equ 0x770000
resendBuffer equ resendQ + ( 4 * NUMRESENDENTRIES ) ; for TCP resendBuffer equ resendQ + ( 4 * NUMRESENDENTRIES ) ; for TCP