From 9ab18fec82249d8a3a82ec8d0c20d9f4fca68b64 Mon Sep 17 00:00:00 2001 From: Ming Huang Date: Fri, 31 Dec 2021 19:06:21 +0800 Subject: StandaloneMmPkg: Fix issue about SpPcpuSharedBufSize field TF-A: TrustedFirmware-A SPM: Secure Partition Manager(MM) In TF-A, the name of this field is sp_shared_buf_size. This field is the size of range for transmit data from TF-A to standaloneMM when SPM enable. SpPcpuSharedBufSize is pass from TF-A while StandaloneMM initialize. So, SpPcpuSharedBufSize should be rename to SpSharedBufSize and this field should no multiply by PayloadBootInfo->NumCpus; Signed-off-by: Ming Huang Reviewed-by: Sami Mujawar --- StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h | 2 +- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c | 2 +- .../Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'StandaloneMmPkg') diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h index 4593609..41bf0f1 100644 --- a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h +++ b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h @@ -41,7 +41,7 @@ typedef struct { UINT64 SpPcpuStackSize; UINT64 SpHeapSize; UINT64 SpNsCommBufSize; - UINT64 SpPcpuSharedBufSize; + UINT64 SpSharedBufSize; UINT32 NumSpMemRegions; UINT32 NumCpus; EFI_SECURE_PARTITION_CPU_INFO *CpuInfo; diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c index eb0c1f8..2ac2d35 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c @@ -173,7 +173,7 @@ CreateHobListFromBootInfo ( // Base and size of buffer shared with privileged Secure world software MmramRanges[1].PhysicalStart = PayloadBootInfo->SpSharedBufBase; MmramRanges[1].CpuStart = PayloadBootInfo->SpSharedBufBase; - MmramRanges[1].PhysicalSize = PayloadBootInfo->SpPcpuSharedBufSize * PayloadBootInfo->NumCpus; + MmramRanges[1].PhysicalSize = PayloadBootInfo->SpSharedBufSize; MmramRanges[1].RegionState = EFI_CACHEABLE | EFI_ALLOCATED; // Base and size of buffer used for synchronous communication with Normal diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c index 9163025..e78b2ac 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c @@ -90,7 +90,7 @@ GetAndPrintBootinformation ( DEBUG ((DEBUG_INFO, "SpPcpuStackSize - 0x%x\n", PayloadBootInfo->SpPcpuStackSize)); DEBUG ((DEBUG_INFO, "SpHeapSize - 0x%x\n", PayloadBootInfo->SpHeapSize)); DEBUG ((DEBUG_INFO, "SpNsCommBufSize - 0x%x\n", PayloadBootInfo->SpNsCommBufSize)); - DEBUG ((DEBUG_INFO, "SpPcpuSharedBufSize - 0x%x\n", PayloadBootInfo->SpPcpuSharedBufSize)); + DEBUG ((DEBUG_INFO, "SpSharedBufSize - 0x%x\n", PayloadBootInfo->SpSharedBufSize)); DEBUG ((DEBUG_INFO, "NumCpus - 0x%x\n", PayloadBootInfo->NumCpus)); DEBUG ((DEBUG_INFO, "CpuInfo - 0x%p\n", PayloadBootInfo->CpuInfo)); -- cgit v1.1