VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

What happens when a task jumps to it's own TSS(or gate)? According to the x86 documentation I can find, this shouldn't be allowed(non-recursive rule), but that's exactly what the main loop of the third task of the Landmark/Supersoft BIOS is trying to do:
- Kernel(initial protected mode) calls first task(CALL).
- First task calls second task(JMP).
- Second task jumps to itself(TSS). Not allowed? Allowed due to clearing Busy before loading new TR(loading TR sets it and checks busu of the new task(&faults if so)).
- Eventually, second task IRETS to invalid selector(NT=0), invalid stack? It's popping 0xAAAA into CS?

Edit: See UniPCemu 80286/80386+ protected mode problems?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 1, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've modified the busy bit of the outgoing task being cleared AFTER loading and checking the incoming task's busy bit. So now tasks are 100% non-reentrant(only having this new effect when it's not an CALL instruction or interrupt/exception causing it(CALLs&interrupts don't clear the outgoing task's busy bit). Is that correct behaviour? So a JMP to one's own, busy task TSS throws a #GP(TSS)?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io