]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StandaloneMmPkg: Fix issue about SpPcpuSharedBufSize field
authorMing Huang <huangming@linux.alibaba.com>
Fri, 31 Dec 2021 11:06:21 +0000 (19:06 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 7 Jul 2022 10:20:06 +0000 (10:20 +0000)
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 <huangming@linux.alibaba.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c

index 4593609dfc8f5eb39ff327ddbb248877729987a7..41bf0f132b4f7c4037d628951a830b8b6a5a049d 100644 (file)
@@ -41,7 +41,7 @@ typedef struct {
   UINT64                           SpPcpuStackSize;\r
   UINT64                           SpHeapSize;\r
   UINT64                           SpNsCommBufSize;\r
-  UINT64                           SpPcpuSharedBufSize;\r
+  UINT64                           SpSharedBufSize;\r
   UINT32                           NumSpMemRegions;\r
   UINT32                           NumCpus;\r
   EFI_SECURE_PARTITION_CPU_INFO    *CpuInfo;\r
index eb0c1f82db23c8dd30d3119b6c8b6e79d393fb96..2ac2d354f06adba7259f75f242937938a76b8e27 100644 (file)
@@ -173,7 +173,7 @@ CreateHobListFromBootInfo (
   // Base and size of buffer shared with privileged Secure world software\r
   MmramRanges[1].PhysicalStart = PayloadBootInfo->SpSharedBufBase;\r
   MmramRanges[1].CpuStart      = PayloadBootInfo->SpSharedBufBase;\r
-  MmramRanges[1].PhysicalSize  = PayloadBootInfo->SpPcpuSharedBufSize * PayloadBootInfo->NumCpus;\r
+  MmramRanges[1].PhysicalSize  = PayloadBootInfo->SpSharedBufSize;\r
   MmramRanges[1].RegionState   = EFI_CACHEABLE | EFI_ALLOCATED;\r
 \r
   // Base and size of buffer used for synchronous communication with Normal\r
index 9163025bca15506b01e98a4397d2f73caf74ded7..e78b2acacb5873cd12e69e5de2d357d6f5775e7e 100644 (file)
@@ -90,7 +90,7 @@ GetAndPrintBootinformation (
   DEBUG ((DEBUG_INFO, "SpPcpuStackSize - 0x%x\n", PayloadBootInfo->SpPcpuStackSize));\r
   DEBUG ((DEBUG_INFO, "SpHeapSize      - 0x%x\n", PayloadBootInfo->SpHeapSize));\r
   DEBUG ((DEBUG_INFO, "SpNsCommBufSize - 0x%x\n", PayloadBootInfo->SpNsCommBufSize));\r
-  DEBUG ((DEBUG_INFO, "SpPcpuSharedBufSize - 0x%x\n", PayloadBootInfo->SpPcpuSharedBufSize));\r
+  DEBUG ((DEBUG_INFO, "SpSharedBufSize - 0x%x\n", PayloadBootInfo->SpSharedBufSize));\r
 \r
   DEBUG ((DEBUG_INFO, "NumCpus         - 0x%x\n", PayloadBootInfo->NumCpus));\r
   DEBUG ((DEBUG_INFO, "CpuInfo         - 0x%p\n", PayloadBootInfo->CpuInfo));\r