From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D0082D80A5F for ; Thu, 7 Sep 2023 15:38:35 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Gxn4LVO4ke55N3JWSW/iPtZFbj/yPuMHnagVSRcEE9A=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1694101114; v=1; b=VmnvOhoSFsBaksB4y5GZ4a9K0JXETXKGahVUaj8gDvS3bp0VUGzlzEhFaGv+y0NI6l5BwPDv 3MhiiKpIrS5QkEvjZcOjGPqGVWWmu+ecDRtYKH55rC6tbBpumLw3+tFgb6gfgJL2zIY7cM/JpVD qS7wwoFzRDYKuSXUSrD8hHCY= X-Received: by 127.0.0.2 with SMTP id emoDYY7687511xfJSNGXI7hb; Thu, 07 Sep 2023 08:38:34 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.133]) by mx.groups.io with SMTP id smtpd.web10.16128.1694101113712764199 for ; Thu, 07 Sep 2023 08:38:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WX7p8X2AJ928RGVaA4FAeyrlDiHaTL8TgUDfPamhDHFtyB+WIdpRAec3T80ejqwsFhm9QZb4bK8QgK1hhyTaWPsoxD2oxBfZ9omH1xXXJxxuVVYQqEsQJVuXca+znn1Rs0oAYsKaRBzWiFZXV7BW+F0HUfDKZauHDLxONBDNib8/YvYiIbYuiYFBnuxbBJDex1rpTTwnkp3Isdq8EwpQewx/1Jcxw3Zkt9aVw4ngOn9zBPNd6UUW1QfcTZMD0IE9SExAbI8iA6rXeP6D4ovqJaeetHv/Rcru1vNBT2lQKGRK87soCJeKWex5f6FQAAhCk8qSPaCo5RIWFgciRbVlvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zjpr1Vwxzb/a/QN2dS88Pb1/3o5q4GhmdMRvbxx7Ii0=; b=b3O629L/fHSFF5fXcEzmvkIxZEVbD9OmGE7vGjenedGnX9lS0jba8I2NOt01xZ85yKgCWhoGNjrat6AguNcRDP47WdDFKUJxWM2v8bPED7BsEhgktF1+qe1JHRRD41m/BnVPx/D1QEZXJMhHpjs2gkseoDSZ4to2llwHNqE8+sk8oe9JgIJXuRc+9F/OhC+jh92CLlPEyU4bWFy+zA/aL+1JaArtJSq67tWRJyZTHASKV7ZPCs+NqD2/WaVdfcoaPlWctRWvtKSIheZYR7Xuo0+plXR76ToIZk5FEcajhAVqaWlASkDeD57rppqGPU4eAS5uSlcqkyuv0UBBTdzqHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by SA0PR01MB6284.prod.exchangelabs.com (2603:10b6:806:e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 15:38:30 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::dc7b:d4c5:71cf:1ea0]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::dc7b:d4c5:71cf:1ea0%4]) with mapi id 15.20.6745.030; Thu, 7 Sep 2023 15:38:30 +0000 Message-ID: Date: Thu, 7 Sep 2023 22:38:09 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue To: Oliver Smith-Denny , devel@edk2.groups.io, ardb@kernel.org Cc: "Ni, Ray" , "nhi@os.amperecomputing.com" , "huangming@linux.alibaba.com" , Sami Mujawar , Ard Biesheuvel , "Yao, Jiewen" , Supreeth Venkatesh , "ming.huang-@outlook.com" References: <20220209122558.60329-1-huangming@linux.alibaba.com> <20220209122558.60329-3-huangming@linux.alibaba.com> <14f25a95-7153-4eec-8804-a3da768ccb11@linux.alibaba.com> <0e0bc14c-88a1-21a8-0be7-34ed023e1127@amperemail.onmicrosoft.com> <59c604a4-7e65-4319-8441-806a29327f6f@linux.microsoft.com> <2485a946-3cab-9b9e-feb9-47084074c35c@amperemail.onmicrosoft.com> <2654664c-63c1-41e2-b2d4-2946a7963afd@linux.microsoft.com> From: "Nhi Pham via groups.io" In-Reply-To: <2654664c-63c1-41e2-b2d4-2946a7963afd@linux.microsoft.com> X-ClientProxiedBy: CH0PR03CA0096.namprd03.prod.outlook.com (2603:10b6:610:cd::11) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|SA0PR01MB6284:EE_ X-MS-Office365-Filtering-Correlation-Id: 401e8604-a9a7-47cc-52e3-08dbafb87c91 X-LD-Processed: 3bc2b170-fd94-476d-b0ce-4229bdc904a7,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 5/eO9ZQRbTWZTdCCCo2zBcNcu6mKUXilalW9tfJ7NUPe4s6EZTasgDMZBDi4We9CRtgZJ3YPT7RUOcPY5V40m1iXzIMgw9VNpL2XxHMKgUOrGhcRnBcL2xJgtWHQp+adbVYkCT+oLArlgytqnPr79wXlxWUEUrzld/AS4leor6SFdctkNek4d22eZFZssSJArT12FCqM2C63hmWq+tbZ6su6Ir4Go4co76FK+gumAya3gRmFlQiItrfkMvUMkhYeh++XrRYgJnXTjnAr58z+feURF4oNYqaj8bZOQuJc2hfTzPNOBEkrjjTwBIN1trV7jvHCKgE7Z79nowaEcMiANyKbkGViYrjcMphxIChDEU0JUHeXbDW4UB71tN2d6Pc2kWGX9E0LBubW5ptPYF7bdU8Ims9rf5QfPi6DLQJAR/uDUDPjSDLUTRgPnUwtwXV78CxOtFRmQoIxVZKE0xtV7ZwCTvBSvMeCVJjckQV9JPpEi4e2Fs1jnYL3Lr1nv0j21JBOryMQpq2jSDxPZLo8LNGMM2nuBcnOOct2seYJ554fynjukcU+ZSpkL2h1RXD+17L82IXifCrQDyLFxcozD2S57lhguf9Dq6mFmq9yLfaWZNC73dhwH+nlFETRySYsd+FgmDhqwNR7y/XizCfUVw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dkU0NDhtTHc4Y1U5ZVFETWdqRFo2NDRscmZlYTAvcXIwLzByeGlwdFJqbXFI?= =?utf-8?B?S1RYellINFJzbEJYU0dtRzBIVUE2R1IvYlhQR0xQZ0xTQWREVzVkRjdRUG9h?= =?utf-8?B?N2tNd1c1OXB0alFUcnZUTVJuZThOMER3RjVZYWt3cFZLblhlY0tDMFpUR01B?= =?utf-8?B?eWlycmdCNm1wK1pwayttRHdNNml6NDJodGNUTUdsaWJHU2RHbDRtWjErUDYw?= =?utf-8?B?eEZscVFqTDVDRTF2VmVwMXgxUVhJNnlhaVRxUHlxVW9BMEpYNUJvelpndFht?= =?utf-8?B?K1VMR0R6NUJsVVliRURmL0pmaldiRXErdU1VSmpCTEpCcnJZZWpzdFd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2RHVRZHBvMlNtVWFWeDZOLzcxeDdqRjZxSC8vbzFFTDNZMy80?= =?utf-8?B?bXc9PQ==?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 401e8604-a9a7-47cc-52e3-08dbafb87c91 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 15:38:30.3749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bDItojfhcog25CDsSm7Ll3bb4wA9AkbCApcslt8jS+LhZBGFWThOJbEPTW+mA3A25JpGF/2AQjcfS8jBi0sItnKAKYJ8qPWrkWZ4YG4VbQI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR01MB6284 Precedence: Bulk 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,nhi@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: vw9HykPRTx8YrAa1Bvwys7YTx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=VmnvOhoS; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") On 9/6/2023 11:22 PM, Oliver Smith-Denny wrote: > On 9/6/2023 1:50 AM, Ard Biesheuvel wrote: >> On Wed, 6 Sept 2023 at 09:56, Nhi Pham=20 >> wrote: >>> >>> On 9/6/2023 1:33 PM, Ni, Ray wrote: >>>> [EXTERNAL EMAIL NOTICE: This email originated from an external sender. >>>> Please be mindful of safe email handling and proprietary information >>>> protection practices.] >>>> >>>> I am a bit confused. >>>> >>>> The HOB list in standalone MM is read-only. Why could any module call >>>> BuildGuidHob() to modify the HOB. >>>> >>>> I saw Oliver mentioned something about StMM. I don't know what that=20 >>>> is. >>>> But it seems that's ARM specific. Then, I don't think it's proper to >>>> modify code here for a specific arch ARM. >>> >>> The HOB creation is available in the >>> StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf. If >>> other architectures also use that instance, I think the issue is not >>> specific to ARM. >>> >> >> The question here is whether the implementation follows the PI spec, >> and whether HOB creation should be supported to begin with. >> > > My reading of the PI spec is that this implementation does not follow > it. However, the PI spec is not very explicit about Standalone MM in > general, but particularly in relation to HOBs. > > However, in the generic HOB section of PI spec v1.7, Vol. 3, section 4 > (entitled HOB Design Discussion) it explicitly lays out that there are > HOB producer phases and HOB consumer phases. It uses PEI as a HOB > producer phase and DXE as a HOB consumer phase and explicitly says > that the HOB consumer phase must treat HOBs as read-only memory, per > Ray's comment. > > In vol. 4, section 2.2, in discussing the Standalone MM entry point, > the document talks about the HOB list being passed to Standalone MM > to consume, which per the reading of the above section would classify > Standalone MM as a HOB consumer phase, where HOBs should then be > read-only. > > So, I believe that we should not support HOB creation in Standalone MM > and instead rely on other mechanisms to pass information within the > phase. Per Nhi's other email in this thread, we should have the > discussion on how to solve that specific problem and that may well > lead to a discussion on whether HOBs are in fact the right mechanism > here, but I tend to lean towards leaving something as architectural as > HOBs to what the PI spec defines and using different mechanisms to > accomplish in-phase communication. Thanks Oliver so much for that. I agree. We should focus on my specific=20 problem with UEFI Variable Flash Info in StandaloneMM in another thread. > > Does this reading of the spec align with others' expectations? As I > mentioned to Ray in another thread, Standalone MM feels like it could > have extra clarification in a few areas in the PI spec. Thanks again. The HOB library should be updated to remove the HOB=20 creation once we have the clarification. Regards, Nhi > > Thanks, > Oliver -=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 (#108403): https://edk2.groups.io/g/devel/message/108403 Mute This Topic: https://groups.io/mt/89020085/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-