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 35FEAAC1660 for ; Wed, 30 Aug 2023 13:10:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8YacWQfCL5lAvmQc25pcEYBC2d9ctbdHogDnISl9D9I=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1693401027; v=1; b=p5iCD3jz4bfOU8DLop1Jt3HudDSNsp638PO976zdIxzdcIurxN9HKsJ0HzWHKLmAddocYYqb nXK31odLySknOhE3FYLvbRV08vmo95JwtcbkonshTGzcgZkv7uQOV/PvdMD2dFEuac+t4asdVH8 4FyiNMbkadRMf0rUp1lQpmuo= X-Received: by 127.0.0.2 with SMTP id ek1nYY7687511xrcnuycDU9k; Wed, 30 Aug 2023 06:10:27 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.13497.1693401027100413716 for ; Wed, 30 Aug 2023 06:10:27 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 79B01623C4 for ; Wed, 30 Aug 2023 13:10:26 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 614AAC433CD for ; Wed, 30 Aug 2023 13:10:25 +0000 (UTC) X-Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4ff09632194so8881147e87.2 for ; Wed, 30 Aug 2023 06:10:25 -0700 (PDT) X-Gm-Message-State: YL0Zbi5idJLHw4vroujHXrTkx7686176AA= X-Google-Smtp-Source: AGHT+IGTu097nzzqSmgO7EN1JadGJ0iuJEZvJxuODz/BFnmUguTv4fYwANT2AgNSwRgjrDTwVVn27r4JrS6lzq7eLM8= X-Received: by 2002:a19:6914:0:b0:500:b890:fb38 with SMTP id e20-20020a196914000000b00500b890fb38mr1417986lfc.24.1693401023378; Wed, 30 Aug 2023 06:10:23 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <0e0bc14c-88a1-21a8-0be7-34ed023e1127@amperemail.onmicrosoft.com> From: "Ard Biesheuvel" Date: Wed, 30 Aug 2023 15:10:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue To: Nhi Pham Cc: devel@edk2.groups.io, huangming@linux.alibaba.com, Sami Mujawar , Ard Biesheuvel , Jiewen Yao , Supreeth Venkatesh , ming.huang-@outlook.com 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,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=p5iCD3jz; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Wed, 16 Aug 2023 at 10:56, Nhi Pham wrote: > > Hi Ard and Ming, > > I have been seeing an issue with StandaloneMM HobLib that can be fixed > by this patch as well. > > The function CreateHob() in the HobLib instance > StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf > does not work at all. The HobList is early created by the > StandaloneMmCoreEntryPoint then it is relocated on the heap memory by > StandaloneMmCore. But the FreeMemoryTop and FreeMemoryBottom are not > updated accordingly and the HOB free memory top is overlapped with the > heap space. This causes the CreateHob() function to not work as > expected. Introducing the PcdMemoryHobSize is reasonable to fix this issue. > > I tested this patch in my end. > > Tested-by: Nhi Pham > Thanks for reminding me. So if the HOB creation is completely broken, are we sure this is the correct fix? Wouldn't it be better to update FreeMemoryTop and FreeMemoryBottom to the correct values? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108145): https://edk2.groups.io/g/devel/message/108145 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] -=-=-=-=-=-=-=-=-=-=-=-