forked from KolibriOS/kolibrios
* more space for EBDA in V86
* some bugfixes in NTFS support git-svn-id: svn://kolibrios.org@820 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ed2e35a24c
commit
c6b94086d8
@ -806,7 +806,7 @@ bd_read:
|
||||
ja .notread
|
||||
sub eax, [bios_cur_sector]
|
||||
shl eax, 9
|
||||
add eax, (OS_BASE+0x9C000)
|
||||
add eax, (OS_BASE+0x9A000)
|
||||
push ecx esi edi
|
||||
mov esi, eax
|
||||
shl edi, 9
|
||||
@ -851,7 +851,7 @@ bd_write_cache_chain:
|
||||
shl esi, 9
|
||||
call calculate_cache_2
|
||||
add esi, eax
|
||||
mov edi, OS_BASE + 0x9C000
|
||||
mov edi, OS_BASE + 0x9A000
|
||||
movzx ecx, [cache_chain_size]
|
||||
push ecx
|
||||
shl ecx, 9-2
|
||||
@ -884,7 +884,7 @@ int13_call:
|
||||
; In current implementation it is protected by common mutex 'hd1_status'
|
||||
mov word [BOOT_VAR + 510h], 10h ; packet length
|
||||
mov word [BOOT_VAR + 512h], cx ; number of sectors
|
||||
mov dword [BOOT_VAR + 514h], 9C000000h ; buffer 9C00:0000
|
||||
mov dword [BOOT_VAR + 514h], 9A000000h ; buffer 9A00:0000
|
||||
mov dword [BOOT_VAR + 518h], eax
|
||||
and dword [BOOT_VAR + 51Ch], 0
|
||||
push ebx ecx esi edi
|
||||
@ -911,7 +911,7 @@ int13_call:
|
||||
@@:
|
||||
mov word [ebx+v86_regs.esi], 510h
|
||||
mov word [ebx+v86_regs.ss], 9000h
|
||||
mov word [ebx+v86_regs.esp], 0C000h
|
||||
mov word [ebx+v86_regs.esp], 0A000h
|
||||
mov word [ebx+v86_regs.eip], 500h
|
||||
mov [ebx+v86_regs.eflags], 20200h
|
||||
mov esi, [sys_v86_machine]
|
||||
|
@ -89,19 +89,29 @@ v86_create:
|
||||
|
||||
pop esi
|
||||
; now V86 specific: initialize known addresses in first Mb
|
||||
pop eax edi
|
||||
pop eax
|
||||
; first page - BIOS data (shared between all machines!)
|
||||
; physical address = 0x2f0000
|
||||
; linear address = BOOT_VAR = OS_BASE + 0x2f0000
|
||||
mov dword [eax], (BOOT_VAR - OS_BASE) or 111b
|
||||
mov dword [eax+800h], BOOT_VAR
|
||||
; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!)
|
||||
; physical address = 0x9F000
|
||||
; linear address = 0x8009F000
|
||||
mov dword [eax+0x9E*4], 0x9E000 or 111b
|
||||
mov dword [eax+0x9E*4+800h], 0x9E000 + OS_BASE
|
||||
mov dword [eax+0x9F*4], 0x9F000 or 111b
|
||||
mov dword [eax+0x9F*4+800h], 0x9F000 + OS_BASE
|
||||
; physical address = 0x9C000
|
||||
; linear address = 0x8009C000
|
||||
; (I have seen one computer with EBDA segment = 0x9D80,
|
||||
; all other computers use less memory)
|
||||
mov ecx, 4
|
||||
mov edx, 0x9C000
|
||||
push eax
|
||||
lea edi, [eax+0x9C*4]
|
||||
@@:
|
||||
lea eax, [edx + OS_BASE]
|
||||
mov [edi+800h], eax
|
||||
lea eax, [edx + 111b]
|
||||
stosd
|
||||
loop @b
|
||||
pop eax
|
||||
pop edi
|
||||
; addresses 0xC0000 - 0xFFFFF - BIOS code (shared between all machines!)
|
||||
; physical address = 0xC0000
|
||||
; linear address = 0x800C0000
|
||||
@ -216,12 +226,13 @@ init_sys_v86:
|
||||
mov byte [BOOT_VAR + 0x505], 0xF4
|
||||
mov esi, eax
|
||||
mov ebx, [eax+V86_machine.pagedir]
|
||||
; one page for stack, two pages for results (0x2000 bytes = 16 sectors)
|
||||
mov dword [ebx+0x99*4+0x1000], 0x99000 or 111b
|
||||
mov dword [ebx+0x99*4+0x1800], OS_BASE + 0x99000
|
||||
mov dword [ebx+0x9A*4+0x1000], 0x9A000 or 111b
|
||||
mov dword [ebx+0x9A*4+0x1800], OS_BASE + 0x9A000
|
||||
mov dword [ebx+0x9B*4+0x1000], 0x9B000 or 111b
|
||||
mov dword [ebx+0x9B*4+0x1800], OS_BASE + 0x9B000
|
||||
mov dword [ebx+0x9C*4+0x1000], 0x9C000 or 111b
|
||||
mov dword [ebx+0x9C*4+0x1800], OS_BASE + 0x9C000
|
||||
mov dword [ebx+0x9D*4+0x1000], 0x9D000 or 111b
|
||||
mov dword [ebx+0x9D*4+0x1800], OS_BASE + 0x9D000
|
||||
if ~DEBUG_SHOW_IO
|
||||
; allow access to all ports
|
||||
mov ecx, [esi+V86_machine.iopm]
|
||||
|
@ -793,14 +793,17 @@ ntfs_read_attr:
|
||||
add esp, 10h
|
||||
mov eax, [ntfs_cur_tail]
|
||||
test eax, eax
|
||||
jz .okret
|
||||
jz @f
|
||||
sub eax, 0x200
|
||||
add [ntfs_cur_read], eax
|
||||
jmp .okret
|
||||
@@:
|
||||
clc
|
||||
ret
|
||||
.errread2:
|
||||
pop ecx
|
||||
add esp, 10h
|
||||
jmp .errret
|
||||
stc
|
||||
ret
|
||||
.break:
|
||||
add esp, 10h ; CF=0
|
||||
mov [ntfs_bCanContinue], 1
|
||||
@ -1032,6 +1035,8 @@ ntfs_find_lfn:
|
||||
push eax
|
||||
mov al, [edi]
|
||||
inc edi
|
||||
cmp al, '/'
|
||||
jz .slash
|
||||
call char_toupper
|
||||
cmp al, [esp]
|
||||
pop eax
|
||||
@ -1044,6 +1049,10 @@ ntfs_find_lfn:
|
||||
movzx eax, word [esi+8]
|
||||
add esi, eax
|
||||
jmp .scanloopint
|
||||
.slash:
|
||||
pop eax
|
||||
pop edi
|
||||
pop esi
|
||||
.subnode:
|
||||
test byte [esi+0Ch], 1
|
||||
jz .notfound
|
||||
|
Loading…
Reference in New Issue
Block a user