16Mb version

git-svn-id: svn://kolibrios.org@212 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2006-11-16 10:59:49 +00:00
parent 763bc3ad70
commit f96c2c867c
4 changed files with 32 additions and 34 deletions

View File

@ -1,5 +1,5 @@
HEAP_BASE equ 0x01000000
HEAP_BASE equ 0x00C00000
;HEAP_SIZE equ 0x01000000
struc MEM_BLOCK
@ -126,7 +126,7 @@ proc init_kernel_heap
mov [ebx+block_base], HEAP_BASE+4096*MEM_BLOCK_SIZE
mov ecx, [MEM_AMOUNT]
sub ecx, 0x01000000 + 4096*MEM_BLOCK_SIZE
sub ecx, HEAP_BASE + 4096*MEM_BLOCK_SIZE
mov [heap_size], ecx
mov [heap_free], ecx
mov [ebx+block_size], ecx

View File

@ -1,10 +1,11 @@
tmp_page_tab equ 0x01000000
tmp_page_tab equ 0x00C00000
align 4
proc mem_test
mov eax, cr0
or eax, (CR0_CD+CR0_NW);disable caching
and eax, not (CR0_CD+CR0_NW)
or eax, CR0_CD ;disable caching
mov cr0, eax
wbinvd ;invalidate cache
@ -17,7 +18,7 @@ proc mem_test
xchg ebx, dword [edi]
je @b
and eax, not (CR0_CD+CR0_NW)
and eax, not (CR0_CD+CR0_NW) ;enable caching
mov cr0, eax
mov eax, edi
ret
@ -48,21 +49,21 @@ proc init_memEx
mov dword [sys_pgdir+4], eax
add eax, 0x00400000
mov dword [sys_pgdir+8], eax
add eax, 0x00400000
mov dword [sys_pgdir+12], eax
; add eax, 0x00400000
; mov dword [sys_pgdir+12], eax
mov dword [sys_pgdir+0x600], sys_pgdir+PG_SW
mov ecx, [pg_data.kernel_tables]
sub ecx, 4
sub ecx, 3 ;4
mov eax, tmp_page_tab+PG_SW
mov edi, sys_pgdir+16
mov edi, sys_pgdir+12 ;16
jmp .map_kernel_tabs
.no_PSE:
mov eax, PG_SW
mov esi, tmp_page_tab
mov ecx, 4096/4 ;0x0 - 0x00FFFFFF
mov ecx, 3072/4; 4096/4 ;0x0 - 0x00FFFFFF
.map_low:
mov [esi], eax
add eax, 0x1000
@ -91,10 +92,10 @@ proc init_memEx
mov edi, tmp_page_tab
bt [cpu_caps], CAPS_PSE
jc @F
add edi, 4096*4 ;skip low kernel memory
add edi, 3072*4 ;4096*4 ;skip low kernel memory
@@:
mov ecx, [pg_data.kernel_tables]
sub ecx, 4
sub ecx, 3
shl ecx, 10
xor eax, eax
cld
@ -108,25 +109,25 @@ endp
align 4
proc init_page_map
mov edi, sys_pgmap
mov ecx, 512/4
mov ecx, 384/4
xor eax,eax
cld
rep stosd
not eax
mov ecx, [pg_data.pagemap_size]
sub ecx, 512
sub ecx, 384
shr ecx, 2
rep stosd
mov edi, sys_pgmap+512
mov edi, sys_pgmap+384
mov edx, [pg_data.pages_count]
mov ecx, [pg_data.kernel_tables]
bt [cpu_caps], CAPS_PSE
jnc @f
sub ecx, 4
sub ecx, 3
@@:
sub edx, 4096
sub edx, 3072
sub edx, ecx
mov [pg_data.pages_free], edx
@ -141,7 +142,7 @@ proc init_page_map
shl eax, cl
stosd
mov [page_start], sys_pgmap+512
mov [page_start], sys_pgmap+384
mov ebx, sys_pgmap
add ebx, [pg_data.pagemap_size]
mov [page_end], ebx

View File

@ -372,7 +372,7 @@ B32:
mov [pg_data.pagemap_size], eax
shr edx, 10
cmp edx, 4
cmp edx, 3
ja @f
inc edx ;at least 4Mb for kernel heap
@@:

View File

@ -126,9 +126,10 @@
; 3F600 -> 3FFFF basic text font I
; 40000 -> 4FFFF data of retrieved disks and partitions (Mario79)
; 50000 -> 5FFFF free (64 Kb)
; 50000 -> 50FFF main page directory
; 50200 -> 5FFFF pages bitmap
; 60000 -> 7FFFF reserved to physical memory manager
; 60000 -> 7FFFF free (128 Kb)
; 80000 -> 8FFFF additional app info, in 256 byte steps - 256 entries
;
; 00 11db name of app running
@ -200,32 +201,28 @@
; 770000 -> 777fff tcp memory ( 32 kb)
;
; 778000 -> 77ffff window skinning ( 32 kb)
; 780000 -> 7fffff reserved to physical memory manager
; 780000 -> 7fffff free (512 Kb)
;
; 800000 -> BFFFFF mapped to LFB
;
;
; C00000 -> C01FFF draw_data - 256 entries
; 800000 -> 801FFF draw_data - 256 entries
;
; 00 dword draw limit - x start
; 04 dword draw limit - y start
; 08 dword draw limit - x end
; 0C dword draw limit - y end
;
; C02000 -> C02fff free (4 Kb)
; 802000 -> 802fff free (4 Kb)
;
; C03000 -> D02fff sysint_stack_data
; 803000 -> 902fff sysint_stack_data
; - ring0 stacks for ring3 processes
; - used for interrupt handling
; - 256 entries * 4096 step
;
; D03000 -> D1ffff free (116 Kb)
; 903000 -> 91ffff free (116 Kb)
;
; D20000 -> F28000 TSS and IO map for (8192*8)=65536 ports
; (128+8192)*256 = 557956 = 0x88000
;
; 1000000 -> 3FFFFFF for applications
; 920000 -> B28000 TSS and IO map for (8192*8)=65536 ports
; (128+8192)*256 = 2129920 = 0x208000
;
; C00000 -> kernel heap