reduce core memory

git-svn-id: svn://kolibrios.org@581 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2007-07-16 16:19:43 +00:00
parent b229fdc2c2
commit b26531da12
5 changed files with 43 additions and 53 deletions

View File

@ -470,7 +470,7 @@ iglobal
align 4 align 4
; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary ; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary
IDE_descriptor_table: IDE_descriptor_table:
dd 0x284000 dd IDE_DMA
dw 0x2000 dw 0x2000
dw 0x8000 dw 0x8000
@ -564,7 +564,7 @@ hd_read_dma:
mov eax, [esp+4] mov eax, [esp+4]
sub eax, [dma_cur_sector] sub eax, [dma_cur_sector]
shl eax, 9 shl eax, 9
add eax, OS_BASE+0x284000 add eax, (OS_BASE+IDE_DMA)
push ecx esi edi push ecx esi edi
mov esi, eax mov esi, eax
shl edi, 9 shl edi, 9
@ -583,7 +583,7 @@ hd_read_dma:
ret ret
.notread: .notread:
mov eax, IDE_descriptor_table mov eax, IDE_descriptor_table
mov dword [eax], 0x284000 mov dword [eax], IDE_DMA
mov word [eax+4], 0x2000 mov word [eax+4], 0x2000
sub eax, OS_BASE sub eax, OS_BASE
mov dx, [IDEContrRegsBaseAddr] mov dx, [IDEContrRegsBaseAddr]
@ -675,8 +675,8 @@ write_cache_chain:
shl esi, 9 shl esi, 9
call calculate_cache_2 call calculate_cache_2
add esi,eax add esi,eax
mov edi,OS_BASE+0x284000 ;HD_CACHE mov edi, (OS_BASE+IDE_DMA)
mov dword [edx], 0x284000 ;DMA_HD_MEM mov dword [edx], IDE_DMA
movzx ecx, [cache_chain_size] movzx ecx, [cache_chain_size]
shl ecx, 9 shl ecx, 9
mov word [edx+4], cx mov word [edx+4], cx

View File

@ -282,6 +282,8 @@ RAMDISK equ (OS_BASE+0x0100000)
RAMDISK_FAT equ (OS_BASE+0x0280000) RAMDISK_FAT equ (OS_BASE+0x0280000)
FLOPPY_FAT equ (OS_BASE+0x0282000) FLOPPY_FAT equ (OS_BASE+0x0282000)
IDE_DMA equ 0x284000
BgrAuxTable equ (OS_BASE+0x0298000) BgrAuxTable equ (OS_BASE+0x0298000)
; unused? ; unused?
SB16Buffer equ (OS_BASE+0x2A0000) SB16Buffer equ (OS_BASE+0x2A0000)
@ -292,30 +294,26 @@ RESERVED_PORTS equ (OS_BASE+0x02D0000)
IRQ_SAVE equ (OS_BASE+0x02E0000) IRQ_SAVE equ (OS_BASE+0x02E0000)
BOOT_VAR equ (OS_BASE+0x02f0000) BOOT_VAR equ (OS_BASE+0x02f0000)
; DMA_HD_MEM equ 0x0300000 stack_data_start equ (OS_BASE+0x0300000)
; HD_CACHE equ (OS_BASE+DMA_HD_MEM) eth_data_start equ (OS_BASE+0x0300000)
stack_data equ (OS_BASE+0x0304000)
stack_data_end equ (OS_BASE+0x031ffff)
resendQ equ (OS_BASE+0x0320000)
VMODE_BASE equ (OS_BASE+0x0328000)
skin_data equ (OS_BASE+0x0330000)
draw_data equ (OS_BASE+0x0338000);
stack_data_start equ (OS_BASE+0x0400000) BgrDrawMode equ (OS_BASE+0x033BFF4)
eth_data_start equ (OS_BASE+0x0400000) BgrDataWidth equ (OS_BASE+0x033BFF8)
stack_data equ (OS_BASE+0x0404000) BgrDataHeight equ (OS_BASE+0x033BFFC)
stack_data_end equ (OS_BASE+0x041ffff) WinMapAddress equ (OS_BASE+0x033C000)
resendQ equ (OS_BASE+0x0420000) display_data equ (OS_BASE+0x033C000) ;1024*1280=0x140000
VMODE_BASE equ (OS_BASE+0x0428000)
skin_data equ (OS_BASE+0x0430000)
draw_data equ (OS_BASE+0x0438000);
virtual at (OS_BASE+0x043BF80) virtual at (OS_BASE+0x047CF80)
tss TSS tss TSS
end virtual end virtual
BgrDrawMode equ (OS_BASE+0x043EFF4) sys_pgmap equ (OS_BASE+0x047F000)
BgrDataWidth equ (OS_BASE+0x043EFF8)
BgrDataHeight equ (OS_BASE+0x043EFFC)
WinMapAddress equ (OS_BASE+0x043F000)
display_data equ (OS_BASE+0x043F000)
sys_pgmap equ (OS_BASE+0x057F000)
HEAP_BASE equ (OS_BASE+0x0800000) HEAP_BASE equ (OS_BASE+0x0800000)
HEAP_MIN_SIZE equ 0x01000000 HEAP_MIN_SIZE equ 0x01000000

