diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index e8bbae0141..dc1fb2ce40 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -512,12 +512,8 @@ no_mode_0x12: 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 @@ -1080,6 +1076,15 @@ proc setup_os_slot mov edi, edx rep stosd + mov eax, tss+0x80 + call get_pg_addr + inc eax + mov [edx+APPDATA.io_map], eax + mov eax, tss+0x1080 + call get_pg_addr + inc eax + mov [edx+APPDATA.io_map+4], eax + mov dword [edx+APPDATA.pl0_stack], ebx lea edi, [ebx+0x2000-512] mov dword [edx+APPDATA.fpu_state], edi