From cda72a890690aca69ba0ab6a6074f34d78fc0930 Mon Sep 17 00:00:00 2001 From: Ivan Poddubny Date: Mon, 17 Oct 2005 15:53:11 +0000 Subject: [PATCH] Small fixes for sched.inc & sys32.inc Less code, same work. Updated memmap.inc git-svn-id: svn://kolibrios.org@10 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/sched.inc | 23 +++++++---------------- kernel/trunk/core/sys32.inc | 23 ++++++++--------------- kernel/trunk/memmap.inc | 2 +- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/kernel/trunk/core/sched.inc b/kernel/trunk/core/sched.inc index 6a82809e2a..c4accd9f41 100644 --- a/kernel/trunk/core/sched.inc +++ b/kernel/trunk/core/sched.inc @@ -40,7 +40,6 @@ irq0: mov ebx,[0x3000] - xor esi,esi ;esi - should we change task? cmp [0xffff], byte 1 je .do_not_change_task @@ -66,20 +65,11 @@ irq0: mov [0x3000],ebx mov [0x3010],edi - jmp @f .do_not_change_task: - inc esi ;set don't change task flag - @@: call _rdtsc mov [edi+0x18],eax - cmp [0xffff],byte 0 - je @f - dec byte [0xffff] - @@: - - shl ebx, 3 xor eax, eax add ebx, tss0 @@ -90,14 +80,15 @@ irq0: mov dx,0x20 out dx,al - test esi,esi ; skip jmp to TSS if we aren't going to switch tasks - jnz @f - -.switch: - inc [context_counter] ;noname & halyavin + cmp [0xffff],byte 0 + je .switch + dec byte [0xffff] + jmp @f + .switch: jmp pword [0xB000] - + inc [context_counter] ;noname & halyavin @@: + pop es ds popad iret diff --git a/kernel/trunk/core/sys32.inc b/kernel/trunk/core/sys32.inc index b77475e990..7dd0bed04c 100644 --- a/kernel/trunk/core/sys32.inc +++ b/kernel/trunk/core/sys32.inc @@ -282,12 +282,15 @@ show_error_parameters: mov eax,[0x3000] shl eax,8 cmp [0x80000+eax+0xB0],byte 0 - jnz .system_error - + jz @f + mov esi,system_error + call sys_msg_board_str + @@: + mov eax,[0x3000] imul eax,tss_step mov eax,[eax+tss_data+l.eip-tss_sceleton] -.out_eip: + mov [write_error_to],process_eip+43 call writehex @@ -301,22 +304,13 @@ show_error_parameters: call sys_msg_board_str ret - -.system_error: - mov esi,system_error - call sys_msg_board_str - mov eax,[0x3000] - shl eax,7 - mov eax,[eax+0x298000+l.eip-tss_sceleton] - jmp .out_eip - ; irq1 -> hid/keyboard.inc -macro irqhh [num] +macro irqh [num] { forward p_irq#num : @@ -325,7 +319,7 @@ macro irqhh [num] jmp irq_c } -irqhh 2,3,4,5,6,7,8,9,10,11,12,14,15 +irqh 2,3,4,5,6,7,8,9,10,11,12,14,15 irq_c: push ds es @@ -359,7 +353,6 @@ irqD: iret - irqhandler: push edi diff --git a/kernel/trunk/memmap.inc b/kernel/trunk/memmap.inc index ec8ffe5364..7051353364 100644 --- a/kernel/trunk/memmap.inc +++ b/kernel/trunk/memmap.inc @@ -193,7 +193,7 @@ ; 600000 -> 6FFFFF hd cache ; ; 700000 -> 71ffff tcp memory (128 kb) -; 720000 -> 75ffff interrupt stacks (256 kpl * 1024) +; 720000 -> 75ffff free (256 kb) ; ; 760000 -> 76ffff !vrr driver ; 770000 -> 777fff tcp memory ( 32 kb)