View File

@ -16,7 +16,7 @@ use32
macro align value { rb (value-1) - ($ + value-1) mod value } macro align value { rb (value-1) - ($ + value-1) mod value }
org OS_BASE+0x0428000 org OS_BASE+0x0328000
headerstart=$ headerstart=$

View File

@ -70,14 +70,6 @@ proc init_mem
mov ebx, cr4 mov ebx, cr4
or ebx, CR4_PSE or ebx, CR4_PSE
mov eax, PG_LARGE+PG_SW mov eax, PG_LARGE+PG_SW
; bt [cpu_caps-OS_BASE], CAPS_PGE
; jnc @F
; or eax, PG_GLOBAL
; or ebx, CR4_PGE
;
;@@:
mov cr4, ebx mov cr4, ebx
dec [pg_data.kernel_tables-OS_BASE] dec [pg_data.kernel_tables-OS_BASE]

View File

@ -207,27 +207,27 @@
; 0x802E0000 -> 2EFFFF irq data area ; 0x802E0000 -> 2EFFFF irq data area
; 0x802F0000 -> 2FFFFF low memory save ; 0x802F0000 -> 2FFFFF low memory save
; ;
; 0x80300000 -> 400000 hd cache ; 0x80300000 -> 31FFFF tcp memory 128 Kb
; 0x80320000 -> 327FFF tcp memory 32 Kb
; 0x80400000 -> 41FFFF tcp memory 128 Kb
; 0x80420000 -> 427FFF tcp memory 32 Kb
; ;
; 0x80428000 -> 42FFFF !vrr driver 32 Kb ; 0x80328000 -> 32FFFF !vrr driver 32 Kb
; 0x80430000 -> 477FFF skin data ; 0x80330000 -> 377FFF skin data
; 0x80438000 -> 43AFFF draw data - 256 entries ; 0x80338000 -> 33AFFF 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
; 0x8043BF80 -> 43BFFF TSS 128 bytes ; 0x8033C000 -> 47BFFF display info
; 0x8043C000 -> 43DFFF IO map for (8192*8)=65536 ports
; 0x8043F000 -> 57EFFF display info ; 0x8047CF80 -> 47CFFF TSS 128 bytes
; 0x8057F000 -> 58FFFF page map max 128 Kb ; 0x8047D000 -> 47EFFF IO map for (8192*8)=65536 ports
; 0x8047F000 -> 48FFFF page map max 128 Kb
; ;
; 0x80800000 -> kernel heap ; 0x80800000 -> kernel heap
; 0x81FFFFFF heap min limit ; 0x81FFFFFF heap min limit
; 0xFDBFFFFF heap max limit ; 0xFDBFFFFF heap max limit