Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 565 → Rev 566

/kernel/trunk/blkdev
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/boot
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/bus/pci
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/bus
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/core/memory.inc
519,7 → 519,7
;èñïîëüçîâàíèÿ. Îøèáêà
.alloc:
call alloc_page
and eax, eax
test eax, eax
jz .fail
 
stdcall map_page,[ebp-4],eax,dword PG_UW
563,7 → 563,7
; copy-on-write protection
 
call alloc_page
and eax, eax
test eax, eax
jz .fail
 
push eax
787,7 → 787,6
jz .no_ipc_area
 
mov ebx, edi
; add edi, new_app_base
and ebx, 0xFFF
mov [dst_offset], ebx
 
812,9 → 811,8
cmp dword [edi], 0
jnz .ipc_blocked ;if dword [buffer]<>0 - ipc blocked now
 
mov ebx, dword [edi+4]
mov edx, ebx
add ebx, 8
mov edx, dword [edi+4]
lea ebx, [edx+8]
add ebx, [msg_size]
cmp ebx, [buf_size]
ja .buffer_overflow ;esi<0 - not enough memory in buffer
/kernel/trunk/core/sys32.inc
47,8 → 47,13
dd except_16, e17,e18, except_19
times 12 dd unknown_interrupt
 
dd irq0 , irq_serv.irq_1, p_irq2 , p_irq3 ;irq_serv.irq_3
dd p_irq4 ,irq_serv.irq_5,p_irq6,irq_serv.irq_7
dd irq0, irq_serv.irq_1, p_irq2
if USE_COM_IRQ
dd irq_serv.irq_3, irq_serv.irq_4
else
dd p_irq3, p_irq4
end if
dd irq_serv.irq_5, p_irq6, irq_serv.irq_7
dd irq_serv.irq_8, irq_serv.irq_9, irq_serv.irq_10
dd irq_serv.irq_11,irq_serv.irq_12,irqD ,p_irq14,p_irq15
 
/kernel/trunk/core
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/detect
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/docs
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/drivers/sound.asm
14,15 → 14,21
API_VERSION equ 0x01000100
 
DEBUG equ 1
DEBUG_IRQ equ 0
 
REMAP_IRQ equ 0
USE_COM_IRQ equ 0 ;make irq 3 and irq 4 available for PCI devices
IRQ_REMAP equ 0
IRQ_LINE equ 0
 
 
;irq 0,1,2,8,12,13 íåäîñòóïíû
; FEDCBA9876543210
VALID_IRQ equ 1100111011111000b
ATTCH_IRQ equ 0000111010100000b
 
if USE_COM_IRQ
ATTCH_IRQ equ 0000111010111000b
end if
 
CPU_FREQ equ 2600d
 
314,11 → 320,6
test eax, eax
jz .fail
 
; if DEBUG
; mov esi, msgInitCodec
; call SysMsgBoardStr
; end if
 
call init_codec
test eax, eax
jz .fail
328,16 → 329,37
 
mov esi, msgPrimBuff
call SysMsgBoardStr
 
call create_primary_buff
mov esi, msgDone
call SysMsgBoardStr
 
if REMAP_IRQ
if IRQ_REMAP
pushf
cli
 
; call get_LPC_bus ;ïðîâåðêà íà èíòåëëîâñêèé ÷èïñåò
; cmp eax, -1 ;ìîæíî ïðîïóñòèòü
; jz .fail
mov [lpc_bus], 0 ;eax
call remap_irq
mov ebx, [ctrl.int_line]
in al, 0xA1
mov ah, al
in al, 0x21
test ebx, ebx
jz .skip
bts ax, bx
.skip
bts ax, IRQ_LINE
out 0x21, al
mov al, ah
out 0xA1, al
 
stdcall PciWrite8, 0, 0xF8, 0x61, IRQ_LINE
 
