Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 840 → Rev 841

/kernel/branches/kolibri_pe/const.inc
330,8 → 330,10
tss TSS
end virtual
 
sys_pgmap equ (OS_BASE+0x033F000)
LAST_PAGE equ 0x0340000
 
sys_pgmap equ (OS_BASE+LAST_PAGE)
 
twdw equ 0x3000 ;(CURRENT_TASK-window_data)
 
std_application_base_address equ new_app_base
/kernel/branches/kolibri_pe/core/heap.inc
102,8 → 102,8
not eax
rep stosd
 
stdcall alloc_pages, dword 32
add eax, OS_BASE
mov ecx, 128*1024
fastcall _balloc
 
mov [mem_block_start], mem_block_map
mov [mem_block_end], mem_block_map+512
/kernel/branches/kolibri_pe/core/memory.inc
1306,3 → 1306,14
endp
 
 
align 4
_balloc: ; gcc fastcall
 
mov eax, [_last_page]
add ecx, 4095
and ecx, -4096
add ecx, eax
mov [_last_page], ecx
add eax, OS_BASE
ret
 
/kernel/branches/kolibri_pe/data32.inc
109,6 → 109,9
kernel_file db 'KERNEL MNT'
 
align 4
 
_last_page dd LAST_PAGE
 
;supported videomodes
mode_1280_1024_32:
dw 1280,1024,32,60
/kernel/branches/kolibri_pe/kernel.asm
58,6 → 58,8
$Revision$
 
 
fastcall equ call
 
USE_COM_IRQ equ 1 ;make irq 3 and irq 4 available for PCI devices
 
include "proc32.inc"
320,7 → 322,8
shr eax, 3
and eax, -4
mov [pg_data.pagemap_size], eax
 
mov ecx, eax
fastcall _balloc
ret
 
align 4
333,7 → 336,9
cld
rep stosd
 
mov ecx, 0x800000 ;reserve 8 Mb
xchg bx, bx
 
mov ecx, [_last_page]
mov edx, [pg_data.pages_count]
shr ecx, 12
sub edx, ecx
395,6 → 400,43
 
call init_mem
 
mov ecx, 1280*1024
fastcall _balloc
mov [_display_data], eax
 
mov ecx, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
(unpack.lc+unpack.lp)))*4
fastcall _balloc
mov [unpack.p], eax
 
mov ecx, (RING0_STACK_SIZE+512)
fastcall _balloc
mov [os_stack_seg], eax
 
lea esp, [eax+RING0_STACK_SIZE]
 
mov [tss._ss0], os_stack
mov [tss._esp0], esp
mov [tss._esp], esp
mov [tss._cs],os_code
mov [tss._ss],os_stack
mov [tss._ds],app_data
mov [tss._es],app_data
mov [tss._fs],app_data
mov [tss._gs],app_data
mov [tss._io],128
;Add IO access table - bit array of permitted ports
mov edi, tss._io_map_0
xor eax, eax
not eax
mov ecx, 8192/4
rep stosd ; access to 4096*8=65536 ports
 
mov ax,tss0
ltr ax
 
call init_kernel_heap ; FIXME initialize heap after pager
 
call init_page_map
 
 
548,34 → 590,6
call build_interrupt_table
lidt [idtreg]
 
call init_kernel_heap
 
stdcall alloc_pages, (RING0_STACK_SIZE+512) shr 12
add eax, OS_BASE
mov [os_stack_seg], eax
 
lea esp, [eax+RING0_STACK_SIZE]
 
mov [tss._ss0], os_stack
mov [tss._esp0], esp
mov [tss._esp], esp
mov [tss._cs],os_code
mov [tss._ss],os_stack
mov [tss._ds],app_data
mov [tss._es],app_data
mov [tss._fs],app_data
mov [tss._gs],app_data
mov [tss._io],128
;Add IO access table - bit array of permitted ports
mov edi, tss._io_map_0
xor eax, eax
not eax
mov ecx, 8192/4
rep stosd ; access to 4096*8=65536 ports
 
mov ax,tss0
ltr ax
 
mov [LFBSize], 0x800000
call init_LFB
call init_fpu
609,15 → 623,6
add eax, ebx
mov [ipc_ptab], eax
 
stdcall alloc_pages, (1280*1024)/4096
add eax, OS_BASE
mov [_display_data], eax
 
stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \
(unpack.lc+unpack.lp)))*4
 
mov [unpack.p], eax
 
call init_events
mov eax, srv.fd-SRV_FD_OFFSET
mov [srv.fd], eax
938,13 → 943,6
and al,00000010b
loopnz @b
 
; mov al, 0xED ; svetodiody - only for testing!
; call kb_write
; call kb_read
; mov al, 111b
; call kb_write
; call kb_read
 
mov al, 0xF3 ; set repeat rate & delay
call kb_write
; call kb_read