summaryrefslogtreecommitdiff
path: root/Platform/ARM/Library/FwsGptSystemFipLib
AgeCommit message (Collapse)AuthorFilesLines
2026-07-27Platform/ARM: FwsMetadata: fix wrong loop for checking metadataYeoreum Yun1-1/+1
When the number of bank is lesser than the maximum bank number (4), bank state in the metadata for absent banks should be "INVALID" state. However, current loop condition for checking above doing with the nubmer real bank. So the validation loop itself becomes dead code. To check properly, fix this problem. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-07-27Platform/ARM: FwsMetadata: fix missing check for metadata validationYeoreum Yun1-1/+2
For a bank state, FWU_BANK_STATE_INVALID is valid state for partial update and it's one of validate value. Therefore, include FWU_BANK_STATE_INVALID as valid state bank can have. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-23Platform/ARM/Library: Introduce FwsGptSystemFipLiblevi.yun2-0/+1625
FwsPlatformLib is platform specific library class used to access the firmware storage. In case of Base FVP, this is implemented with FwsGptSystemFipLib which uses GPT partitions and system fip image. Following is the PSA-FWU GPT-partition layout for the flash as defined by TF-A: +----------------------+ | GPT-HEADER | +----------------------+ | FIP_A (bank0) | +----------------------+ | FIP_B (bank1) | +----------------------+ | FWU-Metadata | +----------------------+ | Bkup-FWU-Metadata | +----------------------+ FwsGptSystemFipLib defines API to access the GPT partitions for updating the images in the banks and to read/update the Metadata. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-23Platform/ARM/Library: Introduce FwsMetadata API used in FwsGptSystemFipLiblevi.yun3-0/+2302
Platform Firwmare security firmware Update for the A-profile Arm Architecture defines two versions of firwmare update storage metadata. In real world, Arm only uses firmware update storagae metadata version 2. In light of the above, and to support future versions, introduce a firmware update storage metadata API by defining an operation interface that can be used to select version specific handling. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-23Platform/ARM/Library: Introduce Gpt partition access API used in ↵levi.yun2-0/+626
FwsArmVExpressLib This is preparation patch for FwsGptSystemFipLib which uses firmware storage with GPT partitions with system fip image.. Here is brief view how it works: UEFI (Normal world) | StandaloneMm (Secure world) ---------------------------------|-------------------------------------- | +-------+ | ---------| Fws | | | +-------+ +------------------+ | | (Gpt parted) | FmpDevicePkg | | Read /Write Image | +------------------+ | | | | +-------------------+ | SetTheImage and etc | | FwsPlatformLib | | progress via FmpDeviceLib | +-------------------+ | | | | | Parsing Request | Access Fws via | | | FwsPlatformLib | | | | | | -> +---------------------+ PSA ABI (FF-A) +-------------------+ | FmpDevicePsaFwuLib |<------------------> | FwuSmm.c | | (FmpDeviceLib) | PSA Error code +-------------------+ +---------------------+ | The following diagram depicts the GPT partition layout of the FLASH area defined by TF-A. +----------------------+ | GPT-HEADER | +----------------------+ | FIP_A (bank0) | +----------------------+ | FIP_B (bank1) | +----------------------+ | FWU-Metadata | +----------------------+ | Bkup-FWU-Metadata | +----------------------+ each image bank contains 1 image (only fip image). Therefore, define a standard mechanism for accessing these partitions used in FwsGptSystemFipLib which is instance of FwsPlatformLib. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>