From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 35575AC128A for ; Mon, 13 May 2024 11:07:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HgwYH6yRG4HmuYrK9zaoTtCXxgWpVPbQ0xnY05LStN8=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1715598435; v=1; b=ceY+9VoLC9e5N+jQKTk4VYvVVRT1/nOeWTtRYqz1POQv9YfAOntktdmRVH2/oVRmHaOIKFZK nYMA0Lpzd9PF7oKrOeV/SaJLyR4KfB00OKt+SmuIs89ArH9rCSls6bTSbjaj2zwZFljFYgGJ/nJ xVm3L2AAkYCLijc6kdOqA0mCippCghFwas3kXHBTA4xBAnNdzJXTQhlKZZxFFmexZtNBJYu7HgL jlg/eubTkFtJDJlilgGBOAITsHJZf4l5NaU9lXiMELW9QK4Opa7iPA1A530CrL38a7edgMJ7Tuo Dvad+RUVlmdYg5Oj2HUgWJvQb+BMBgqgQXVaLPm0l+ALA== X-Received: by 127.0.0.2 with SMTP id aEtsYY7687511xKhBJFi8x1E; Mon, 13 May 2024 04:07:15 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.57576.1715598434542028608 for ; Mon, 13 May 2024 04:07:14 -0700 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-358-_aMTGZwlO8m5veg21UWIaA-1; Mon, 13 May 2024 07:07:10 -0400 X-MC-Unique: _aMTGZwlO8m5veg21UWIaA-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 09F9A8030B2; Mon, 13 May 2024 11:07:10 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 093E840C6EB7; Mon, 13 May 2024 11:07:08 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CA86618009BA; Mon, 13 May 2024 13:07:07 +0200 (CEST) Date: Mon, 13 May 2024 13:07:07 +0200 From: "Gerd Hoffmann" To: Dun Tan Cc: devel@edk2.groups.io, Ray Ni , Laszlo Ersek , Rahul Kumar , Jiaxin Wu Subject: Re: [edk2-devel] [PATCH 10/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib Message-ID: <23ygznnvg23olq44ztztul76f6sctv3dcqocetesuuixrtxaom@jo7k4ncqdq3b> References: <20240510100827.1903-1-dun.tan@intel.com> <20240510100827.1903-11-dun.tan@intel.com> MIME-Version: 1.0 In-Reply-To: <20240510100827.1903-11-dun.tan@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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 Resent-Date: Mon, 13 May 2024 04:07:14 -0700 Resent-From: kraxel@redhat.com Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1IIsRfoTSwe4Ov95qoRjzmLbx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=ceY+9VoL; 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 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Hi, > + if (sizeof (UINTN) == sizeof (UINT64)) { > + // > + // Check Page5Level Support or not. > + // > + Cr4.UintN = AsmReadCr4 (); > + Page5LevelSupport = (Cr4.Bits.LA57 ? TRUE : FALSE); > + > + // > + // Check Page1G Support or not. > + // > + Page1GSupport = FALSE; > + AsmCpuid (CPUID_EXTENDED_FUNCTION, &RegEax, NULL, NULL, NULL); > + if (RegEax >= CPUID_EXTENDED_CPU_SIG) { > + AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, &RegEdx.Uint32); > + if (RegEdx.Bits.Page1GB != 0) { > + Page1GSupport = TRUE; > + } > + } > + > + // > + // Decide Paging Mode according Page5LevelSupport & Page1GSupport. > + // > + if (Page5LevelSupport) { > + PagingMode = Page1GSupport ? Paging5Level1GB : Paging5Level; > + } else { > + PagingMode = Page1GSupport ? Paging4Level1GB : Paging4Level; > + } > + } else { > + PagingMode = PagingPae; > + } I'm wondering whenever CpuPageTableLib should get a function for this? I suspect there a multiple places in edk2 which will need this functionality ... take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118862): https://edk2.groups.io/g/devel/message/118862 Mute This Topic: https://groups.io/mt/106018135/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-