mirror of
https://github.com/Dasharo/edk2-upstream.git
synced 2026-06-13 19:16:19 -07:00
This change updates `VariableSmmRuntimeDxe` to correctly size its runtime communication buffer when `EFI_MM_COMMUNICATION3_PROTOCOL` is present. In the current flow, the runtime variable path may use MM communication v3, but the input size is first validated against the global variable `mVariableBufferPayloadSize`. The size is then validated a second time during communication buffer initialization using the v3 header size, which results in `GetVariable` calls with sufficiently large buffers consistently failing. This update makes the allocation logic v3‑aware so that the runtime variable communication buffer matches the header format actually in use, avoiding failures for larger variable transactions. Signed-off-by: Kun Qin <kun.qin@microsoft.com>