From nobody Fri Apr 26 08:12:25 2024 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+80400+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+80400+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1631159224; cv=none; d=zohomail.com; s=zohoarc; b=fl6deSQInZqk2Cq3ykotjtMx/tEAyM1u4DJ5mo7mYqMkg2iwMvXFdOzhCuGyOfNw29gmo9vf2zwETjwb/+PpKtG3paJD1/5ArKPW8y+h8fvhfnuTe5c4ASota+WKntHvgiys3lcsGvu+b6mH9b66S3eW1EGfcwlH7iZDc8QmQGU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631159224; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=gOVWkqW/oBEjhDhthtLBcg6Bx1MQS8PDNvUM1yp4DSY=; b=l/hnzkFrDwWzy3ZHSOR9hU615X17208nMcpF6DpbqF8wOe6TRAdY2O3V+ArDUsoB9XK1zZ5pRm35QuPQuxWawlQQOltQ6HL+n5khhSUcDoKDxYP//hnAKmSy8xexsgvCtQFOaqMOgM8T2iMktjmegsctemyZ3UJucXuLIJHP2yk= 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+80400+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 163115922495353.33622967512315; Wed, 8 Sep 2021 20:47:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LbirYY1788612x3idE1fUSRX; Wed, 08 Sep 2021 20:47:04 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.2948.1631159223732885616 for ; Wed, 08 Sep 2021 20:47:03 -0700 X-Received: from localhost.localdomain (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id C4C3420B6C51; Wed, 8 Sep 2021 20:47:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C4C3420B6C51 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH v1 1/3] MdeModulePkg/Core/Pei: Fix typo in function descriptions Date: Wed, 8 Sep 2021 23:45:59 -0400 Message-Id: <20210909034601.699-2-mikuback@linux.microsoft.com> In-Reply-To: <20210909034601.699-1-mikuback@linux.microsoft.com> References: <20210909034601.699-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 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,mikuback@linux.microsoft.com X-Gm-Message-State: zhyYPT7LEbcRDgwswlIl8CWjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631159224; bh=KUBWatccc4b+TinMmEdoNxXcWhfoXY5SE8wETV7fbZg=; h=Cc:Date:From:Reply-To:Subject:To; b=SmUbkx48sm0l6n2ki63UBQLnELNuAFAlcKKRnFaPfdROMV4WXHAyU/7KXc0xP4CXUZ3 T2/sOWWxHwKLcqZr1nOH8Frz49lbtRpxxB3kvN7SH3bWDCGtIvzEi72JfPT5foDh2wgyj ySW8rGJ9NrGsN6jIsCGPcd11qfPGI0l6hNA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631159225534100002 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki Corrects a typo in the return value description of MigratePeim() and EvacuateTempRam(): "Succesfully" to "Successfully" Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Michael Kubacki Reviewed-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 4 ++-- MdeModulePkg/Core/Pei/PeiMain.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 61d4b67c64b9..8780297a77fc 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -958,7 +958,7 @@ PeiCheckAndSwitchStack ( @param PeimFileHandle Pointer to the FFS file header of the image. @param MigratedFileHandle Pointer to the FFS file header of the migrat= ed image. =20 - @retval EFI_SUCCESS Sucessfully migrated the PEIM to permanent m= emory. + @retval EFI_SUCCESS Successfully migrated the PEIM to permanent = memory. =20 **/ EFI_STATUS @@ -1120,7 +1120,7 @@ MigratePeimsInFv ( environment, such as the size and location of tem= porary RAM, the stack location and the BFV location. =20 - @retval EFI_SUCCESS Succesfully migrated installed FVs from te= mporary RAM to permanent memory. + @retval EFI_SUCCESS Successfully migrated installed FVs from t= emporary RAM to permanent memory. @retval EFI_OUT_OF_RESOURCES Insufficient memory exists to allocate nee= ded pages. =20 **/ diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMai= n.h index daa48b4c5f37..0046f19447ba 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -419,7 +419,7 @@ MigratePeim ( environment, such as the size and location of tem= porary RAM, the stack location and the BFV location. =20 - @retval EFI_SUCCESS Succesfully migrated installed FVs from te= mporary RAM to permanent memory. + @retval EFI_SUCCESS Successfully migrated installed FVs from t= emporary RAM to permanent memory. @retval EFI_OUT_OF_RESOURCES Insufficient memory exists to allocate nee= ded pages. =20 **/ --=20 2.28.0.windows.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 (#80400): https://edk2.groups.io/g/devel/message/80400 Mute This Topic: https://groups.io/mt/85477363/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- From nobody Fri Apr 26 08:12:25 2024 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+80401+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+80401+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1631159229; cv=none; d=zohomail.com; s=zohoarc; b=AVwrne0j+Sg82q9M2GHEctdXE/YZSz8AmkStNLPrmXtG1n0nwOt7M7ZhEjtVy11zF+InMRkmwDZoyQTv/hOX66T2lNV36gcBUyZUrXBJJbbLEhom8hiCtWG4z2yQpgx/ci+8BSD1qIec9ABkkFESmmDEJdTGFfMDd5EE9lqw6wI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631159229; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=WY016CTnTlwI2TZ2Mog9pZv/wjK18dXMVyj0qTi42+E=; b=HkeKWfpcB+UiZL8KHhuFysUq5jzHMyZ2S5j2oWDiW3yGmnw7+WcZoG3GKVcVVNsIYH3m1xWDLJvHuZOXt+NVDkY2G6vJOCiPw/D3OJ37Q0NtZ7mtqxg5rnbA/sMzHnQEPLVZrv6C8Vhu5IuOvslqypwfX661k485AV0oryProes= 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+80401+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 1631159229273334.8183886473871; Wed, 8 Sep 2021 20:47:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YyWVYY1788612xPXixQL8Rc4; Wed, 08 Sep 2021 20:47:08 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.2963.1631159228162852726 for ; Wed, 08 Sep 2021 20:47:08 -0700 X-Received: from localhost.localdomain (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id D754420B6C51; Wed, 8 Sep 2021 20:47:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D754420B6C51 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH v1 2/3] MdeModulePkg/Core/Pei: Make migrated PEIM message verbose Date: Wed, 8 Sep 2021 23:46:00 -0400 Message-Id: <20210909034601.699-3-mikuback@linux.microsoft.com> In-Reply-To: <20210909034601.699-1-mikuback@linux.microsoft.com> References: <20210909034601.699-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 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,mikuback@linux.microsoft.com X-Gm-Message-State: 5R88DM31YGsInN0zgxYo7VM7x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631159228; bh=A4RNB11Yd9/gIqxvpbSBpu1tqAaOODCLsTRbLNgRjoc=; h=Cc:Date:From:Reply-To:Subject:To; b=CHQSX/MEdwwaez135X4oZGhJHcrx4Juu4uGcah2ccEjz4XM8QeAHvYfMtIOX98cCcTH DcAONZhU56E3JlHIMGcR7KbeKpssw4p2ftxoBeWy/LP06k1Iv/JFdXN5d705pU0GgN04Q CHgJ50b5a/E88xf0QOThmGHiH2WalxWq5JY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631159229749100001 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki Currently, the debug message that prints the name of a PEIM being migrated is DEBUG_INFO while similar messages are DEBUG_VERBOSE. This change updates the print level to DEBUG_VERBOSE for consistency. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Michael Kubacki Reviewed-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 8780297a77fc..a050a6ed9646 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -993,7 +993,7 @@ MigratePeim ( AsciiString[Index] =3D 0; } } - DEBUG ((DEBUG_INFO, "%a", AsciiString)); + DEBUG ((DEBUG_VERBOSE, "%a", AsciiString)); DEBUG_CODE_END (); =20 Pe32Data =3D (VOID *) ((UINTN) ImageAddress - (UINTN) MigratedFileHand= le + (UINTN) FileHandle); --=20 2.28.0.windows.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 (#80401): https://edk2.groups.io/g/devel/message/80401 Mute This Topic: https://groups.io/mt/85477364/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- From nobody Fri Apr 26 08:12:25 2024 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+80402+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+80402+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1631159233; cv=none; d=zohomail.com; s=zohoarc; b=mCMCfCwD1DRUJEbQ69Sh5tGRBwLExTHLssDuKYhYjOzMnFlWxQSnfoCi9bGo+9/gU4f/JMJslx8/YqEUyBewBhoYRkIr3KwIl9+ec5mkkhu3POwynW8iWYChDJ2VprSA+D/SkUrafQJqeDNBShO7CPNPc98JeKZnmOyXlLw2JY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631159233; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cso4T4gqSO4JU3JxCBw5QGei/uVoYE9TxlijsIg1Btw=; b=N0D8HKxSKbz44n20TieNpXmRiFTFg0j6I6p3pgvH8No5V3dHG+fiUbD/DuRXQzohgPunz4A/fcBcnBPI4akyPPURf02qM/Obmr2yJqgKrwcTBMVUSSssFkF7KdDtkdV+EOR5cVoJSWaWuiILKiph9/0VqclGuMvy5ZxXrMN6po8= 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+80402+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 1631159233503939.1646292106112; Wed, 8 Sep 2021 20:47:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id J0XNYY1788612xVs4lqkldeG; Wed, 08 Sep 2021 20:47:13 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.2936.1631159232480516358 for ; Wed, 08 Sep 2021 20:47:12 -0700 X-Received: from localhost.localdomain (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id 9128720B6C51; Wed, 8 Sep 2021 20:47:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9128720B6C51 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/Core/Pei: Fix pointer size mismatch in EvacuateTempRam() Date: Wed, 8 Sep 2021 23:46:01 -0400 Message-Id: <20210909034601.699-4-mikuback@linux.microsoft.com> In-Reply-To: <20210909034601.699-1-mikuback@linux.microsoft.com> References: <20210909034601.699-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 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,mikuback@linux.microsoft.com X-Gm-Message-State: htpMEvbmE6SqiLZTfYQqC2OTx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631159233; bh=LZj6MGn5IGRU9qCUI/PDEJafS9w009ieWNAAkjZClvI=; h=Cc:Date:From:Reply-To:Subject:To; b=LIq/LnQGn7jXFgWRaBM2NFOk04ZQ30WmKdwmoFlaiVHcaYUT76eFIaH6+1HmgvDsqKf xmH93/WL8EQKPW2Unv9N6E7vb/uWPq/EMdmJPYrRXNW2i3QDS8Wgeo2aZEejO+nY7VlxF VL5Ewn48oFrdVWGB3D+kszEhPEYa3jIzglY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631159233903100002 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3512 In 32-bit PEI, the local variable pointers MigratedFvHeader and RawDataFvHeader in EvacuateTempRam() will be 32-bit in size. The pointers are currently passed to PeiServicesAllocatePages() which expects a 64-bit output buffer of type EFI_PHYSICAL_ADDRESS. When PeiServicesAllocatePages() writes to the buffer, the data can overflow. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Michael Kubacki Reviewed-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index a050a6ed9646..f6bb906f38f3 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -1135,6 +1135,7 @@ EvacuateTempRam ( volatile UINTN FvIndex; volatile UINTN FvChildIndex; UINTN ChildFvOffset; + EFI_PHYSICAL_ADDRESS FvHeaderAddress; EFI_FIRMWARE_VOLUME_HEADER *FvHeader; EFI_FIRMWARE_VOLUME_HEADER *ChildFvHeader; EFI_FIRMWARE_VOLUME_HEADER *MigratedFvHeader; @@ -1186,9 +1187,10 @@ EvacuateTempRam ( Status =3D PeiServicesAllocatePages ( EfiBootServicesCode, EFI_SIZE_TO_PAGES ((UINTN) FvHeader->FvLength), - (EFI_PHYSICAL_ADDRESS *) &MigratedFvHeader + &FvHeaderAddress ); ASSERT_EFI_ERROR (Status); + MigratedFvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FvHeaderAd= dress; =20 // // Allocate pool to save the raw PEIMs, which is used to keep consis= tent context across @@ -1197,9 +1199,10 @@ EvacuateTempRam ( Status =3D PeiServicesAllocatePages ( EfiBootServicesCode, EFI_SIZE_TO_PAGES ((UINTN) FvHeader->FvLength), - (EFI_PHYSICAL_ADDRESS *) &RawDataFvHeader + &FvHeaderAddress ); ASSERT_EFI_ERROR (Status); + RawDataFvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FvHeaderAdd= ress; =20 DEBUG (( DEBUG_VERBOSE, --=20 2.28.0.windows.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 (#80402): https://edk2.groups.io/g/devel/message/80402 Mute This Topic: https://groups.io/mt/85477365/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-