From 905bbcc1faf476f6bc45db3012b8cb228bd87039 Mon Sep 17 00:00:00 2001 From: Ivan Poddubny Date: Thu, 27 Oct 2005 12:40:46 +0000 Subject: [PATCH] * A bug with esp0 of processes has been fixed. * Some minor corrections for memmap.inc and others git-svn-id: svn://kolibrios.org@14 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/newproce.inc | 2 +- kernel/trunk/core/sched.inc | 17 +++++++++-------- kernel/trunk/kernel.asm | 20 ++------------------ kernel/trunk/memmap.inc | 23 ++++++----------------- 4 files changed, 18 insertions(+), 44 deletions(-) diff --git a/kernel/trunk/core/newproce.inc b/kernel/trunk/core/newproce.inc index d0d429ab9..c59b7061c 100644 --- a/kernel/trunk/core/newproce.inc +++ b/kernel/trunk/core/newproce.inc @@ -498,7 +498,7 @@ new_start_application_fl: mov [l.ss0],os_data mov ebx,[new_process_place] shl ebx,12 - add ebx,sysint_stack_data + add ebx,sysint_stack_data+4096 mov [l.esp0],ebx ;copy tss to it place diff --git a/kernel/trunk/core/sched.inc b/kernel/trunk/core/sched.inc index 6eaee3c9c..746868960 100644 --- a/kernel/trunk/core/sched.inc +++ b/kernel/trunk/core/sched.inc @@ -1,6 +1,3 @@ -label next_usage_update dword at 0xB008 -label timer_ticks dword at 0xFDF0 - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; IRQ0 HANDLER (TIMER INTERRUPT) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -73,8 +70,8 @@ irq0: shl ebx, 3 xor eax, eax add ebx, tss0 - mov word [0xB004], bx ; selector - mov dword [0xB000], eax ; offset + mov word [far_jump.sel], bx ; selector + mov dword [far_jump.offs], eax ; offset mov al,0x20 ; send End Of Interrupt signal mov dx,0x20 @@ -85,7 +82,7 @@ irq0: dec byte [0xffff] jz @f .switch: - jmp pword [0xB000] + jmp pword [far_jump] inc [context_counter] ;noname & halyavin @@: @@ -94,9 +91,13 @@ irq0: iret - uglobal -context_counter dd 0 ;noname & halyavin + far_jump: + .offs dd ? + .sel dw ? + context_counter dd ? ;noname & halyavin + next_usage_update dd ? + timer_ticks dd ? endg diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 2011ace25..7b71f83f6 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -3277,10 +3277,6 @@ redrawscreen: cmp ecx,[0x3004] jle newdw2 -; jg newdw3 -; jmp newdw2 - -; newdw3: pop eax popad @@ -3455,11 +3451,6 @@ no_com1_mouse: cmp bl,3 ; full packet of three bytes ? jnz decm -; jz ps2mouse -; jmp decm - - -; ps2mouse: mov [0xfb00],byte 0 ; zero mouse block count @@ -5372,17 +5363,10 @@ syscall_reserveportarea: ; ReservePortArea and FreePortArea mov [esp+36],eax ret -align 4 +;align 4 syscall_appints: ; AppInts - - test eax,eax - jnz unknown_app_int_fn - mov edi,[0x3010] - mov [edi+draw_data-0x3000+0x1c],ebx - ret - unknown_app_int_fn: - mov [esp+36],dword -1 +; mov [esp+36],dword -1 ret align 4 diff --git a/kernel/trunk/memmap.inc b/kernel/trunk/memmap.inc index 6602926c6..eefe39c07 100644 --- a/kernel/trunk/memmap.inc +++ b/kernel/trunk/memmap.inc @@ -21,7 +21,7 @@ ; ; Runtime: ; -; 0000 -> 2FFF window_data - 256 entries +; 0000 -> 1FFF window_data - 256 entries ; ; 0000 dword x start ; 0004 dword y start @@ -32,6 +32,8 @@ ; 0018 dword color of frames ; 001C dword window flags, +30 = window drawn, +31 redraw flag ; +; 2000 -> 2FFF free +; ; 3000 -> 4FFF task list - 256 entries ; ; 00 dword process count @@ -56,12 +58,7 @@ ; ; 8000 -> A3FF used FLOPPY driver ; -; A400 -> AFFF free -; -; B000 -> B005 jump address for irq0 (task switch) -; B008 -> B00B count of ticks remaining to updating CPU usage info - -; B060 -> B0FF free +; A400 -> B0FF free ; B100 -> B2FF IDT @@ -73,16 +70,9 @@ ; D200 -> D3FF FDC controller for Fat12 ; D400 -> DFFF free ; E000 byte multitasking started -; E004 dword save for boot mem 0x24 -; E010 dword pm bank switch address -; E014 dword window multiplier ; E020 dword putpixel address ; E024 dword getpixel address ; E030 dword Vesa 1.2 pm bank switch address -; F000 dword hd partition 1 start -; F004 dword root start at partition 1 -; F008 dword root start at hd -; F100 byte 1=only os draw on screen ; F200 dword mousepicture -pointer ; F204 dword mouse appearance counter ; F300 dword x & y temp for windowmove @@ -103,11 +93,9 @@ ; FB40 byte buttons down ; FB44 byte 0 mouse down -> do not draw ; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under -; FBF0 byte multiplied window ; FBF1 byte bits per pixel ; FC00 -> FCFE com1/ps2 buffer ; FCFF com1/ps2 buffer count starting from FC00 -; FDF0 -> FDF3 timer tick inc every 1/100 sec 4 bytes ; FE00 dword screen x size ; FE04 dword screen y size ; FE08 dword screen y multiplier @@ -211,7 +199,8 @@ ; 04 dword draw limit - y start ; 08 dword draw limit - x end ; 0C dword draw limit - y end -; 1C dword app int vector +; +; C02000 -> C02fff free (4 Kb) ; ; C03000 -> D02fff sysint_stack_data ; - ring0 stacks for ring3 processes