[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1902267] Re: CPU not support 32-bit stack in 32-bit unreal mode
From: |
CandyMan |
Subject: |
[Bug 1902267] Re: CPU not support 32-bit stack in 32-bit unreal mode |
Date: |
Fri, 30 Oct 2020 16:28:31 -0000 |
** Attachment removed: "my operating system"
https://bugs.launchpad.net/qemu/+bug/1902267/+attachment/5429520/+files/FLATDOS.IMG
** Attachment added: "my operating system"
https://bugs.launchpad.net/qemu/+bug/1902267/+attachment/5429530/+files/FLATDOS.IMG
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1902267
Title:
CPU not support 32-bit stack in 32-bit unreal mode
Status in QEMU:
New
Bug description:
QEMU version 5.0.0 supports 32-bit and 16-bit unreal mode. Great!
Unfortunately, QEMU does not support 32-bit stack in unreal 32-bit mode.
After the INT instruction, the stack is switched to 16-bit, which should not
be the case.
At BOCHS, my code works 100%. At QEMU not works.
Sample code to find out:
use32
cli
mov ax,cs
shl eax,16
mov ax,NewInt80h
mov [IDT32+4*80h],eax
mov edx,esp
mov esp,0x10000
int 80h
NewInt80h:
xchg esp,edx
cmp edx,0x10000-6
jnz IsStack16Bit
Stack selector loaded from GDT:
GDT:
real32_GDT
dq 0
dw 0xFFFF,0x0000,9A00h,0xCF ; 32-bit code descriptor
dw 0xFFFF,0x0000,9200h,0x8F ; 4 GB data descriptor
dw 0xFFFF,0x0000,9A00h,0x00 ; 16-bit code descriptor
dw 0xFFFF,0x0000,9200h,0xCF ; 32-bit data descriptor stack
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1902267/+subscriptions