Reply 40 of 69, by superfury
The description of the checks executed when loading the TSS data segments (ES, DS, FS, GS) and their checks are a little strange.
https://pdos.csail.mit.edu/6.828/2014/reading … i386/s07_05.htm
13 DS, ES, FS, GS selectors are valid GP Segment 14 DS, ES, FS, GS se […]
13 DS, ES, FS, GS selectors are
valid GP Segment
14 DS, ES, FS, GS segments
are readable GP Segment
15 DS, ES, FS, GS segments
are present NP Segment
16 DS, ES, FS, GS segment DPL
>= CPL (unless these are
conforming segments) GP Segment
- What does it mean with the segments being readable? That it's not paged out of RAM? Segments are always readable? Also, it can't check, since each segment can use different limit configurations combined with paging?
- How can you even check present after readable? If the segment isn't present, you can even load it for checking(since it can't even be looked at for anything(when the register points to a non-present gate descriptor or non-present data/code descriptor)).
- Are the segments really checked in that strange order? Why would you load all segment descriptors(and follow non-present descriptors) and check CPL afterwards?
- Data segments can't be conforming? Only executable code segments can?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io