From nobody Tue Feb 10 06:05:00 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+105942+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+105942+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1686245020; cv=none; d=zohomail.com; s=zohoarc; b=JUk/MP59kLP8azo0rlZBlqk4rbpz3DyAyrt5XCf1Bt4F5sC7+3Um/+4cwJYm2NFKqVd3foCc5PboO6YZ0gza0wrjifjF9pGwxIyf9t3WmoMKgMEfcPL5+XJpoD2DKYthyB/HLYyG+1qnsbjd2vFhYQAsDEDmCd/Q6F1+AgqMrag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686245020; 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=j4En9xbfCF62eN7OGE26DqR8RSGtWf4mxA4rUwmhkjU=; b=YFretCIdGhVJK/+9MAA/n6dcHKtW02dUUUTTPNzxaFWu6GROfe6QXlX+7rrAcaMUanSPmILhgtA0C2gjkhN70Zxe9t6kIHw48yzGsoZX13br4XxKuJkfSkCKtpUSUbkO5qN0eUkHcXbESuMHZhn/rnYZXSJaNsJmo3piSFVGGFc= 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+105942+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 1686245020211426.29467509684594; Thu, 8 Jun 2023 10:23:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KxicYY1788612xunK2Mi4YuY; Thu, 08 Jun 2023 10:23:39 -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.127.1686245019028191765 for ; Thu, 08 Jun 2023 10:23:39 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9528160DBD; Thu, 8 Jun 2023 17:23:38 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10B26C433EF; Thu, 8 Jun 2023 17:23:34 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Ray Ni , Jiewen Yao , Gerd Hoffmann , Taylor Beebe , Oliver Smith-Denny , Dandan Bi , Dun Tan , Liming Gao , "Kinney, Michael D" , Michael Kubacki , Eric Dong , Rahul Kumar , Kun Qin Subject: [edk2-devel] [PATCH 1/2] UefiCpuPkg/CpuMpPei: Print correct buffer size used for page table Date: Thu, 8 Jun 2023 19:23:22 +0200 Message-Id: <20230608172323.9096-2-ardb@kernel.org> In-Reply-To: <20230608172323.9096-1-ardb@kernel.org> References: <20230608172323.9096-1-ardb@kernel.org> 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,ardb@kernel.org X-Gm-Message-State: sM6y3zLR00tLyXy3STvcPdu4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1686245019; bh=NN6lFfMdM3p5BX0vSxkuhmFQ4CehJILTGQV60cL61t8=; h=Cc:Date:From:Reply-To:Subject:To; b=SntpQ+hzWwLY4gInWBPJKaoPBHNq3NntBZadO+H0FXHw0b8P5dN9OGh7JPY6vcRQKjV hbvvcJuNqYfwnJsr1dIetjWAJTruYvI5NByD3LoCRTq7VOdSclHkzZozOBWDgran4sd2z gwmGWQvUc5tvxfbkyqtLtvuRctWpsy3Vt5E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1686245020759100005 Content-Type: text/plain; charset="utf-8" The DEBUG print that outputs the base and size of the page table allocation always prints 0x0 for the size, given that BufferSize will be updated by PageTableMap () and contain the unused allocation on return. So move the DEBUG print right after the allocation. Signed-off-by: Ard Biesheuvel Reviewed-by: Michael Kubacki --- UefiCpuPkg/CpuMpPei/CpuPaging.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuPaging.c b/UefiCpuPkg/CpuMpPei/CpuPagin= g.c index b7ddb0005b6fbcac..175e47ccd737a0c1 100644 --- a/UefiCpuPkg/CpuMpPei/CpuPaging.c +++ b/UefiCpuPkg/CpuMpPei/CpuPaging.c @@ -396,6 +396,13 @@ EnablePaePageTable ( return EFI_OUT_OF_RESOURCES; } =20 + DEBUG (( + DEBUG_INFO, + "EnablePaePageTable: Created PageTable =3D 0x%x, BufferSize =3D %x\n", + PageTable, + BufferSize + )); + Status =3D PageTableMap (&PageTable, PagingPae, Buffer, &BufferSize, 0, = SIZE_4GB, &MapAttribute, &MapMask, NULL); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status) || (PageTable =3D=3D 0)) { @@ -417,13 +424,6 @@ EnablePaePageTable ( // AsmWriteCr0 (AsmReadCr0 () | BIT31); =20 - DEBUG (( - DEBUG_INFO, - "EnablePaePageTable: Created PageTable =3D 0x%x, BufferSize =3D %x\n", - PageTable, - BufferSize - )); - return Status; } =20 --=20 2.39.2 -=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 (#105942): https://edk2.groups.io/g/devel/message/105942 Mute This Topic: https://groups.io/mt/99411874/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-