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 85402D80520 for ; Tue, 14 May 2024 06:52:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=oLf1+Bt5HzBGCIQTJXA3EPykOFeUSAfBnwc0jyrqgXE=; 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=1715669521; v=1; b=KPWofWWcrg26h5fkEEVjuLMlmsFYjM6+OGxq4JSrYXmWAA7f1nJyqN9G9UkGMPKBiiPjDFwb hnDmzWrs/QHGMPkVwvHHI3K+xGJKLC+w3pbyBAjADklcvxtAs20/1MeqheRcDwBCbbBHfNtfGUk E2jk+l8o5qF9LgcwkFwDdpi0IQMHWwLyp8A2Z3cOD7NAYnHuW8Y4vhYmt57CC7G9vzUUJGyrt+B XIcBqasSt6c9rxzRuAyWyBot7vgcaJCtxKGQqmrvSukDBCG7pdvYNafPalgLh2Ku1VAbYZ6rGqY h90vh2jd76vAPYK1iojGpWDUpjqddD8YGW773G/BNQrvQ== X-Received: by 127.0.0.2 with SMTP id W1bQYY7687511x5IzHUtaEWm; Mon, 13 May 2024 23:52:01 -0700 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.web11.8911.1715669520553411776 for ; Mon, 13 May 2024 23:52:00 -0700 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-159-9w6aigszOGO51xQ9s5xVFw-1; Tue, 14 May 2024 02:51:34 -0400 X-MC-Unique: 9w6aigszOGO51xQ9s5xVFw-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 64C0E3806702; Tue, 14 May 2024 06:51:33 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 300AD40C6EB7; Tue, 14 May 2024 06:51:33 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E76201800987; Tue, 14 May 2024 08:51:31 +0200 (CEST) Date: Tue, 14 May 2024 08:51:31 +0200 From: "Gerd Hoffmann" To: "Ni, Ray" Cc: "Tan, Dun" , "devel@edk2.groups.io" , "Kumar, Rahul R" , "Wu, Jiaxin" Subject: Re: [edk2-devel] [PATCH 10/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib Message-ID: References: <20240510100827.1903-1-dun.tan@intel.com> <20240510100827.1903-11-dun.tan@intel.com> <23ygznnvg23olq44ztztul76f6sctv3dcqocetesuuixrtxaom@jo7k4ncqdq3b> MIME-Version: 1.0 In-Reply-To: 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 23:52:00 -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: DWb1AQclbKpsO7rwCkEdLHJ7x7686176AA= 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=KPWofWWc; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) On Tue, May 14, 2024 at 05:17:51AM GMT, Ni, Ray wrote: > Gerd, > I agree that the logic might be duplicated in multi places. > > But even CPU supports 1G paging, caller can decide whether to use 1G paging or 2M paging, or 4K paging. > Using a single API to encapsulate the entire logic may not seem flexible. Sure, I don't want take away that flexibility. A caller might also prepare page tables for a paging mode not matching the current CPU paging mode (i.e. 32-bit PEI preparing page tables for 64-bit DXE). > Maybe, a lib API to detect 1G paging capability can be added to CpuLib. Yep, that is exactly what I think would be useful. Add a PAGING_MODE PageTableBestMode(VOID); function with this code to CpuPageTableLib, so callers have the option to use PagingMode = PageTableBestMode(); instead of duplicating the code block. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118881): https://edk2.groups.io/g/devel/message/118881 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] -=-=-=-=-=-=-=-=-=-=-=-