From nobody Mon Feb 9 15:30:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82128+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82128+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.alibaba.com ARC-Seal: i=1; a=rsa-sha256; t=1634288830; cv=none; d=zohomail.com; s=zohoarc; b=gpb5ZdPkjrzeBChvQH//A7GfE7raPXKJ8rq6j0QMSDGmQtQBgcXFRXSD1ENoUrL4vsqWeX89ZcWsjmSsg7zy71yov6QCVWkl9vXGq5qdhKpCJr6azqY7XvcnH2uaRomC2IvlYvoI3C3uFF4+h1DQW950KlBEBEUu6imB0XJqFKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634288830; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=A6gGEvDTVtsgrz8ohpTqkzZHr6URL0sFrUg/M6e4ZPc=; b=bxjVIVbC+zW0Z7N6a4Efdr8CzKn7lD/zCGmruSHPDMNTbp6zuMSog7L34VpDhd0Tp5kY/C+pLGyo08dJm7i6Osu+bw9mi699Rn1RZbqggkqqJuRZHveTu7e1fR3XVIzlQPv/ZyIwlp1P6TLOckdKitZX3/v+Tq3eAfeYexInL4k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82128+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634288830919797.8539436091958; Fri, 15 Oct 2021 02:07:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id V4jYYY1788612xsGvQXyrZDi; Fri, 15 Oct 2021 02:07:10 -0700 X-Received: from out4436.biz.mail.alibaba.com (out4436.biz.mail.alibaba.com [47.88.44.36]) by mx.groups.io with SMTP id smtpd.web09.7035.1634288828981080073 for ; Fri, 15 Oct 2021 02:07:09 -0700 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=huangming@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Us71SiA_1634288787; X-Received: from 842effaa37a8.tbsite.net(mailfrom:huangming@linux.alibaba.com fp:SMTPD_---0Us71SiA_1634288787) by smtp.aliyun-inc.com(127.0.0.1); Fri, 15 Oct 2021 17:06:55 +0800 From: "Ming Huang" To: devel@edk2.groups.io, sami.mujawar@arm.com, ardb+tianocore@kernel.org, jiewen.yao@intel.com, supreeth.venkatesh@arm.com Cc: ming.huang-@outlook.com, Ming Huang Subject: [edk2-devel] [PATCH edk2 v1 1/3] StandaloneMmPkg: Fix issue about SpPcpuSharedBufSize field Date: Fri, 15 Oct 2021 17:06:21 +0800 Message-Id: <20211015090623.52511-2-huangming@linux.alibaba.com> In-Reply-To: <20211015090623.52511-1-huangming@linux.alibaba.com> References: <20211015090623.52511-1-huangming@linux.alibaba.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,huangming@linux.alibaba.com X-Gm-Message-State: WOooOgZ38mJOXLCsSrIKdzj0x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634288830; bh=f2wxP9e2fxgzjKrMyyF1+kXy1ckgyC2y7biUch9ui4w=; h=Cc:Date:From:Reply-To:Subject:To; b=YL8jKJexB2G1Zno/rSq/1bPYpTtINNLPszE5JfHCehx0t3od5dZgPloJ+MVlyIra+rT sWQy/GZJePK1j+Uie9T4jWKOY3fyHkWt2xvagnl1NbSmJshV/wstdUEr0PWxTfANEUdCl sO7ZrPh4vzKXMrWBtMP960Dj43FadSkKuJg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634288831305100002 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h = | 2 +- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c = | 2 +- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEnt= ryPoint.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint= .h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h index c44f7066c6..f1683ecb61 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/CreateH= obList.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHob= List.c index 85f8194687..93773c9fe8 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 =3D PayloadBootInfo->SpSharedBufBase; MmramRanges[1].CpuStart =3D PayloadBootInfo->SpSharedBufBase; - MmramRanges[1].PhysicalSize =3D PayloadBootInfo->SpPcpuSharedBufSize * = PayloadBootInfo->NumCpus; + MmramRanges[1].PhysicalSize =3D PayloadBootInfo->SpSharedBufSize; MmramRanges[1].RegionState =3D EFI_CACHEABLE | EFI_ALLOCATED; =20 // Base and size of buffer used for synchronous communication with Normal diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/Standal= oneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/= Arm/StandaloneMmCoreEntryPoint.c index 49cf51a789..5db7019dda 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCo= reEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCo= reEntryPoint.c @@ -87,7 +87,7 @@ GetAndPrintBootinformation ( DEBUG ((DEBUG_INFO, "SpPcpuStackSize - 0x%x\n", PayloadBootInfo->SpPcpuS= tackSize)); DEBUG ((DEBUG_INFO, "SpHeapSize - 0x%x\n", PayloadBootInfo->SpHeapS= ize)); DEBUG ((DEBUG_INFO, "SpNsCommBufSize - 0x%x\n", PayloadBootInfo->SpNsCom= mBufSize)); - DEBUG ((DEBUG_INFO, "SpPcpuSharedBufSize - 0x%x\n", PayloadBootInfo->SpP= cpuSharedBufSize)); + DEBUG ((DEBUG_INFO, "SpSharedBufSize - 0x%x\n", PayloadBootInfo->SpShare= dBufSize)); =20 DEBUG ((DEBUG_INFO, "NumCpus - 0x%x\n", PayloadBootInfo->NumCpus= )); DEBUG ((DEBUG_INFO, "CpuInfo - 0x%p\n", PayloadBootInfo->CpuInfo= )); --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82128): https://edk2.groups.io/g/devel/message/82128 Mute This Topic: https://groups.io/mt/86334819/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-