forked from KolibriOS/kolibrios
identical mapping of first physical page in V86
(some BIOSes use physical address of ds:si for int 13h) git-svn-id: svn://kolibrios.org@1448 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7ca326635d
commit
66d949f4b4
@ -882,11 +882,11 @@ int13_call:
|
||||
; Because this code uses fixed addresses,
|
||||
; it can not be run simultaniously by many threads.
|
||||
; 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], 9A000000h ; buffer 9A00:0000
|
||||
mov dword [BOOT_VAR + 518h], eax
|
||||
and dword [BOOT_VAR + 51Ch], 0
|
||||
mov word [OS_BASE + 510h], 10h ; packet length
|
||||
mov word [OS_BASE + 512h], cx ; number of sectors
|
||||
mov dword [OS_BASE + 514h], 9A000000h ; buffer 9A00:0000
|
||||
mov dword [OS_BASE + 518h], eax
|
||||
and dword [OS_BASE + 51Ch], 0
|
||||
push ebx ecx esi edi
|
||||
mov ebx, int13_regs_in
|
||||
mov edi, ebx
|
||||
@ -919,7 +919,7 @@ int13_call:
|
||||
call v86_start
|
||||
and [bios_hdpos], 0
|
||||
pop edi esi ecx ebx
|
||||
movzx edx, byte [BOOT_VAR + 512h]
|
||||
movzx edx, byte [OS_BASE + 512h]
|
||||
test byte [int13_regs_out+v86_regs.eflags], 1
|
||||
jnz @f
|
||||
mov edx, ecx
|
||||
|
@ -91,10 +91,10 @@ v86_create:
|
||||
; now V86 specific: initialize known addresses in first Mb
|
||||
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
|
||||
; physical address = 0
|
||||
; linear address = OS_BASE
|
||||
mov dword [eax], 111b
|
||||
mov dword [eax+800h], OS_BASE
|
||||
; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!)
|
||||
; physical address = 0x9C000
|
||||
; linear address = 0x8009C000
|
||||
@ -219,12 +219,12 @@ init_sys_v86:
|
||||
mov [sys_v86_machine], eax
|
||||
test eax, eax
|
||||
jz .ret
|
||||
mov byte [BOOT_VAR + 0x500], 0xCD
|
||||
mov byte [BOOT_VAR + 0x501], 0x13
|
||||
mov byte [BOOT_VAR + 0x502], 0xF4
|
||||
mov byte [BOOT_VAR + 0x503], 0xCD
|
||||
mov byte [BOOT_VAR + 0x504], 0x10
|
||||
mov byte [BOOT_VAR + 0x505], 0xF4
|
||||
mov byte [OS_BASE + 0x500], 0xCD
|
||||
mov byte [OS_BASE + 0x501], 0x13
|
||||
mov byte [OS_BASE + 0x502], 0xF4
|
||||
mov byte [OS_BASE + 0x503], 0xCD
|
||||
mov byte [OS_BASE + 0x504], 0x10
|
||||
mov byte [OS_BASE + 0x505], 0xF4
|
||||
mov esi, eax
|
||||
mov ebx, [eax+V86_machine.pagedir]
|
||||
; one page for stack, two pages for results (0x2000 bytes = 16 sectors)
|
||||
|
Loading…
Reference in New Issue
Block a user