Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 10f2053c2d769c6c1becef9dc313e786d5743117
      
https://github.com/tianocore/edk2/commit/10f2053c2d769c6c1becef9dc313e786d5743117
  Author: Kun Qin <[email protected]>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M OvmfPkg/Library/SmmRelocationLib/Ia32/SmmInit.nasm
    M OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
    M OvmfPkg/Library/SmmRelocationLib/X64/SmmInit.nasm

  Log Message:
  -----------
  OvmfPkg: SmmRelocationLib: Optimize SMI init 16-bit bootstrapping

Every once in a while the SMM relocation routine would hang the system.

This is due to the 16-bit code after relocation could land at the end of
a 4K page boundary. Then the code fetching into the next page will trip
on QEMU block-exit handling logic, which will truncate the EIP with
0xFFFF, causing the code to read back garbage and fault.

This change short-circuits the jump by copying the entire 16-bit stub
over to the BASE + 0x8000 location. The GDTr is also moved to the same
location, otherwise we could risk reaching out to a different page
because it is marked in a different section inside this image.

Signed-off-by: Kun Qin <[email protected]>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to