From nobody Mon Nov 25 03:07:19 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+77450+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+77450+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1625235348; cv=none; d=zohomail.com; s=zohoarc; b=S5qJij9XRA3ykJhn7zGCfCq/3BhZv0qKD7+gIsAqlcV6SkyM4bdIJV1ERWFaHcz5qShXEy29D3bKJbtwFf0l86ZHxx7xRZ+ux/M4qJAtocDNJFHXfm0a16snXEgFGMZWacrzNkk3aK0j3oC3nrWlH4aSac9UN9VRZPQ1fbc1xAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625235348; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=nPWJB6h8gt/GxXnxuVLgbS6vx0t2Hkbf/JoOvicLJyI=; b=Iqa++mkBFRpyJoyjIjw4ffpz9vJKbEE5GlEhfiWyh4UeIGAX8U5a23ehEBhXBGYj2aKDjwTHojP8J30P1IPoL1ZgLFUkV5XOfXU9eFuMR2KobaCJ46Y/bKGXhZjsgqPQHSOfGeMlQ89st16DgW6Zwo2mo/wWAVv5EtaHsVXjvLM= 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+77450+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 1625235348624232.51885158135167; Fri, 2 Jul 2021 07:15:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hOxDYY1788612xVVrfhZCOev; Fri, 02 Jul 2021 07:15:48 -0700 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.8747.1625228746886405565 for ; Fri, 02 Jul 2021 05:25:47 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10032"; a="208765339" X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="208765339" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 05:25:42 -0700 X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="626714262" X-Received: from basfe001.gar.corp.intel.com ([10.66.244.207]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 05:25:40 -0700 From: "Ashraf Ali S" To: devel@edk2.groups.io Cc: Ashraf Ali S , Ray Ni , Rahul Kumar , Debkumar De , Harry Han , Catharine West , Sangeetha V Subject: [edk2-devel] [PATCH] UefiCpuPkg VTF0 X64: Build page tables using 1-GByte Page Granularity Date: Fri, 2 Jul 2021 17:55:04 +0530 Message-Id: <0a9c6a87df650690fb97cf731cec8e11d4bcb9b1.1625228643.git.ashraf.ali.s@intel.com> 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,ashraf.ali.s@intel.com X-Gm-Message-State: 1BkjoO5qH6wavOXpxGp4ItpMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1625235348; bh=lwXYpaLy/4GXYitIOfGV015klkN2yK3CYoMo2yULZTY=; h=Cc:Date:From:Reply-To:Subject:To; b=WkF2+ej21TFsj4yzq8Tq+bxaDd4bMDzCkcMKT1JdzKMJqkE/UYyhKYR2nuRYWBxptpe CBg2UbnW7C+WZNKLISNydNKjbOwYTvd/2uF3Op6HJKIAx8d/34kZZd4VxPCV+82IttH41 OnMI54Mchi4oTHxip7M81fQW8TYLcMlSr7o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1625235349406100001 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3473 X64 Reset Vector Code can access the memory range till 4GB using the Linear-Address Translation to a 2-MByte Page, when user wants to use more than 4G using 2M Page it will leads to use more number of Page table entries. using the 1-GByte Page table user can use more than 4G Memory by reducing the page table entries using 1-GByte Page, this patch attached can access memory range till 512GByte. Build Scrips for Reset Vector currently based on Python 2 which is already EOL, needs to modify the build script based on Python 3, update the Binary accordingly. Cc: Ray Ni Cc: Rahul Kumar Cc: Debkumar De Cc: Harry Han Cc: Catharine West Cc: Sangeetha V Signed-off-by: Ashraf Ali S --- .../Vtf0/Bin/ResetVector.ia32.port80.raw | Bin 516 -> 484 bytes .../ResetVector/Vtf0/Bin/ResetVector.ia32.raw | Bin 484 -> 468 bytes .../Vtf0/Bin/ResetVector.ia32.serial.raw | Bin 884 -> 868 bytes .../Vtf0/Bin/ResetVector.x64.port80.raw | Bin 28676 -> 12292 bytes .../ResetVector/Vtf0/Bin/ResetVector.x64.raw | Bin 28676 -> 12292 bytes .../Vtf0/Bin/ResetVector.x64.serial.raw | Bin 28676 -> 12292 bytes UefiCpuPkg/ResetVector/Vtf0/Build.py | 11 +-- .../ResetVector/Vtf0/Ia32/PageTables64.asm | 2 +- UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt | 2 +- .../Vtf0/Tools/FixupForRawSection.py | 4 +- UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb | 4 +- .../ResetVector/Vtf0/X64/1GPageTables.asm | 64 ++++++++++++++++++ .../X64/{PageTables.asm =3D> 2MPageTables.asm} | 0 13 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 UefiCpuPkg/ResetVector/Vtf0/X64/1GPageTables.asm rename UefiCpuPkg/ResetVector/Vtf0/X64/{PageTables.asm =3D> 2MPageTables.a= sm} (100%) diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.ia32.port80.raw b/= UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.ia32.port80.raw index 2c6ff655ded2a5855ca8f4428d559a7727eb6983..79b23c047bdc6e552d77d5c9e9a= eae21ff04d91d 100644 GIT binary patch delta 410 zcmZo+dBQ9-0SF8a=3DrRZ}FxWCMF#Invo+zYJ-&~=3D>PEYMB8#X*^*s&i7 zI*-2o*Lifq#%B#L{TUe;3~zVd>wJ;c9c#dNqsaO-vqOwyxZ<^$|Sx+*`qBE-KP zRw#MZ?IF_m@c;k+44fxR?lK-MVJf=3DbP$9%z%Jy2m^*||G=3DZV*+3=3Dec3YyDQrw&BCG zhLV39>OTT4_yTke(6spG0}_@eiX$2-m<39tfuvB0QMW|nV~~MBTOFDYFc(>?{CR!5 z`2b5=3DqlIr&sV@Ka2ph)3jn)CK3=3DF06%+4CG<$;o&htnFZ!=3Dg(0n4LMA4`}djk7m=3Dn z@tSo9&>Du9B|zggh&^lgwVUBX-))iIZU6Ps_!-61b|^D2IPfbSNPCqzIiFFU^R?Xs zd4>r<#gi8>%0vL2z`!uOpJBgKz-zAkjsdS((>jm5W_tbeb@R)JfB*l#TmvLJAN+p? a3S}hl`Z9zAvN|lpjbXxs*L#qpCjbB+6v6TU delta 442 zcmX9)O-lk%6n)b;mb6f&NEbm;61Fgs7G?G=3Di3EW`h#0jTXjjt=3DxN`<_@e*RfKhRH@ zRthehQp0fSK3#P_%@6n3VVmKY~2sF%gXydlkT zz2J+}fsf;~_pRoa+J(fR`Ut;~>qat}3#muERkA!QyT~Xg^M>rg%^bM|McBYs`8V0A zcP&Nw(O;ogKlFmCBIg5bqJ zBhR=3D?>3OE6Mw4r>-vk>Al5t4>DR50tqp6HM5M^V1To7n?Y1=3Du`A{@A7c!=3DymHGRlZ zJ}anuVpcRdDYzN0P#%MY-J^!^vR_OvBRp9GvF1f*Ah$29X~lhJI8j|qcKWL;$&ORN mb+{6FrzA&7=3D!a5r41gb~Ws5tejhbe+Ol`#xF!g`tAAbQ#M!vED diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.ia32.raw b/UefiCpu= Pkg/ResetVector/Vtf0/Bin/ResetVector.ia32.raw index e34780a3a2c9b22bd10a1d5a405e344faaff94f3..ce7faa502b858e99908bcdb397b= 776258205e1d5 100644 GIT binary patch delta 421 zcmaFDe1%zP0uUG;&}9%{V6bIiVEA8TJW)uczPUn$q4ZSeVde;h(!;MgckBm(&ZDpY zbsl}`&d9)Ec)Rmn=3DZm!NSOdlzMb@vG9g56a50n@+A7C%iRr%2sA^z>KLdmOc50S=3D) z|NsAI;5=3DD!m+@c;Q_=3DN?3L)lFw%6jV2TIvGPrN>5c%buG>$g&-l7BD10Br{v65o74 z!m|EEaYRD}vp|V7kQ6F0>XvAH3^E94n?v&f<|1pAKd)~$A7DvqwD658)#cwFVZ(U1 z(K^7DfuU5M*;(VYJW#Upa9X2vSX3z=3DvolBY0S*4`(QKMGUbF51+Qaa&258)`-3%Z4 zZtt%9ub0NpD4w=3DMnSsH9U+F;FtJKNSjMDY5-6qI0OaQ6_1rZE@G=3Dl)pF$@fo&qL_h zFuI>%zf-_#uKkVyuUXSNkGy7j{quG6%Zz{j|G(StZQD+`9S{Z>1OTb`GBa#G zt*_G(GaClinx^RkGo#yGe2LyNvnlO${H9mTj3XK78TZswjJl#0BPWZ(PsE3m63x5< zkjV2pUL=3D{H-<6y`Ayi}y>qBYR=3D+mmu*E{2X*HV!;FJ=3D@olMU=3D1Dr@&PjmS*9G|11z5fTzEKTW^U3gc6Jd}Rz>i=3DxwezWi&|RKrFLb)7MgiLyt(A5Nap z{K@){_&;%jkXDHiVLej|v^%t)8c;mepB%?^+SRc((Td402KNZ-pIe~y>R7ebhG=3DMi zG0>h98oCZ15CogOAHb`XKiHDrNJxngrv+CGHM`_x1(RWLh67mGTp&(0SUJnJ3Rcm& z65UvCM_?B@w(a-w1uqM*d0DnQmyjJzmTIyi$x?vuV|+aEM~V$8raq+JIm{T zoku68$xYtMs2t$H#K2&9yYpV>i?r@o1I8OgcCVQoiY!|Xl$bUjU@tOI`Oy_2{_U_r z$*XP;k;aGr|Nm#;JXvy=3D@n8v4(e;K3A?8xfm(zi^wH_#C>pb!L_+($k?)of7kU&X% z^8pFV6U7k?70d!9(m+zE#Hd@M@iE8{piK_V2bhbjRsOub-F$#0tIvx!s|Uq(h~riBD@{| delta 425 zcmaFD_JwVNtbi=3DD;Q?I+0R{$J1_p-zMV1qFRYV&rRDc|Y(&L?nnIjZR54`jN@+Ky@ zv%mcP|NsBaqZ1S4CZ1G|2xMYlFudJ)uk%G(cdP;9jUu;~%s_<>MRu(RN~~Dff$Sn< zl^%U$aKcjfs4rQRn_>~T%y|SO&#T1?W(j2HroM8dT6;J?X zO+L>6re~jL*zXkZns2{jz-!L5&Lb~R`~e2e%P;?5ivNFk_0RwRFIW8q2IYhQ&nCRS WJpl|r#)O5qF-(~7`Upe>LIMEmI;Oe+ diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.x64.port80.raw b/U= efiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.x64.port80.raw index 6c0bcc47ebff84830b59047790c70d96e9488296..835f8ea423437fdd8b33470ca07= b5d09e27ef5bf 100644 GIT binary patch literal 12292 zcmeI&+i#oo0mkts4Go129J)fo=3D$7=3DrD1$;94uge`K!JtR2m?x1&W9N`jtlni4!~nY zMKVPp5;sh{V}AhViU1dVP$**DtP&R#RiF&CsHt!04FZH}-n3u#KY(6K@yE_L{>6E& z?8q}SGc)VwyIqx+a)EMza)EMza)EMza)EMza)EMza)EMza)EMz@AU%z;;$e!?)6p2z03D4%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Bb~48~hhX6Rzk0 diff --git a/UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.x64.serial.raw b/U= efiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.x64.serial.raw index 61c71349a8a599916f3eeae8c5dee92efb56db71..9a24e8a752440462541a9589e51= 4770692a838e4 100644 GIT binary patch literal 12292 zcmeI&No*aVq!UOdkWL_-KsteR0_g>-bPP0V0v!X5nn=3De$qbAWY(5PlQ1{yV)j)6u^p<|#?2hlOm zsDtSkXw+0X1{!q;9RrQZ(lOAe7CHtRbtoMJjhaTsK%)+$W1vyf=3D@@9#;dBf%>Igap z8a0ECfkw5`G0>nsvs*R3;M$MsP zpiy(_7--ZyItCgwpN@e>9ZSbRqmH9vpi#%uG0><5bPP1=3D1Ud#9bs`-DjXH^rfkvH7 z$3UYN(lOAeQ|K6I)Twj~G^(ABfkt)EG0><*bPP0VF&zVqI*pEjMlGRZpixWd7--b# zbPP1=3D3_1oHwTzB|Mx9B=3DK%>9=3Doo0!*>nsv>Kr--8g(um1C8pWW1vyz(J|1d z6?65jXIx>fks_G$3UZ2(J|1d3+WhWR2Llsjk<`Afks_S$3UYlp<|#?m(nrN zsLSXWXw>C&3^eKrItCiGnvQ`+T}j74qpqT3pix)TG0>=3DM=3Doo0!wR8+LY7HF&jk=3DDG zfkt)HG0>>%=3D@@9#S~>A7--bfbPP1=3D89D|U^(-9&je3rbfkr(~$3WK|{57-jg^|IZGaEHB zxF@r*X{7$hq>;+YnU3TGW{dWH`l$6RE)`pf-@f!xp;{_VKl{a5R}{W36PS+>skCB2^1(>{OC zi`_GJ54GiYuJ4*&`l^=3DvDq`|S`7fH@%a7~%EQ-@Ig~^rIl6kFjVPbhp^}`OAKUlZB zuwv|m>|GRKKkJExm4Cw&k(zC}vvnGn3nC`9^Y>P__j-J;bjD?C3k$Pvcc0ZXR9e3J0;w=3DNvvNUob`r}&xzh4AYYT^DRyOx~ zLH6w%CZ4dZI$A;EoB|xx?>-oJ3H4qZ~n1X zYt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z{7XHPi^a|6F#eUE$;IMka~S_x&*WlpvpI}^qi1rlxY-=3DW_vo2iEN(W3@fJOki^a|6 zFuqsMxmet64&wnm zlZ(a8<}gn5OfD8To5OgAp2@}HW^))1>X}?DZZ?PU<9a3+i<`}1{8v4bi^a|6FfQwv zTr6%jhwz);J6MP z*MVPT>%iex03640297guoPpyE9B1G-1IHOS&cJa7jx+F!bO!Ey&#Ak=3D zAOGf?&;HbztFQmLmmj(PtZTNPaLxAPFW>X}!?^gyllNS?a^>P1A6Z}fYPVif|H4;0 zdF!JhZhhOuAG-L!nOA@Iv#z`Uju)StIvi!*@dlFe%F0B zpMBufw?FB^4&pzsoAE@(BJaz7dldnDOd1s%y;o_T5zT>dNt$p!L zcfRY~3m>y?Q=3D}Gyjb1ub%lGFM0ZVPk!+5)b)=3D(Y@NCAaW8%4xsN^l+E+aPy8A9X z?`5BK_&A?=3D>P62u`G~_`KD5Wh`_5c=3D-pgNk?n6$!=3DyBIS3biz{`4*LZ57d{pMBVR-05eXzPS$%o_hM0e#iO4 z-Zx!yl|1K~Y5VAFw*NPu>jxZ8+LiY1s~6g>m;cwT=3DR9KT36I!%{N}eRnR`C$a6KFj?aVu#beNVKweB}jn}{MWep$^j z58iO*;u}u#y@!kUM7JAA3bjNX3F;bkBC7rNV@_NLpP_QuoK+# diff --git a/UefiCpuPkg/ResetVector/Vtf0/Build.py b/UefiCpuPkg/ResetVector/= Vtf0/Build.py index 343c53b5ff..29f29ff0c2 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Build.py +++ b/UefiCpuPkg/ResetVector/Vtf0/Build.py @@ -1,7 +1,7 @@ ## @file # Automate the process of building the various reset vector types # -# Copyright (c) 2009, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -32,16 +32,19 @@ for arch in ('ia32', 'x64'): '-o', output, 'Vtf0.nasmb', ) + print(f"Command : {' '.join(commandLine)}") ret =3D RunCommand(commandLine) - print '\tASM\t' + output - if ret !=3D 0: sys.exit(ret) + if ret !=3D 0: + print(f"something went wrong while executing the {commandLine[= -1]}") + sys.exit() + print('\tASM\t' + output) =20 commandLine =3D ( 'python', 'Tools/FixupForRawSection.py', output, ) - print '\tFIXUP\t' + output + print('\tFIXUP\t' + output) ret =3D RunCommand(commandLine) if ret !=3D 0: sys.exit(ret) =20 diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm b/UefiCpuPkg= /ResetVector/Vtf0/Ia32/PageTables64.asm index 87a4125d4b..9cc6f56c17 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm +++ b/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm @@ -15,7 +15,7 @@ BITS 32 SetCr3ForPageTables64: =20 ; - ; These pages are built into the ROM image in X64/PageTables.asm + ; These pages are built into the ROM image in X64/1GPageTables.asm ; mov eax, ADDR_OF(TopLevelPageDirectory) mov cr3, eax diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt b/UefiCpuPkg/ResetVecto= r/Vtf0/ReadMe.txt index e6e5b54243..eb9dd24ee2 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt @@ -29,7 +29,7 @@ EBP/RBP - Pointer to the start of the Boot Firmware Volume =3D=3D=3D HOW TO BUILD VTF0 =3D=3D=3D =20 Dependencies: -* Python 2.5~2.7 +* Python 3.0 or newer * Nasm 2.03 or newer =20 To rebuild the VTF0 binaries: diff --git a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py b/Uefi= CpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py index c77438a0ce..de771eba22 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py +++ b/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py @@ -1,7 +1,7 @@ ## @file # Apply fixup to VTF binary image for FFS Raw section # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -15,6 +15,6 @@ c =3D ((len(d) + 4 + 7) & ~7) - 4 if c > len(d): c -=3D len(d) f =3D open(sys.argv[1], 'wb') - f.write('\x90' * c) + f.write(b'\x90' * c) f.write(d) f.close() diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb b/UefiCpuPkg/ResetVecto= r/Vtf0/Vtf0.nasmb index 493738c79c..0625efc456 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb @@ -2,7 +2,7 @@ ; @file ; This file includes all other code files to assemble the reset vector code ; -; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.
+; Copyright (c) 2008 - 2021, Intel Corporation. All rights reserved.
; SPDX-License-Identifier: BSD-2-Clause-Patent ; ;-------------------------------------------------------------------------= ----- @@ -36,7 +36,7 @@ %include "PostCodes.inc" =20 %ifdef ARCH_X64 -%include "X64/PageTables.asm" +%include "X64/1GPageTables.asm" %endif =20 %ifdef DEBUG_PORT80 diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/1GPageTables.asm b/UefiCpuPkg/= ResetVector/Vtf0/X64/1GPageTables.asm new file mode 100644 index 0000000000..8ae6c4c98c --- /dev/null +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/1GPageTables.asm @@ -0,0 +1,64 @@ +;-------------------------------------------------------------------------= ----- +; @file +; Emits Page Tables for 1:1 mapping of the addresses 0 - 0x8000000000 (512= GB) +; +; Copyright (c) 2021, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; Linear-Address Translation to a 1-GByte Page +; +;-------------------------------------------------------------------------= ----- + +BITS 64 + +%define ALIGN_TOP_TO_4K_FOR_PAGING + +%define PAGE_PRESENT 0x01 +%define PAGE_READ_WRITE 0x02 +%define PAGE_USER_SUPERVISOR 0x04 +%define PAGE_WRITE_THROUGH 0x08 +%define PAGE_CACHE_DISABLE 0x010 +%define PAGE_ACCESSED 0x020 +%define PAGE_DIRTY 0x040 +%define PAGE_PAT 0x080 +%define PAGE_GLOBAL 0x0100 +%define PAGE_1G 0x80 + +%define PAGE_PDP_ATTR (PAGE_ACCESSED + \ + PAGE_READ_WRITE + \ + PAGE_PRESENT) + +%define PAGE_PDP_1G_ATTR (PAGE_ACCESSED + \ + PAGE_READ_WRITE + \ + PAGE_PRESENT + \ + PAGE_1G) + +%define PGTBLS_OFFSET(x) ((x) - TopLevelPageDirectory) +%define PGTBLS_ADDR(x) (ADDR_OF(TopLevelPageDirectory) + (x)) + +%define PDP(offset) (ADDR_OF(TopLevelPageDirectory) + (offset) + \ + PAGE_PDP_ATTR) + +%define PDP_1G(x) ((x << 30) + PAGE_PDP_1G_ATTR) + +ALIGN 16 + +TopLevelPageDirectory: + + ; + ; Top level Page Directory Pointers (1 * 512GB entry) + ; + DQ PDP(0x1000) + + + TIMES 0x1000-PGTBLS_OFFSET($) DB 0 + ; + ; Next level Page Directory Pointers (512 * 1GB entries =3D> 512GB) + ; +%assign i 0 +%rep 512 + DQ PDP_1G(i) + %assign i i+1 +%endrep + + +EndOfPageTables: diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm b/UefiCpuPkg/Re= setVector/Vtf0/X64/2MPageTables.asm similarity index 100% rename from UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm rename to UefiCpuPkg/ResetVector/Vtf0/X64/2MPageTables.asm --=20 2.32.0.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 (#77450): https://edk2.groups.io/g/devel/message/77450 Mute This Topic: https://groups.io/mt/83940894/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-