From b98147a6a3aa147eb155d85add38559cb3305193 Mon Sep 17 00:00:00 2001 From: Ivan Poddubny Date: Tue, 25 Oct 2005 16:13:16 +0000 Subject: [PATCH] * Fixed a stack problem - OS task used stack at 0x30000 now it uses sysint_stack_data+4096*2 - slot 1 stack; * Some fixes for memmap.inc git-svn-id: svn://kolibrios.org@13 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 11 ++--------- kernel/trunk/memmap.inc | 15 +++++++++------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 8f3ce858f3..2011ace25e 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -527,9 +527,7 @@ include 'vmodeld.inc' call build_scheduler ; sys32.inc ; LOAD IDT - ; - lidt [cs:idtreg] ;[cs:idts] - ; + lidt [cs:idtreg] ; READ CPUID RESULT @@ -650,16 +648,11 @@ include 'vmodeld.inc' ; set default flags & stacks mov [l.eflags],dword 0x11202 ; sti and resume mov [l.ss0], os_data - ;mov [l.ss1], ring1_data - ;mov [l.ss2], ring2_data - ;mov [l.esp0], 0x52000 - ;mov [l.esp1], 0x53000 - ;mov [l.esp2], 0x54000 ; osloop - TSS mov eax,cr3 mov [l.cr3],eax mov [l.eip],osloop - mov [l.esp],0x30000 + mov [l.esp],sysint_stack_data + 4096*2 ; uses slot 1 stack mov [l.cs],os_code mov [l.ss],os_data mov [l.ds],os_data diff --git a/kernel/trunk/memmap.inc b/kernel/trunk/memmap.inc index 1e707f3f2a..6602926c66 100644 --- a/kernel/trunk/memmap.inc +++ b/kernel/trunk/memmap.inc @@ -126,8 +126,8 @@ ; FFF5 byte 1 do not draw pointer ; FFFF byte do not change task for 1/100 sec. ; -; 10000 -> 1FFFF 32 bit os -; 20000 -> 3EBFF 32 bit stack +; 10000 -> 3DBFF kernel, 32-bit run-time code (up to 183 Kb) +; 3DC00 -> 3EBFF stack at boot time (4Kb) ; 3EC00 -> 3F5FF basic text font II ; 3F600 -> 3FFFF basic text font I ; 40000 -> 4FFFF data of retrieved disks and partitions (Mario79) @@ -161,7 +161,7 @@ ; 280000 -> 281FFF ramdisk fat ; 282000 -> 283FFF floppy fat ; -; 284000 -> 29FFFF free +; 284000 -> 29FFFF free (112 Kb) ; ; 2A0000 -> 2B00ff wav device data ; 2C0000 -> 2C3fff button info @@ -200,7 +200,7 @@ ; 770000 -> 777fff tcp memory ( 32 kb) ; ; 778000 -> 77ffff window skinning ( 32 kb) -; 780000 -> 7fffff free +; 780000 -> 7fffff free (512 Kb) ; ; 800000 -> BFFFFF mapped to LFB ; @@ -213,10 +213,13 @@ ; 0C dword draw limit - y end ; 1C dword app int vector ; -; C03000 -> D11fff sysint_stack_data -; - interrupt stacks +; C03000 -> D02fff sysint_stack_data +; - ring0 stacks for ring3 processes +; - used for interrupt handling ; - 256 entries * 4096 step ; +; D03000 -> D1ffff free (116 Kb) +; ; D20000 -> F28000 TSS and IO map for (8192*8)=65536 ports ; (128+8192)*256 = 557956 = 0x88000 ;