Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 417 → Rev 416

/kernel/branches/flat_kernel/drivers/uart.inc
164,11 → 164,7
 
UART_VERSION equ 0x12345678 ;debug
 
proc init_uart_service stdcall, state:dword
 
cmp [state], 1
jne .stop
 
init_uart_service:
mov eax, UART_SIZE
call malloc
test eax, eax
245,15 → 241,11
 
stdcall attach_int_handler, COM_1_IRQ, com_1_isr
stdcall reg_service, sz_uart_srv, uart_proc
mov [eax+SRV.entry], init_uart_service
ret
.fail:
.stop:
xor eax, eax
ret
endp
 
 
handle equ IOCTL.handle
io_code equ IOCTL.io_code
input equ IOCTL.input
/kernel/branches/flat_kernel/drivers/ati2d.asm
65,8 → 65,9
R9800P equ 0x4E48 ;R350
R9800XT equ 0x4E4A ;R360
 
OS_BASE equ 0x80000000
SLOT_BASE equ (OS_BASE+0x0080000)
OS_BASE equ 0
new_app_base equ 0x80000000
SLOT_BASE equ 0x0080000
 
PG_SW equ 0x003
PG_NOCACHE equ 0x018
/kernel/branches/flat_kernel/drivers/infinity.asm
27,12 → 27,10
DEBUG equ 1
 
 
OS_BASE equ 0x80000000
SLOT_BASE equ (OS_BASE+0x0080000)
TASK_COUNT equ (OS_BASE+0x0003004)
CURRENT_TASK equ (OS_BASE+0x0003000)
OS_BASE equ 0
new_app_base equ 0x80000000
SLOT_BASE equ OS_BASE+0x0080000
 
 
CAPS_SSE2 equ 26
PG_SW equ 0x003
 
167,7 → 165,7
jne @F
mov eax, [edi+output]
mov eax, [eax]
mov [eax], dword SOUND_VERSION
mov [eax+new_app_base], dword SOUND_VERSION
xor eax, eax
ret
@@:
179,7 → 177,7
pop edi
mov ecx, [edi+output]
mov ecx, [ecx]
mov [ecx], ebx
mov [ecx+new_app_base], ebx
ret
@@:
mov ebx, [edi+input]
208,7 → 206,7
movzx eax, word [edx+STREAM.format]
mov ecx, [edi+output]
mov ecx, [ecx]
mov [ecx], eax
mov [ecx+new_app_base], eax
xor eax, eax
ret
@@:
229,12 → 227,13
pop edi
mov ecx, [edi+output]
mov ecx, [ecx]
mov [ecx], ebx
mov [ecx+new_app_base], ebx
ret
@@:
cmp eax, SND_SETBUFF
jne @F
mov eax, [ebx+4]
add eax, new_app_base
stdcall set_buffer, [ebx],eax,[ebx+8],[ebx+12]
ret
@@:
249,6 → 248,8
mov eax, [edi+output]
mov ecx, [eax]
mov eax, [eax+4]
add ecx, new_app_base
add eax, new_app_base
stdcall GetBufferVol,[ebx],ecx,eax
ret
@@:
262,7 → 263,7
mov eax, [edx+STREAM.pan]
mov ebx, [edi+output]
mov ebx, [ebx]
mov [ebx], eax
mov [ebx+new_app_base], eax
xor eax, eax
ret
@@:
270,6 → 271,7
jne @F
 
mov eax, [ebx+4]
add eax, new_app_base
stdcall wave_out, [ebx],eax,[ebx+8]
ret
@@:
290,7 → 292,7
mov eax, [edx+STREAM.in_size]
mov ecx, [edi+output]
mov ecx, [ecx]
mov [ecx], eax
mov [ecx+new_app_base], eax
xor eax, eax
ret
@@:
306,6 → 308,10
restore output
restore out_size
 
TASK_COUNT equ 0x0003004
CURRENT_TASK equ 0x0003000
 
 
align 4
proc CreateBuffer stdcall, format:dword, size:dword
locals
647,8 → 653,8
test esi, esi
jz .fail
 
cmp esi, OS_BASE
ja .fail
cmp esi, new_app_base
jb .fail
 
mov [state_saved], 0
 
/kernel/branches/flat_kernel/drivers/sis.asm
84,6 → 84,7
CODEC_REG_POWERDOWN equ 0x26
CODEC_REG_ST equ 0x26
 
 
DEV_PLAY equ 1
DEV_STOP equ 2
DEV_CALLBACK equ 3
242,8 → 243,9
 
