First post, by superfury
What happens when a SS segment register faults during any of the following operations:
- Task switching
- MOV SS instruction
- LSS instruction
- Privilege level changes(e.g. during interrupts/call gates)
I currently have it implemented to always fault as #SS(selector), except for invalid types to load? Is that even correct behaviour? Should #GP happen instead of #SS in some cases but not others(e.g. MOV SS/LSS vs the other cases)?
As far as I can find, #SS(selector) only happens with all Present bits being 0 checks and some checks during task switching? Is that correct?
Edit: Also, the #TS happens instead of #GP during stack switching to a higher privilege level(both CALL and INT)?
So there's 3 cases for kinds of faults?
- Task switching (#SS(for all cases))
- Privilege level changes (to a higher privilege level) (#TS and #SS(for present bit only))
- All other cases (#GP and #SS(for present bit only))
Edit: Apparently, Task switching has #SS for not present only. Otherwise, #TS(stacksegment)?