16Mb version
git-svn-id: svn://kolibrios.org@212 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
763bc3ad70
commit
f96c2c867c
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
HEAP_BASE equ 0x01000000
|
HEAP_BASE equ 0x00C00000
|
||||||
;HEAP_SIZE equ 0x01000000
|
;HEAP_SIZE equ 0x01000000
|
||||||
|
|
||||||
struc MEM_BLOCK
|
struc MEM_BLOCK
|
||||||
@ -126,7 +126,7 @@ proc init_kernel_heap
|
|||||||
mov [ebx+block_base], HEAP_BASE+4096*MEM_BLOCK_SIZE
|
mov [ebx+block_base], HEAP_BASE+4096*MEM_BLOCK_SIZE
|
||||||
|
|
||||||
mov ecx, [MEM_AMOUNT]
|
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_size], ecx
|
||||||
mov [heap_free], ecx
|
mov [heap_free], ecx
|
||||||
mov [ebx+block_size], ecx
|
mov [ebx+block_size], ecx
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
|
||||||
tmp_page_tab equ 0x01000000
|
tmp_page_tab equ 0x00C00000
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc mem_test
|
proc mem_test
|
||||||
mov eax, cr0
|
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
|
mov cr0, eax
|
||||||
wbinvd ;invalidate cache
|
wbinvd ;invalidate cache
|
||||||
|
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
mov ebx, 'TEST'
|
mov ebx, 'TEST'
|
||||||
@ -17,7 +18,7 @@ proc mem_test
|
|||||||
xchg ebx, dword [edi]
|
xchg ebx, dword [edi]
|
||||||
je @b
|
je @b
|
||||||
|
|
||||||
and eax, not (CR0_CD+CR0_NW)
|
and eax, not (CR0_CD+CR0_NW) ;enable caching
|
||||||
mov cr0, eax
|
mov cr0, eax
|
||||||
mov eax, edi
|
mov eax, edi
|
||||||
ret
|
ret
|
||||||
@ -48,21 +49,21 @@ proc init_memEx
|
|||||||
mov dword [sys_pgdir+4], eax
|
mov dword [sys_pgdir+4], eax
|
||||||
add eax, 0x00400000
|
add eax, 0x00400000
|
||||||
mov dword [sys_pgdir+8], eax
|
mov dword [sys_pgdir+8], eax
|
||||||
add eax, 0x00400000
|
; add eax, 0x00400000
|
||||||
mov dword [sys_pgdir+12], eax
|
; mov dword [sys_pgdir+12], eax
|
||||||
|
|
||||||
mov dword [sys_pgdir+0x600], sys_pgdir+PG_SW
|
mov dword [sys_pgdir+0x600], sys_pgdir+PG_SW
|
||||||
|
|
||||||
mov ecx, [pg_data.kernel_tables]
|
mov ecx, [pg_data.kernel_tables]
|
||||||
sub ecx, 4
|
sub ecx, 3 ;4
|
||||||
mov eax, tmp_page_tab+PG_SW
|
mov eax, tmp_page_tab+PG_SW
|
||||||
mov edi, sys_pgdir+16
|
mov edi, sys_pgdir+12 ;16
|
||||||
|
|
||||||
jmp .map_kernel_tabs
|
jmp .map_kernel_tabs
|
||||||
.no_PSE:
|
.no_PSE:
|
||||||
mov eax, PG_SW
|
mov eax, PG_SW
|
||||||
mov esi, tmp_page_tab
|
mov esi, tmp_page_tab
|
||||||
mov ecx, 4096/4 ;0x0 - 0x00FFFFFF
|
mov ecx, 3072/4; 4096/4 ;0x0 - 0x00FFFFFF
|
||||||
.map_low:
|
.map_low:
|
||||||
mov [esi], eax
|
mov [esi], eax
|
||||||
add eax, 0x1000
|
add eax, 0x1000
|
||||||
@ -91,10 +92,10 @@ proc init_memEx
|
|||||||
mov edi, tmp_page_tab
|
mov edi, tmp_page_tab
|
||||||
bt [cpu_caps], CAPS_PSE
|
bt [cpu_caps], CAPS_PSE
|
||||||
jc @F
|
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]
|
mov ecx, [pg_data.kernel_tables]
|
||||||
sub ecx, 4
|
sub ecx, 3
|
||||||
shl ecx, 10
|
shl ecx, 10
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
cld
|
cld
|
||||||
@ -108,25 +109,25 @@ endp
|
|||||||
align 4
|
align 4
|
||||||
proc init_page_map
|
proc init_page_map
|
||||||
mov edi, sys_pgmap
|
mov edi, sys_pgmap
|
||||||
mov ecx, 512/4
|
mov ecx, 384/4
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
cld
|
cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
not eax
|
not eax
|
||||||
mov ecx, [pg_data.pagemap_size]
|
mov ecx, [pg_data.pagemap_size]
|
||||||
sub ecx, 512
|
sub ecx, 384
|
||||||
shr ecx, 2
|
shr ecx, 2
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
mov edi, sys_pgmap+512
|
mov edi, sys_pgmap+384
|
||||||
mov edx, [pg_data.pages_count]
|
mov edx, [pg_data.pages_count]
|
||||||
mov ecx, [pg_data.kernel_tables]
|
mov ecx, [pg_data.kernel_tables]
|
||||||
bt [cpu_caps], CAPS_PSE
|
bt [cpu_caps], CAPS_PSE
|
||||||
jnc @f
|
jnc @f
|
||||||
sub ecx, 4
|
sub ecx, 3
|
||||||
@@:
|
@@:
|
||||||
sub edx, 4096
|
sub edx, 3072
|
||||||
sub edx, ecx
|
sub edx, ecx
|
||||||
mov [pg_data.pages_free], edx
|
mov [pg_data.pages_free], edx
|
||||||
|
|
||||||
@ -141,7 +142,7 @@ proc init_page_map
|
|||||||
shl eax, cl
|
shl eax, cl
|
||||||
stosd
|
stosd
|
||||||
|
|
||||||
mov [page_start], sys_pgmap+512
|
mov [page_start], sys_pgmap+384
|
||||||
mov ebx, sys_pgmap
|
mov ebx, sys_pgmap
|
||||||
add ebx, [pg_data.pagemap_size]
|
add ebx, [pg_data.pagemap_size]
|
||||||
mov [page_end], ebx
|
mov [page_end], ebx
|
||||||
|
@ -372,7 +372,7 @@ B32:
|
|||||||
mov [pg_data.pagemap_size], eax
|
mov [pg_data.pagemap_size], eax
|
||||||
|
|
||||||
shr edx, 10
|
shr edx, 10
|
||||||
cmp edx, 4
|
cmp edx, 3
|
||||||
ja @f
|
ja @f
|
||||||
inc edx ;at least 4Mb for kernel heap
|
inc edx ;at least 4Mb for kernel heap
|
||||||
@@:
|
@@:
|
||||||
|
@ -126,9 +126,10 @@
|
|||||||
; 3F600 -> 3FFFF basic text font I
|
; 3F600 -> 3FFFF basic text font I
|
||||||
; 40000 -> 4FFFF data of retrieved disks and partitions (Mario79)
|
; 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
|
; 80000 -> 8FFFF additional app info, in 256 byte steps - 256 entries
|
||||||
;
|
;
|
||||||
; 00 11db name of app running
|
; 00 11db name of app running
|
||||||
@ -200,32 +201,28 @@
|
|||||||
; 770000 -> 777fff tcp memory ( 32 kb)
|
; 770000 -> 777fff tcp memory ( 32 kb)
|
||||||
;
|
;
|
||||||
; 778000 -> 77ffff window skinning ( 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
|
; 800000 -> 801FFF draw_data - 256 entries
|
||||||
;
|
|
||||||
;
|
|
||||||
; C00000 -> C01FFF draw_data - 256 entries
|
|
||||||
;
|
;
|
||||||
; 00 dword draw limit - x start
|
; 00 dword draw limit - x start
|
||||||
; 04 dword draw limit - y start
|
; 04 dword draw limit - y start
|
||||||
; 08 dword draw limit - x end
|
; 08 dword draw limit - x end
|
||||||
; 0C dword draw limit - y 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
|
; - ring0 stacks for ring3 processes
|
||||||
; - used for interrupt handling
|
; - used for interrupt handling
|
||||||
; - 256 entries * 4096 step
|
; - 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
|
; 920000 -> B28000 TSS and IO map for (8192*8)=65536 ports
|
||||||
; (128+8192)*256 = 557956 = 0x88000
|
; (128+8192)*256 = 2129920 = 0x208000
|
||||||
;
|
|
||||||
; 1000000 -> 3FFFFFF for applications
|
|
||||||
;
|
;
|
||||||
|
; C00000 -> kernel heap
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user