summaryrefslogtreecommitdiff
path: root/Platform/ARM/Library/CapsuleUpdateRuntimePolicyLib
AgeCommit message (Collapse)AuthorFilesLines
2026-02-23Platform/ARM/Library: Introduce CapsuleUpdateRuntimePolicyLiblevi.yun3-0/+176
CapsuleUpdatePolicyLib is used to control the CapsuleUpdate process. Normaly, it's enough to use CapsuleUpdatePolicyLibNull if platform updates firmware via the CapsuleUpdate with Coalescing. However, if the platform updates the firmware without coalescing, it would follow one of the approach listed below: 1. fwupdate (using capsule on disk) - ReadyToBoot phase. 2. CapsuleApp (in UEFI Shell) - ReadyToBoot phase. 3. Runtime Capsule Update - Runtime phase. The implementation of IsLockFmpDeviceAtLockEventGuidRequired() in CapsuleUpdatePolicyLibNull, returns TRUE. Which means the FmpDevicePkg Variables (i.e FmpVersionX, FmpLsvX, LastAttemptStatusX, LastAttemptVersionX and etc) are locked to prevent any updates. Therefore, FmpDevicePkg cannot access the Variable after the EndofDxe phase. Arm does not update the firmware using capsule coalescing. It updates the firmware by streaming the update data to StandaloneMm which has an update client that manages the firmware storage device. This means device locking is not required. Therefore, add platform specific library that returns FALSE for IsLockFmpDeviceAtLockEventGuidRequired() so that FmpDevicePkg can access the variable data. This also means FmpDeviceLib does not need to implement the FmpDeviceLock(). Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>