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 C78F97803E4 for ; Wed, 24 Jan 2024 15:49:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=UbI9Ojnfnzh2bDu3yi83fKxwY6UEVbrnBH92iO+1U70=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706111376; v=1; b=qhBRJrFvl8X/RVDJce+P6/KLpkQiCTgwlvZ25WDW08uc+YCjq4PO+UPeVc928DheJ0s0gaH/ XcfAMF6NNGY54VXYgLkQfgjLF3WLvQNF+umeWbOj4f6ANqEZvwriRbxyxx9Ya1iYugO+nVzjQxl dQSzOXb1UTQlymeESqcr79hE= X-Received: by 127.0.0.2 with SMTP id ZMWMYY7687511xTz1QsVL66B; Wed, 24 Jan 2024 07:49:36 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.26106.1706111375832868641 for ; Wed, 24 Jan 2024 07:49:35 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-B6hJolSLNW-qsoKU9MzWvA-1; Wed, 24 Jan 2024 10:49:31 -0500 X-MC-Unique: B6hJolSLNW-qsoKU9MzWvA-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4CD2283106F; Wed, 24 Jan 2024 15:49:31 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E79DC2E1E6; Wed, 24 Jan 2024 15:49:30 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 96AC9180038B; Wed, 24 Jan 2024 16:49:29 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , Liming Gao , Gerd Hoffmann Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg/VirtualMemory: drop 5-level paging assert Date: Wed, 24 Jan 2024 16:49:29 +0100 Message-ID: <20240124154929.2146147-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: T6OJcnN69ruk5c4PHa88c9vtx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qhBRJrFv; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (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 The ResetVector decides at runtime (depending in CPU capabilities) whenever it uses 5-level paging or not. Firmware builds with 5-level paging enabled (PcdUse5LevelPageTable=TRUE) may run run in 4-level paging mode. The code handles that just fine, by looking at the la57 bit in cr4 instead of checking PcdUse5LevelPageTable. The ASSERT is not correct, remove it. Signed-off-by: Gerd Hoffmann --- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c index 980c2002d4f5..575e396eeffd 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c @@ -745,7 +745,6 @@ CreateIdentityMappingPageTables ( // Cr4.UintN = AsmReadCr4 (); Page5LevelSupport = (Cr4.Bits.LA57 != 0); - ASSERT (PcdGetBool (PcdUse5LevelPageTable) == Page5LevelSupport); } else { // // If cpu runs in 32bit protected mode PEI, Page table Level in DXE is decided by PCD and feature capability. -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114314): https://edk2.groups.io/g/devel/message/114314 Mute This Topic: https://groups.io/mt/103934284/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-