mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
2c9dbacebb
CORE-16748 - Display the correct TR register value. - Ensure that the x86 segment register values displayed are really 2-byte long. Segment registers are intrinsically 16 bits. Even if the x86 KTRAP_FRAME structure stores them as ULONG, only their lower 16 bits are initialized. We thus cast them to USHORT before display. These segment registers are saved in a stack-based KTRAP_FRAME by the CPU trap mechanism (for SS), and by 'push CS' etc. instructions for the others, and from Intel documentation, we know that: " If the source operand is a segment register (16 bits) and the operand size is 64-bits, a zero-extended value is pushed on the stack; if the operand size is 32-bits, either a zero-extended value is pushed on the stack or the segment selector is written on the stack using a 16-bit move. For the last case, all recent Core and Atom processors perform a 16-bit move, leaving the upper portion of the stack location unmodified. " So it may happen, when using the push, that either they get zero-extended, or garbage gets stored in the higher bits, and these need to be trimmed. |
||
---|---|---|
.. | ||
armllb | ||
bcd | ||
bgfx | ||
bootdata | ||
environ | ||
freeldr | ||
CMakeLists.txt |