b.zaar wrote:
IOPL = 3 works differently between vm86 mode and protected mode and a vm86 task requires a valid I/O permission bitmap in the task state segment.
Read the section - 17.2.8.1 I/O-Port-Mapped I/O - in the intel manuals from Vol 3 - System Programming Guide.
section - 15.5.1 I/O-Mapped I/O - from you link to the original 386 programmers guide.
i extend my tss with 1869 byts like this
Code:
struct tss {
u16 previous_task, __previous_task_unused;
u32 esp0;
u16 ss0, __ss0_unused;
u32 esp1;
u16 ss1, __ss1_unused;
u32 esp2;
u16 ss2, __ss2_unused;
u32 cr3;
u32 eip, eflags, eax, ecx, edx, ebx, esp, ebp, esi, edi;
u16 es, __es_unused;
u16 cs, __cs_unused;
u16 ss, __ss_unused;
u16 ds, __ds_unused;
u16 fs, __fs_unused;
u16 gs, __gs_unused;
u16 ldt_selector, __ldt_sel_unused;
u16 debug_flag, io_map;
} __attribute__ ((packed));
struct extand_tss{
struct tss tss0;
u32 iobitmap[256];
} __attribute__((packed));
struct extand_tss default_tss;
in gdt
i put the desc of tss like this
base : &default_tss
limit : 0x467
default_tss.tss0.io_map = 0x67;
but in my vm86 task i have int 0x10 is not work correctly