Skip to content

UefiPayloadPkg/SmmStoreLib: honor SMI retry delay#12859

Open
Sean-StarLabs wants to merge 1 commit into
tianocore:masterfrom
StarLabsLtd:agent/upstream-smmstore-retry
Open

UefiPayloadPkg/SmmStoreLib: honor SMI retry delay#12859
Sean-StarLabs wants to merge 1 commit into
tianocore:masterfrom
StarLabsLtd:agent/upstream-smmstore-retry

Conversation

@Sean-StarLabs

Copy link
Copy Markdown
Contributor

Description

TriggerSmi() loads RCX with 10,000 before rep pause, but PAUSE already uses the REP prefix and does not consume RCX. The retry path therefore waits for one instruction rather than the intended delay.

Use an explicit loop and retain the existing delay and retry counts. This replaces the broader SMMSTORE retry change from #12342; it does not call boot services from the runtime path or replay operations after an explicit SMM response.

How This Was Tested

  • PatchCheck.py
  • stuart_build for UefiPayloadPkg X64 FIT
  • IA32/X64 FIT build with SMMSTORE variables
  • inspected the generated X64 object: PAUSE is followed by LOOP to the pause label

Integration Instructions

None.

The retry path loads RCX before REP PAUSE, but PAUSE already uses the REP
prefix and does not consume RCX. It therefore waits for one PAUSE
instruction instead of the intended 10,000 iterations.

Use an explicit loop so a missed synchronous SMI gets the intended delay
before it is retriggered.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant