summaryrefslogtreecommitdiff
path: root/Platform/ARM/Drivers
AgeCommit message (Collapse)AuthorFilesLines
20 hoursPlatform/ARM/Driver: rename FtpmSmm to TpmCrbOverFfaSmmYeoreum Yun6-1380/+424
The fTPM functionality is moved from FtpmSmm to TpmCrbFfaFtpmLib which is instance of TpmCrbFfaDeviceLib. Therefore, rename FtpmSmm to TpmCrbOverFfaSmm and remove fTPM relevant features so that TpmCrbOverFfaSmm could be used with dTPM in the future by implementing TpmCrbFfaDeviceLib. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
7 daysPlatform/ARM: change all file format to CRLFYeoreum Yun4-481/+481
Some of file inside of Platform/ARM mixed with LF/CRLF and this makes a great trouble to read/review code. Change all of file format to CRLF. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-08-19Platform/ARM: change DIRECT_MSG_ARGS to ARM_FFA_ARGS for FtpmSmmYeoreum Yun1-23/+25
edk2 commit ("ArmPkg: StandaloneMmCoreEntryPoint: Use ARM_FFA_ARGS..")[0] changes the MISC services arguments from DIRECT_MSG_ARGS to ARM_FFA_ARGS. Apply this change in FtpmSmm. Link: [0] https://github.com/tianocore/edk2/pull/12867 Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-03-30Platform/ARM/Drivers/BootMonFs: remove unused ImageCount variableYeoreum Yun1-3/+0
ImageCount doesn't use for anything in initialisation. Therefore, remove ImageCount variable otherwise it faces below build error with CLANGDWARF: edk2-platforms/Platform/ARM/Drivers/BootMonFs/BootMonFsImages.c:191:28: error: variable 'ImageCount' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-03-30Platform/ARM/Drivers/NorFlashDxe: fix build failure with CLANGDWARFYeoreum Yun1-3/+11
When FVP platform is built with CLANGDWARF toolchain, below build error splat happens: edk2-platforms/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c:398:14: error: variable 'ProtocolGuid' is used uninitialized whenever 'if' condition is Fix this build failure. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24Platform/ARM/FtpmSmm: add Readme.mdlevi.yun1-0/+345
Add Readme.md file for FtpmSmm. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24Platform/ARM/Drivers: introduce FtpmSmmlevi.yun3-0/+1397
FtpmSmm driver is software based TPM using TpmLib. Below is the overview how FtpmSmm handles TPM request with TpmLib: Normal world | Secure World -------------------------------|------------------------------ | +--------------+ | +-----------+ +----------+ | Tcg2Dxe | | | FtpmSmm |<---->| TpmLib | +--------------+ | +-----------+ +----------+ | | | | | ---------- | | | | | | | | +------------------+ | | | StandaloneMmCpu | | | +------------------+ | | | | | | | | | +----------------------+ | +----------------------------+ | Tpm2InstanceFfaLib |<---------->| StandaloneMmCoreEntryPoint | +----------------------+ . | (Misc Service) | . +----------------------------+ . Communicate via CRB over FF-A [0] FtpmSmm driver receives the TPM request from Tpm2InstanceFfaLib via CRB over FF-A [0] and pass its request to TpmLib to handle the request. Link: https://developer.arm.com/documentation/den0138/latest/ [0] Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24Platform/ARM/Drivers: add NvFlash area for TPM storagelevi.yun2-5/+52
TPM storage is required to save TPM related information. For this, install TPM Norflash instance with BlockIoProtocol2. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-23Platform/ARM/VExpressPkg/Library: Add firmware storage informationlevi.yun2-59/+297
To update firmware in StandAloneMm, StandAloneMm should access the firmware update storage. This patch adds firmware storage information. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-23Platform/ARM/Driver: Introduce FwuSmm Driverlevi.yun3-0/+1569
FwuSmm Driver is driver providing Firmware Update Service. First, It parses the normal world request and It accesses firmware storage using FwStore's protocol to handle request of FmpDeviceLib according to Platform Security Firmware Update for A-profile's ABI: https://developer.arm.com/documentation/den0118/latest 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 +-------------------+ +---------------------+ | Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-08-15Platform/ARM/Drivers: define gFdtVariableGuid in FdtPlatformDxe.declevi.yun1-0/+1
edk2 commit db5b28ed9e27 ("MdePkg, EmbeddedPkg: Move Fdt Table Guid to MdePkg") removes gFdtVariableGuid while it moves the gFdtTableGuid to MdePkg.dec. But, gFdtVariableGuid is used for development purpose to override fdt by saving its path to load into the variable with gFdtVariableGuid. gFdtVariableGuid is only used by FdtPlatformDxe driver and not at any other place. So move gFdtVariableGuid into FdtPlatformDxe.dec This patch fixes build failure of ArmJuno Platform. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-06-02Platform,Silicon/ARM: convert to MdePkg BaseFdtLibLeif Lindholm3-15/+24
Convert various platforms from EmbeddedPkg FdtLib, which is going away, to MdeModulePkg which replaces it. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2024-09-16Update code to be more C11 compliant by using __func__Rebecca Cran3-15/+15
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout edk2-platforms. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-09-16Replace deprecated EFI_D_* with DEBUG_*Rebecca Cran4-12/+12
Replaced the deprecated EFI_D_{INFO,WARN,ERROR,VERBOSE} usage with DEBUG_{INFO,WARN,ERROR,VERBOSE}. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-05-29Platform/ARM: Add optional provision to fetch and print NOR Flash infosahil4-0/+38
This patch adds an optional functionality in NorFlashDxe to fetch and print NOR Flash information from NorFlashInfoLib using its JEDEC ID. NOR Flash libraries will implement a function "NorFlashReadID" which will fetch and return JEDEC ID. This JEDEC ID can be then printed along with the NOR Flash info by NorFlashInfoLib. If this functionality is not needed then the function can just return EFI_UNSUPPORTED. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Fix memory leak in NorFlashCreateInstance()sahil2-10/+23
This patch adds error_handler1 and error_handler2 labels in NorFlashCreateInstance() function to handle the cleanup. error_handler1: Frees just the Instance structure as the ShadowBuffer is not allocated yet. error_handler2: Frees both Instance and Instance->ShadowBuffer. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM: Add HostControllerBaseAddress variablesahil5-8/+44
This variable holds the QSPI controller's base address. It is defined in ARM.dec as well with the default value of 0x0. In case a platform is not using it, they can just ignore this variable and the default value of 0x0 will be propogated and the variable will not be used. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Switch from NorFlash.c to NorFlashDeviceLibsahil8-1077/+2
NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch adds the following major changes: 1. Adds changes in NorFlashDxe to look for NorFlashDeviceLib instead of NorFlash.c for flash specific implementation 2. Remove NorFlash.c and NorFlash.h as they are no longer required. 3. Add changes to platform description files to provide P30NorFlashDeviceLib as NorFlashDeviceLib Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM: Create NorFlashDeviceLib library interfacesahil2-104/+2
NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch splits NorFlash.h and moves out the function prototypes and macros that are expected by NorFlashDxe to be implemented by any Nor Flash implementation to NorFlashDeviceLib.h file. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Make local functions STATICsahil2-21/+3
This patch makes local functions not being used outside NorFlash.c STATIC. Also, NorFlashWriteBuffer() is specific to a particular flash implementation and need not be implemented by other NOR flash device IPs. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Remove unimplemented functions from NorFlash.hsahil1-17/+0
This patch removes NorFlashReadCfiData() and NorFlashWrite() prototypes from NorFlash.h as these are not implemented or used anywhere in NorFlashDxe driver. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Move flash specific functions to NorFlash.csahil5-295/+225
Refactoring done in this patch has two major parts: 1. Moving out NorFlashUnlockAndEraseSingleBlock and NorFlashWriteFullBlock functions from NorFlashDxe.c and NorFlashStandaloneMm.c to NorFlash.c files. 2. At the same time, we are adding NorFlashLock and NorFlashUnlock functions which will take care of TPL related operations needed by functions mentioned in point 1. These functions are implemented in NorFlashDxe.c but are just dummy placeholder functions in NorFlashStandaloneMm.c file. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Add NorFlashCommon.h header filesahil9-199/+228
This patch splits NorFlash.h and adds NorFlashCommon.h which will have all the flash independent functions and macros. Whereas all the flash specific functions will be in NorFlash.h header file. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Move NorFlashVirtualNotifyEventsahil3-51/+51
Moving this function from NorFlash.c to NorFlashDxe.c as it is not dependent on any particular flash implementation. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-05-29Platform/ARM/NorFlashDxe: Move DiskIo related functions out of NorFlash.csahil2-129/+129
Moving these functions from NorFlash.c to NorFlashBlockIoDxe.c as they are not dependent on any particular flash implementation. Signed-off-by: sahil <sahil@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19Platform/ARM: clone NorFlashDxe from ArmPlatformPkgArd Biesheuvel8-0/+3339
The ArmPlatformPkg version of NorFlashDxe and NorFlashStandaloneMm will be going away, so clone them into Platform/ARM where the ARM platforms that rely on this driver can keep using it. Other than updating the INF version, refreshing the file GUIDs and reorganizing the various INF sections, no changes have been made to the driver. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-10-19Platform/ARM/BootMonFs: drop spurious dependency on ArmPlatformPkgArd Biesheuvel2-2/+0
Don't include NorFlashPlatformLib.h unnecessarily from BootMonFs, and drop the reference to ArmPlatformPkg.dec, which isn't needed after that either. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2019-05-18Platform/ARM: Replace BSD License with BSD+Patent LicenseMichael D Kinney19-133/+19
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html NOTE: Files with a BSD 3-Clause license are not modified by this patch series. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2018-11-26Platform/ARM: import ARM platform specific BdsLib headerArd Biesheuvel1-1/+1
The BdsLib library has been moved into Platform/ARM a while ago, but the BdsLib.h header was left behind, and so all users in Platform/ARM are still relying on it to be available in ArmPkg. So let's add a copy to Platform/ARM and wire it up, so we can drop it from ArmPkg going forward. Note that the BdsLib implementation included ArmLib.h from ArmPkg without using anything it provides, so drop that false dependency as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Thomas Abraham <thomas.abraham@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-12-08Platform/ARM: import BootMonFs and ArmShellCmdRunAxf from EDK2Ard Biesheuvel11-0/+3243
BootMonFs and ArmShellCmdRunAxf are only used on development boards manufactured by ARM itself, so let's keep it under Platform/ARM where it belongs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-11-26Platform/ARM: import FdtPlatformDxe driver from EDK2Ard Biesheuvel8-0/+1659
Import FdtPlatformDxe from EmbeddedPkg into Platform/ARM, given that it is not used anywhere else, nor should it be. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>