From nobody Mon May 13 22:28:33 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+111910+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+111910+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1701365716; cv=none; d=zohomail.com; s=zohoarc; b=XJ1EYloRmThGa+/ceORFIHtFGjSbERUH34iT7uTfZCa9FRp+FXawOhd9n4fsKMSJ9V9C0dCKaG0Rr4PA0E1fQWr9LtXl2cD5gwxW5BHWFrLgFng/c+/aodK8GROyE6gzxAkQK0uixo7/Jun69qtmZj7Y0syd7neEVRWLwiOv/cY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701365716; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=c/LTOCiwVI0p7d0Qu28Jmc1mjFoJeabbqCQat4hRVW0=; b=LEKj5v1NdQie2Sgk9Yl+jEIX0gTtMHGLNcq55ZoLYP0BQp4eIdJX3wKS3+gw147M5nMDkUs+flgvw3X8L/vsAHLjXhZ3/DsSq3T7u0TyY32dPszPLNpJSQCUPBULMB4tckNTF7/ZezNRfQSMiBXFDtzkUc+SFIOtv9k1r+y2W+U= 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+111910+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 1701365716561215.0649665281402; Thu, 30 Nov 2023 09:35:16 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=BK7Q7P/r7scz6lyBHLTTO9jY5f/PFgzTUhXvDT7c9tw=; 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; s=20140610; t=1701365716; v=1; b=AxFw5WPUuYJFeo2ovEJZXvuzxmDp5bvtxNpy0B7lotKx0Mr5Ij6nrpN+Cc6UtvJOMBoziHsw u5ett8IcMdamdHGrLh5Y+0VAz7s76KPIFVGLCxNc1MVDwRpnlA4BsAbY2gMKlfhqTh22Wt70QAA 49RKMKSP4NDABD0+PVNi0DPg= X-Received: by 127.0.0.2 with SMTP id PyCZYY1788612xJRrwQ9bpQ1; Thu, 30 Nov 2023 09:35:16 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web10.78613.1701365715467511723 for ; Thu, 30 Nov 2023 09:35:15 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="360325" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="360325" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 09:35:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="942783014" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="942783014" X-Received: from ashrafal-mobl4.gar.corp.intel.com ([10.215.121.211]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 09:35:07 -0800 From: "Ashraf Ali S" To: devel@edk2.groups.io Cc: Ashraf Ali S , Rahul Kumar , Ray Ni , Catharine West , V Sangeetha Subject: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase Date: Thu, 30 Nov 2023 23:04:52 +0530 Message-Id: MIME-Version: 1.0 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,ashraf.ali.s@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: wNENUZu9Hsh4vSVT0P5Yk6kXx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1701365717748000001 Content-Type: text/plain; charset="utf-8" Currently 1G Page table is restricted 512GB. this patch can help to increase the page table size based on the input. default will be 512GB build option PAGE_TABLE_1G_SIZE is used to increase the page table size Cc: Rahul Kumar Cc: Ray Ni Cc: Catharine West Cc: V Sangeetha Signed-off-by: Ashraf Ali S --- UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt | 4 ++-- UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf | 2 ++ UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt b/UefiCpuPkg/ResetVecto= r/Vtf0/ReadMe.txt index 4fcb15c3b1..4d153fc1a7 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt @@ -1,10 +1,10 @@ =20 =3D=3D=3D HOW TO USE VTF0 =3D=3D=3D Add this line to your DSC [Components.IA32] or [Components.X64] section: - UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf + UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf =20 Add this line to your FDF FV section: - INF RuleOverride=3DRESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/ResetVector= .inf + INF RuleOverride=3DRESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf =20 In your FDF FFS file rules sections add: [Rule.Common.SEC.RESET_VECTOR] diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf b/UefiCpuPkg/ResetVector/= Vtf0/Vtf0.inf index 6b406163db..96106a4b11 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf @@ -53,5 +53,7 @@ # -DARCH_X64, -DARCH_IA32 # * for using 1G page table: # -DPAGE_TABLE_1G +# * for incresing the 1G page table size (Size in GBs): +# -DPAGE_TABLE_1G_SIZE=3D1024 # * for different debug channels: # -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm b/UefiCpuPkg/Re= setVector/Vtf0/X64/PageTables.asm index 7960b141be..b080dc5296 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm @@ -1,7 +1,7 @@ ;-------------------------------------------------------------------------= ----- ; @file ; Emits Page Tables for 1:1 mapping. -; If using 1G page table, map addresses 0 - 0x8000000000 (512GB), +; If using 1G page table, map addresses 0 - 0x8000000000 (512GB, Size can = be increse via PAGE_TABLE_1G_SIZE), ; else, map addresses 0 - 0x100000000 (4GB) ; ; Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.
@@ -39,6 +39,15 @@ BITS 64 %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR) %define PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR) =20 +%ifdef PAGE_TABLE_1G_SIZE + %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE +%else + ; + ; Default 512GB of 1G Page Table + ; + %define PAGE_PDPTE_1GB_SIZE 512 +%endif + ALIGN 16 =20 %ifdef PAGE_TABLE_1G @@ -47,7 +56,7 @@ Pdp: ; Page-directory pointer table (512 * 1GB entries =3D> 512GB) ; %assign i 0 - %rep 512 + %rep PAGE_PDPTE_1GB_SIZE DQ PAGE_PDPTE_1GB(i) %assign i i+1 %endrep --=20 2.39.1.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 (#111910): https://edk2.groups.io/g/devel/message/111910 Mute This Topic: https://groups.io/mt/102898657/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-