mov dx, 0x4d0
in al, dx
bts ax, IRQ_LINE
out dx, al
mov [ctrl.int_line], IRQ_LINE
popf
mov esi, msgRemap
call SysMsgBoardStr
end if
 
mov eax, VALID_IRQ
450,32 → 472,13
restore output
restore out_size
 
 
align 4
proc remap_irq ;for Intel chipsets ONLY !!!
mov eax, VALID_IRQ
bt eax, IRQ_LINE
jnc .exit
 
mov edx, 0x4D0
in ax,dx
bts ax, IRQ_LINE
out dx, aX
 
stdcall PciWrite8, dword 0, dword 0xF8, dword 0x61, dword IRQ_LINE
mov [ctrl.int_line], IRQ_LINE
 
.exit:
ret
endp
 
align 4
proc ac97_irq
 
; if DEBUG
; mov esi, msgIRQ
; call SysMsgBoardStr
; end if
if DEBUG_IRQ
mov esi, msgIRQ
call SysMsgBoardStr
end if
 
mov edx, PCM_OUT_CR_REG
mov al, 0x10; 0x10
686,45 → 689,6
endp
 
align 4
proc get_LPC_bus ;for Intel chipsets ONLY !!!
locals
last_bus dd ?
bus dd ?
endl
 
xor eax, eax
mov [bus], eax
inc eax
call PciApi
cmp eax, -1
je .err
 
mov [last_bus], eax
.next_bus:
stdcall PciRead32, [bus], dword 0xF8, dword 0
test eax, eax
jz .next
cmp eax, -1
je .next
 
cmp eax, 0x24D08086
je .found
.next:
mov eax, [bus]
inc eax
cmp eax, [last_bus]
mov [bus], eax
jna .next_bus
.err:
xor eax, eax
dec eax
ret
.found:
mov eax, [bus]
ret
endp
 
align 4
proc init_controller
 
stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 4
785,8 → 749,24
call dword2str
call SysMsgBoardStr
 
;;patch for some ugly BIOS
cmp [ctrl.vendor], VID_INTEL
jne .default
 
mov esi, msgIrqMap
call SysMsgBoardStr
stdcall PciRead8, 0, 0xF8, 0x61
and eax, 0xFF
call dword2str
call SysMsgBoardStr
btr eax, 7 ;when bit 7 set remap disabled
jnc @F
xor eax, eax
jmp @F
.default:
stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x3C
and eax, 0xFF
@@:
mov [ctrl.int_line], eax
 
stdcall PciRead8, [ctrl.bus], [ctrl.devfn], dword 0x41
1466,10 → 1446,13
msgPlay db 'start play', 13,10,0
msgStop db 'stop play', 13,10,0
;msgNotify db 'call notify',13,10,0
;msgIRQ db 'AC97 IRQ', 13,10,0
msgIRQ db 'AC97 IRQ', 13,10,0
msgInitCtrl db 'init controller',13,10,0
;msgInitCodec db 'init codec',13,10,0
msgPrimBuff db 'create primary buffer',13,10,0
msgPrimBuff db 'create primary buffer ...',0
msgDone db 'done',13,10,0
msgRemap db 'Remap IRQ',13,10,0
msgIrqMap db 'irq remap ',0
;msgReg db 'set service handler',13,10,0
msgOk db 'service installed',13,10,0
msgCold db 'cold reset',13,10,0
/kernel/trunk/fs
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/gui
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/hid
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/kernel.asm
57,6 → 57,8
 
$Revision$
 
USE_COM_IRQ equ 0 ;make irq 3 and irq 4 available for PCI devices
 
include "proc32.inc"
include "kglobals.inc"
include "lang.inc"
/kernel/trunk/network/eth_drv/drivers
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/network/eth_drv
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/network
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/skin
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/sound
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/video
Property changes:
Added: svn:ignore
+*.mnt
+lang.inc
+*.bat
+out.txt
+scin*
+*.obj
/kernel/trunk/.
Property changes:
Modified: svn:ignore
*.bat
out.txt
scin*
+*.obj