IOPM in TSS for 4M page was broken, fixed.

git-svn-id: svn://kolibrios.org@1310 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-12-08 20:32:13 +00:00
parent caf224ae96
commit 6b29296f2c
4 changed files with 24 additions and 17 deletions

View File

@ -310,12 +310,12 @@ BgrDrawMode equ (OS_BASE+0x033BFF4)
BgrDataWidth equ (OS_BASE+0x033BFF8)
BgrDataHeight equ (OS_BASE+0x033BFFC)
virtual at (OS_BASE+0x033CF80)
sys_pgmap equ (OS_BASE+0x033C000)
virtual at (OS_BASE+0x05FFF80)
tss TSS
end virtual
sys_pgmap equ (OS_BASE+0x033F000)
HEAP_BASE equ (OS_BASE+0x0800000)
HEAP_MIN_SIZE equ 0x01000000

View File

@ -652,12 +652,12 @@ term9:
add edi,SLOT_BASE
mov eax, [edi+APPDATA.io_map]
cmp eax, (tss._io_map_0-OS_BASE+PG_MAP)
cmp eax, [SLOT_BASE+256+APPDATA.io_map]
je @F
call free_page
@@:
mov eax, [edi+APPDATA.io_map+4]
cmp eax, (tss._io_map_1-OS_BASE+PG_MAP)
cmp eax, [SLOT_BASE+256+APPDATA.io_map+4]
je @F
call free_page
@@:

View File

@ -1000,10 +1000,10 @@ proc set_app_params stdcall,slot:dword, params:dword,\
mov [eax+SLOT_BASE+APPDATA.except_mask], 0
;set default io permission map
mov [eax+SLOT_BASE+APPDATA.io_map],\
(tss._io_map_0-OS_BASE+PG_MAP)
mov [eax+SLOT_BASE+APPDATA.io_map+4],\
(tss._io_map_1-OS_BASE+PG_MAP)
mov ecx, [SLOT_BASE+256+APPDATA.io_map]
mov [eax+SLOT_BASE+APPDATA.io_map], ecx
mov ecx, [SLOT_BASE+256+APPDATA.io_map+4]
mov [eax+SLOT_BASE+APPDATA.io_map+4], ecx
mov esi, fpu_data
mov ecx, 512/4

View File

@ -465,6 +465,16 @@ high_code:
wrmsr
.noSYSCALL:
; -----------------------------------------
stdcall alloc_page
stdcall map_page, tss-0xF80, eax, PG_SW
stdcall alloc_page
inc eax
mov [SLOT_BASE+256+APPDATA.io_map], eax
stdcall map_page, tss+0x80, eax, PG_SW
stdcall alloc_page
inc eax
mov dword [SLOT_BASE+256+APPDATA.io_map+4], eax
stdcall map_page, tss+0x1080, eax, PG_SW
; LOAD IDT
@ -714,10 +724,7 @@ end if
add edi, 0x2000-512
mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi
mov dword [SLOT_BASE+256+APPDATA.saved_esp0], edi ; just for case
mov dword [SLOT_BASE+256+APPDATA.io_map],\
(tss._io_map_0-OS_BASE+PG_MAP)
mov dword [SLOT_BASE+256+APPDATA.io_map+4],\
(tss._io_map_1-OS_BASE+PG_MAP)
; [SLOT_BASE+256+APPDATA.io_map] was set earlier
mov esi, fpu_data
mov ecx, 512/4
@ -829,14 +836,14 @@ end if
;protect io permission map
mov esi, [default_io_map]
stdcall map_page,esi,(tss._io_map_0-OS_BASE), PG_MAP
stdcall map_page,esi,[SLOT_BASE+256+APPDATA.io_map], PG_MAP
add esi, 0x1000
stdcall map_page,esi,(tss._io_map_1-OS_BASE), PG_MAP
stdcall map_page,esi,[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
stdcall map_page,tss._io_map_0,\
(tss._io_map_0-OS_BASE), PG_MAP
[SLOT_BASE+256+APPDATA.io_map], PG_MAP
stdcall map_page,tss._io_map_1,\
(tss._io_map_1-OS_BASE), PG_MAP
[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
mov ax,[OS_BASE+0x10000+bx_from_load]
cmp ax,'r1' ; if not rused ram disk - load network configuration from files {SPraid.simba}