reactos/boot
Hermès Bélusca-Maïto 2c9dbacebb
[FREELDR] Fix displayed information in the Exception BSOD.
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.
2022-01-01 05:04:22 +01:00
..
armllb [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
bcd
bgfx
bootdata [BOOTDATA] Add new Setup Debug/Screen boot entries in BootCD/HybridCD/PC98 boot menus. (#3353) 2021-12-30 16:06:49 +01:00
environ [CMAKE] Replace custom scripts in compilerflags with standard ones 2021-09-14 17:56:22 +03:00
freeldr [FREELDR] Fix displayed information in the Exception BSOD. 2022-01-01 05:04:22 +01:00
CMakeLists.txt [BOOT] CMakeLists.txt: Compare ARCH to arm64, not aarch64 2021-06-02 13:26:08 +03:00