EVENT_NOTIFY equ 0x00000200
 
OS_BASE equ 0x80000000
OS_BASE equ 0; 0x80400000
SLOT_BASE equ OS_BASE+0x0080000
new_app_base equ 0x80000000
 
public START
public service_proc
367,15 → 369,16
cmp eax, DEV_GET_MASTERVOL
jne @F
mov ebx, [edi+output]
add ebx, new_app_base
stdcall get_master_vol, ebx
ret
;@@:
; cmp eax, DEV_GET_INFO
; jne @F
; mov ebx, [edi+output]
; stdcall get_dev_info, ebx
; ret
@@:
cmp eax, DEV_GET_INFO
jne @F
mov ebx, [edi+output]
stdcall get_dev_info, ebx
ret
@@:
.fail:
or eax, -1
ret
/kernel/branches/flat_kernel/drivers/sound.asm
270,8 → 270,9
 
EVENT_NOTIFY equ 0x00000200
 
OS_BASE equ 0x80000000
OS_BASE equ 0;
SLOT_BASE equ OS_BASE+0x0080000
new_app_base equ 0x80000000
 
public START
public service_proc
412,6 → 413,7
cmp eax, DEV_GET_MASTERVOL
jne @F
mov ebx, [edi+output]
add ebx, new_app_base
stdcall get_master_vol, ebx
ret
;@@:
1407,3 → 1409,5
 
lpc_bus rd 1
civ_val rd 1
 
 
/kernel/branches/flat_kernel/core/memory.inc
452,13 → 452,13
proc page_fault_handler
pushad
 
push eax
push edx
mov edx, 0x400 ;bocsh
mov al,0xff ;bocsh
out dx, al ;bocsh
pop edx
pop eax
; push eax
; push edx
; mov edx, 0x400 ;bocsh
; mov al,0xff ;bocsh
; out dx, al ;bocsh
; pop edx
; pop eax
 
mov ebp, esp
mov eax, cr2
/kernel/branches/flat_kernel/core/dll.inc
1,4 → 1,6
 
DRV_ENTRY equ 1
DRV_EXIT equ -1
DRV_COMPAT equ 4 ;minimal required drivers version
DRV_CURRENT equ 4 ;current drivers model version
 
/kernel/branches/flat_kernel/kernel.asm
721,7 → 721,7
cmp [IDEContrRegsBaseAddr], 0
setnz [dma_hdd]
 
stdcall init_uart_service, DRV_ENTRY
call init_uart_service
 
sti
jmp $ ; wait here for timer to take control
/kernel/branches/flat_kernel/kernel32.inc
264,7 → 264,7
 
include "network/stack.inc"
 
include "drivers/uart.inc"
include "drivers/comport.asm"
 
 
; Mouse pointer
/kernel/branches/flat_kernel/const.inc
484,9 → 484,6
SRV_FD_OFFSET equ 0x18
SRV_SIZE equ 44
 
DRV_ENTRY equ 1
DRV_EXIT equ -1
 
struc COFF_HEADER
{ .machine dw ?
.nSections dw ?
/kernel/branches/flat_kernel/bus/pci/pci32.inc
34,7 → 34,7
or al,al
jnz pci_fn_1
; PCI function 0: get pci version (AH.AL)
movzx eax,word [BOOT_VAR+0x9022]
movzx eax,word [0x2F0000+0x9022]
ret
 
pci_fn_1:
42,7 → 42,7
jnz pci_fn_2
 
; PCI function 1: get last bus in AL
mov al,[BOOT_VAR+0x9021]
mov al,[0x2F0000+0x9021]
ret
 
pci_fn_2:
49,7 → 49,7
cmp al,2
jne pci_fn_3
; PCI function 2: get pci access mechanism
mov al,[BOOT_VAR+0x9020]
mov al,[0x2F0000+0x9020]
ret
pci_fn_3:
 
108,7 → 108,7
align 4
 
pci_read_reg:
cmp byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
cmp byte [0x2F0000+0x9020],2 ;what mechanism will we use?
je pci_read_reg_2
 
; mechanism 1
238,7 → 238,7
align 4
 
pci_write_reg:
cmp byte [BOOT_VAR+0x9020],2 ;what mechanism will we use?
cmp byte [0x2F0000+0x9020],2 ;what mechanism will we use?
je pci_write_reg_2
 
; mechanism 1