From nobody Sat Dec 28 12:21:36 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1496764760963362.8655799828099; Tue, 6 Jun 2017 08:59:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D483B21AE30D0; Tue, 6 Jun 2017 08:58:07 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0046.outbound.protection.outlook.com [104.47.33.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1176021959CCB for ; Tue, 6 Jun 2017 08:58:06 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Tue, 6 Jun 2017 15:59:11 +0000 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2Bt14o63bWlSf9zGCHSBUGTA4SvsSLu8BHhv0io0ryw=; b=D/kP8nkvoKJVMFsiXzUDQvG6hLfKNgAUZRz+Q8B+4yOf2pZjxV7n0sOESkrKIFQA9ZWbw+wjsebUBSBrvEfV1nsCqy/ZtUH2eFoX0wDJuPpvriaUknAFXEr/S4SWUrgl09rbLQhaf9TTvv+z4laLNTsLJemmWhzls7KFZ7TjS/w= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Tue, 6 Jun 2017 10:59:00 -0500 Message-Id: <1496764741-6327-2-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496764741-6327-1-git-send-email-leo.duran@amd.com> References: <1496764741-6327-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR14CA0009.namprd14.prod.outlook.com (10.173.227.19) To CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1237: X-MS-Office365-Filtering-Correlation-Id: a1964cc5-3917-4d33-2370-08d4acf4f962 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY4PR12MB1237; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 3:vAMKOZUq1aqN7yl4sNRXz+hlF722tuCOXZTUk0jt8wMqdOC9SGO5xceg3/BQaE1Rm1UKbHpsockiiodyVRlZXlXt1hphoUELgG3IQqC0vlaqVirwdGdZIdipFUmHrRZYrU0flwNnMlIeW/o0L3bMztGAbHowfIW1dSmcomcz+igAptu52YOU1cs7azCr4KOAbfws00l4+rQdM4LuLZCXGoVN4yxZrAPeVnHtqz2T/JkxKOI3a2yx3FHydnYug7GjtJGSOAna0K2Zryl8bHmZNReXFePJzU5I2pLSUXwlbkK8Spok7yoN0eEZIN+lR/iYF/zlUlYDUH6kS0az7qeS5byC4qOxcONkFQ1fy2p1OYY=; 25:ssWGlwfqlmdyj3uYysrxi3/qqzWeCsD5TytRULBTmgSyysbOCI0SfIfYFI3SsombsGlG4BF01xr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AON2Kkb2bbiGkL+AZH36lWGgR0IeBRv8mCmxIXsx3prMcGfgMfPUtzmIGKCdF+x+Pti+eTuBIzp0LGrFaSfQETkPauXMWjlPKeeMau5BQ8PgImjWX7hczuEOqkKPpEVmmVgnqBuX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1237; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1237; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1237; 4:6jIZh5luuFpfrz+bTsZeRtT2Dji+j+FBSaZk0PrOrJ?= =?us-ascii?Q?Smwx7svT15SLxheWDME2EQx4h2xfkf03F0+yhlvpru9xJAPD+S+KWVngrjq5?= =?us-ascii?Q?6HezUfC/zCDG66E+8B1UFLTNe+CXYR6w0TvIgV+mVYDFkHyoDMt8odMACaAZ?= =?us-ascii?Q?6u++KoqHR6gsj6VR7zIndTCr/SBlIZH9IPI7C6mjcfd/vIpTV+Ql0hum/HDf?= =?us-ascii?Q?oj9jkbrVAv9MEXTqE7Tcmnzje/HkBzVErcklOKPT0SxgZ9hK6ao/ayppEGoa?= =?us-ascii?Q?1OQQNJqFDzkmRlTvMyIfpNYqTXeYIUXpYVrKaICyPcOwqfkzCW4YUThzOEH0?= =?us-ascii?Q?rW3EdkQ2s3r1tbBjnAirp/KrowPOFOXW/d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=3D?= X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39410400002)(39400400002)(39840400002)(39850400002)(39450400003)(5003940100001)(2950100002)(305945005)(38730400002)(7736002)(110136004)(48376002)(81166006)(2361001)(53936002)(5660300001)(33646002)(189998001)(2351001)(6116002)(53416004)(6486002)(54906002)(2906002)(47776003)(36756003)(3846002)(42186005)(86362001)(66066001)(478600001)(8676002)(76176999)(6916009)(6666003)(25786009)(50226002)(50986999)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1237; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1237; 23:/wVbuLV2BU1Lmi2quWW6UAn/39xRLZeTfYCbR+QQb?= =?us-ascii?Q?VPUi7KA/TcT732DkeyAoHiLEcQ7mC5w3E6RcYxYD4jH05MW7QxzsPaJSLIVb?= =?us-ascii?Q?Xhwu31ghZkNIUNNWboZrmPTQjbQSwcr1bs9mI4yIQLkVQCg4Cnv1Z9coOaQk?= =?us-ascii?Q?i33lwemWIGx/kYVy4E2bAJejva0L4VsOXEpZEO/UhKEXgv1yOpuptc1BSVbS?= =?us-ascii?Q?LqC21WdZwIJK0khYbs/83NSMyeuxUgHbixPtv4iAqEL+CKFyJ5n4GVb8NUUB?= =?us-ascii?Q?luCxjYamBuYkONJYYyd/LMb/frkaS0sD9qvUCJa14eeqEByq3yJlhZC1nx8l?= =?us-ascii?Q?bA1STcE20v6BqfylHt/F6G9ExT0TxeZhhbXaywH0eK3t9YhHif34g6kJZS39?= =?us-ascii?Q?HlE59NZ4o2uuZy3vUIb4PJ7/AChNIpFlg/A7+i8//ZgK4zk2LwtsQJeRHfue?= =?us-ascii?Q?uTclf3AaDE4qWssx6q0Z8mSzbWnmb0bRsZmu3/WAv3pj+mjqrKY6Y9TNh+ty?= =?us-ascii?Q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PHfrdq9UvsDDYqG3A2fTyjtCYZw7Gxp2AxV0LSZ5IJ2TAOSln9rO1W8PwYWNtmIVr+06js9wVmIc7NxnOMgixqQFu2dboD6Ike1hqAI5YIaBXFYtTlDlFRmB9kf+O9xISOR2lGYgZwJCOh+H+xI7LedoicVXOjBqCeutd2oolC3kAs+QhENxb4b6xyw9C/SSFHvTpPOGBtfl34idw2AW8U21Q= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 5:P+Qz32lvBU7mhEMMh+mihP68Es7G2Jmq+6y1L4aolB7FzWdBKNfCpCoHvJPG5DLeR0VI07y1MU+FitpNmBG+OCqZ0D1vq3LQuVkapCDTDUjUldePpGYxw/oTyUQ74/M2OuKU//DpkpZxp3+ESfF6KvYI1cEyesAyK4kdk42MXkKS5MKcJalwIYj9AtefmHbzfCsP24sSCBh7H8X5C4pSYRRpOTks2+J0E++WQJtEX6yqcoGlOyZy0uVKiyji1d3FFAsmS11Muq3L8dAV/04DQXbvKWnjC7VSeoekG91JpTejuanDGxN39nObHC5rzbPZ3sP9WyH7RWHywgsexA1teTAlXkBqJEqF1OfUMRA+fjA1xsT4xflsVv9pvieUI6JbjVXZdcPEBYcVNuFeJst8PrcesiWYVRmlEuLSfL2Wfj6qrTf5iFK14qZdoWkMmfRHL2+TBe1M/D4Y6fOKWvYg1Oz61ODYS7MtsNqL3+EnKpFx3WqzJLtDbHZ9hnlpp6JP; 24:kWV7LZMO/iO/I6FdEIXmv3fQbRnXJjAHm6BIuf/+Bd1kitsGUhuDqZCWnDAnamQgc7jxQg0uVDbjRKMbUfiKpc0nqGoQr2k328qcD5HG4VQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 7:CO0Q4e+4QR9EtQ/IUOEon1fNnwcLHwiAo3qltxh8h9AwUNfouGLf3NevUInb7txZN2qOJt9JTlPkKO17oswguqY9iHyHKOrVK2T56jc+pIGGjIT8Tiv7rvSyUjESYc9ZU5bGIOl28BVmBiL96FYMwsJadd0XPU0Aw6tmrL7RfcCEixk8H/K5M5qzV9VbxCfxbyzSTzy8XoIF+8KennfgKOw4MKZj9v5/zHbjFWAdCAOvEb91kmygm6yb7ftLQE9ryO/diJP6mi6uLDfoTecAATMhDNwOmOvlu6x/UCAoOnI82rh5NmrGIK9j1HU6oq2BVafencLD4XpVkObebYVFGQ==; 20:pzF/QLHGhCpNJOI6+o5bJ8itrd15w4MFoN/ksVWL0YmmzUDea4QRuOX3slyE1Fjjvg9X562ujPUeidB2q0m29CeTAYeGTxgmBepuwX0CypMunXkRqHrF1XyjL31HjAxiIT7y2ANc9TZa9od8bKvmL2uwKmwvKtk8H9hyplF/Qkwmut9377yZ2OMPM516mMOvXpnYKyyRClttiOn/N28AFl4Syg2tOXL/sLVjvWD4Um/SqoveXN3jYaGDVzvgBpJe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:59:11.6101 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [edk2] [PATCH v3 1/2] UefiCpuPkg: Add CPUID definitions for AMD. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Leo Duran , Jeff Fan , Liming Gao Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jordan Justen Cc: Jeff Fan Cc: Liming Gao Cc: Brijesh Singh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran --- UefiCpuPkg/Include/Register/Amd/Cpuid.h | 574 ++++++++++++++++++++++++++++= +++- 1 file changed, 565 insertions(+), 9 deletions(-) diff --git a/UefiCpuPkg/Include/Register/Amd/Cpuid.h b/UefiCpuPkg/Include/R= egister/Amd/Cpuid.h index 74ffb95..d4d777b 100644 --- a/UefiCpuPkg/Include/Register/Amd/Cpuid.h +++ b/UefiCpuPkg/Include/Register/Amd/Cpuid.h @@ -7,6 +7,7 @@ not provided for that register. =20 Copyright (c) 2017, Advanced Micro Devices. All rights reserved.
+ This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,8 +25,562 @@ #define __AMD_CPUID_H__ =20 /** + CPUID Extended Processor Signature and Features =20 - Memory Encryption Information + @param EAX CPUID_EXTENDED_CPU_SIG (0x80000001) + + @retval EAX Extended Family, Model, Stepping Identifiers + described by the type CPUID_AMD_EXTENDED_CPU_SIG_EAX. + @retval EBX Brand Identifier + described by the type CPUID_AMD_EXTENDED_CPU_SIG_EBX. + @retval ECX Extended Feature Identifiers + described by the type CPUID_AMD_EXTENDED_CPU_SIG_ECX. + @retval EDX Extended Feature Identifiers + described by the type CPUID_AMD_EXTENDED_CPU_SIG_EDX. +**/ + +/** + CPUID Extended Processor Signature and Features EAX for CPUID leaf + #CPUID_EXTENDED_CPU_SIG. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 3:0] Stepping. + /// + UINT32 Stepping:4; + /// + /// [Bits 7:4] Base Model. + /// + UINT32 BaseModel:4; + /// + /// [Bits 11:8] Base Family. + /// + UINT32 BaseFamily:4; + /// + /// [Bit 15:12] Reserved. + /// + UINT32 Reserved1:4; + /// + /// [Bits 19:16] Extended Model. + /// + UINT32 ExtModel:4; + /// + /// [Bits 27:20] Extended Family. + /// + UINT32 ExtFamily:8; + /// + /// [Bit 31:28] Reserved. + /// + UINT32 Reserved2:4; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_EXTENDED_CPU_SIG_EAX; + +/** + CPUID Extended Processor Signature and Features EBX for CPUID leaf + #CPUID_EXTENDED_CPU_SIG. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 27:0] Reserved. + /// + UINT32 Reserved:28; + /// + /// [Bit 31:28] Package Type. + /// + UINT32 PkgType:4; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_EXTENDED_CPU_SIG_EBX; + +/** + CPUID Extended Processor Signature and Features ECX for CPUID leaf + #CPUID_EXTENDED_CPU_SIG. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] LAHF/SAHF available in 64-bit mode. + /// + UINT32 LAHF_SAHF:1; + /// + /// [Bit 1] Core multi-processing legacy mode. + /// + UINT32 CmpLegacy:1; + /// + /// [Bit 2] Secure Virtual Mode feature. + /// + UINT32 SVM:1; + /// + /// [Bit 3] Extended APIC register space. + /// + UINT32 ExtApicSpace:1; + /// + /// [Bit 4] LOCK MOV CR0 means MOV CR8. + /// + UINT32 AltMovCr8:1; + /// + /// [Bit 5] LZCNT instruction support. + /// + UINT32 LZCNT:1; + /// + /// [Bit 6] SSE4A instruction support. + /// + UINT32 SSE4A:1; + /// + /// [Bit 7] Misaligned SSE Mode. + /// + UINT32 MisAlignSse:1; + /// + /// [Bit 8] ThreeDNow Prefetch instructions. + /// + UINT32 PREFETCHW:1; + /// + /// [Bit 9] OS Visible Work-around support. + /// + UINT32 OSVW:1; + /// + /// [Bit 10] Instruction Based Sampling. + /// + UINT32 IBS:1; + /// + /// [Bit 11] Extended Operation Support. + /// + UINT32 XOP:1; + /// + /// [Bit 12] SKINIT and STGI support. + /// + UINT32 SKINIT:1; + /// + /// [Bit 13] Watchdog Timer support. + /// + UINT32 WDT:1; + /// + /// [Bit 14] Reserved. + /// + UINT32 Reserved1:1; + /// + /// [Bit 15] Lightweight Profiling support. + /// + UINT32 LWP:1; + /// + /// [Bit 16] 4-Operand FMA instruction support. + /// + UINT32 FMA4:1; + /// + /// [Bit 17] Translation Cache Extension. + /// + UINT32 TCE:1; + /// + /// [Bit 21:18] Reserved. + /// + UINT32 Reserved2:4; + /// + /// [Bit 22] Topology Extensions support. + /// + UINT32 TopologyExtensions:1; + /// + /// [Bit 23] Core Performance Counter Extensions. + /// + UINT32 PerfCtrExtCore:1; + /// + /// [Bit 25:24] Reserved. + /// + UINT32 Reserved3:2; + /// + /// [Bit 26] Data Breakpoint Extension. + /// + UINT32 DataBreakpointExtension:1; + /// + /// [Bit 27] Performance Time-Stamp Counter. + /// + UINT32 PerfTsc:1; + /// + /// [Bit 28] L3 Performance Counter Extensions. + /// + UINT32 PerfCtrExtL3:1; + /// + /// [Bit 29] MWAITX and MONITORX capability. + /// + UINT32 MwaitExtended:1; + /// + /// [Bit 31:30] Reserved. + /// + UINT32 Reserved4:2; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_EXTENDED_CPU_SIG_ECX; + +/** + CPUID Extended Processor Signature and Features EDX for CPUID leaf + #CPUID_EXTENDED_CPU_SIG. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] x87 floating point unit on-chip. + /// + UINT32 FPU:1; + /// + /// [Bit 1] Virtual-mode enhancements. + /// + UINT32 VME:1; + /// + /// [Bit 2] Debugging extensions, IO breakpoints, CR4.DE. + /// + UINT32 DE:1; + /// + /// [Bit 3] Page-size extensions (4 MB pages). + /// + UINT32 PSE:1; + /// + /// [Bit 4] Time stamp counter, RDTSC/RDTSCP instructions, CR4.TSD. + /// + UINT32 TSC:1; + /// + /// [Bit 5] MSRs, with RDMSR and WRMSR instructions. + /// + UINT32 MSR:1; + /// + /// [Bit 6] Physical-address extensions (PAE). + /// + UINT32 PAE:1; + /// + /// [Bit 7] Machine check exception, CR4.MCE. + /// + UINT32 MCE:1; + /// + /// [Bit 8] CMPXCHG8B instruction. + /// + UINT32 CMPXCHG8B:1; + /// + /// [Bit 9] APIC exists and is enabled. + /// + UINT32 APIC:1; + /// + /// [Bit 10] Reserved. + /// + UINT32 Reserved1:1; + /// + /// [Bit 11] SYSCALL and SYSRET instructions. + /// + UINT32 SYSCALL_SYSRET:1; + /// + /// [Bit 12] Memory-type range registers. + /// + UINT32 MTRR:1; + /// + /// [Bit 13] Page global extension, CR4.PGE. + /// + UINT32 PGE:1; + /// + /// [Bit 14] Machine check architecture, MCG_CAP. + /// + UINT32 MCA:1; + /// + /// [Bit 15] Conditional move instructions, CMOV, FCOMI, FCMOV. + /// + UINT32 CMOV:1; + /// + /// [Bit 16] Page attribute table. + /// + UINT32 PAT:1; + /// + /// [Bit 17] Page-size extensions. + /// + UINT32 PSE36 : 1; + /// + /// [Bit 19:18] Reserved. + /// + UINT32 Reserved2:2; + /// + /// [Bit 20] No-execute page protection. + /// + UINT32 NX:1; + /// + /// [Bit 21] Reserved. + /// + UINT32 Reserved3:1; + /// + /// [Bit 22] AMD Extensions to MMX instructions. + /// + UINT32 MmxExt:1; + /// + /// [Bit 23] MMX instructions. + /// + UINT32 MMX:1; + /// + /// [Bit 24] FXSAVE and FXRSTOR instructions. + /// + UINT32 FFSR:1; + /// + /// [Bit 25] FXSAVE and FXRSTOR instruction optimizations. + /// + UINT32 FFXSR:1; + /// + /// [Bit 26] 1-GByte large page support. + /// + UINT32 Page1GB:1; + /// + /// [Bit 27] RDTSCP intructions. + /// + UINT32 RDTSCP:1; + /// + /// [Bit 28] Reserved. + /// + UINT32 Reserved4:1; + /// + /// [Bit 29] Long Mode. + /// + UINT32 LM:1; + /// + /// [Bit 30] 3DNow! instructions. + /// + UINT32 ThreeDNow:1; + /// + /// [Bit 31] AMD Extensions to 3DNow! instructions. + /// + UINT32 ThreeDNowExt:1; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_EXTENDED_CPU_SIG_EDX; + + +/** +CPUID Linear Physical Address Size + +@param EAX CPUID_VIR_PHY_ADDRESS_SIZE (0x80000008) + +@retval EAX Linear/Physical Address Size described by the type + CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EAX. +@retval EBX Linear/Physical Address Size described by the type + CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EBX. +@retval ECX Linear/Physical Address Size described by the type + CPUID_AMD_VIR_PHY_ADDRESS_SIZE_ECX. +@retval EDX Reserved. +**/ + +/** + CPUID Linear Physical Address Size EAX for CPUID leaf + #CPUID_VIR_PHY_ADDRESS_SIZE. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 7:0] Maximum physical byte address size in bits. + /// + UINT32 PhysicalAddressBits:8; + /// + /// [Bits 15:8] Maximum linear byte address size in bits. + /// + UINT32 LinearAddressBits:8; + /// + /// [Bits 23:16] Maximum guest physical byte address size in bits. + /// + UINT32 GuestPhysAddrSize:8; + /// + /// [Bit 31:24] Reserved. + /// + UINT32 Reserved:8; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EAX; + +/** + CPUID Linear Physical Address Size EBX for CPUID leaf + #CPUID_VIR_PHY_ADDRESS_SIZE. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 0] Clear Zero Instruction. + /// + UINT32 CLZERO:1; + /// + /// [Bits 1] Instructions retired count support. + /// + UINT32 IRPerf:1; + /// + /// [Bits 2] Restore error pointers for XSave instructions. + /// + UINT32 XSaveErPtr:1; + /// + /// [Bit 31:3] Reserved. + /// + UINT32 Reserved:29; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EBX; + +/** + CPUID Linear Physical Address Size ECX for CPUID leaf + #CPUID_VIR_PHY_ADDRESS_SIZE. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 7:0] Number of threads - 1. + /// + UINT32 NC:8; + /// + /// [Bit 11:8] Reserved. + /// + UINT32 Reserved1:4; + /// + /// [Bits 15:12] APIC ID size. + /// + UINT32 ApicIdCoreIdSize:4; + /// + /// [Bits 17:16] Performance time-stamp counter size. + /// + UINT32 PerfTscSize:2; + /// + /// [Bit 31:18] Reserved. + /// + UINT32 Reserved2:14; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_VIR_PHY_ADDRESS_SIZE_ECX; + + +/** + CPUID AMD Processor Topology + + @param EAX CPUID_AMD_PROCESSOR_TOPOLOGY (0x8000001E) + + @retval EAX Extended APIC ID described by the type + CPUID_AMD_PROCESSOR_TOPOLOGY_EAX. + @retval EBX Core Indentifiers described by the type + CPUID_AMD_PROCESSOR_TOPOLOGY_EBX. + @retval ECX Node Indentifiers described by the type + CPUID_AMD_PROCESSOR_TOPOLOGY_ECX. + @retval EDX Reserved. +**/ +#define CPUID_AMD_PROCESSOR_TOPOLOGY 0x8000001E + +/** + CPUID AMD Processor Topology EAX for CPUID leaf + #CPUID_AMD_PROCESSOR_TOPOLOGY. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 31:0] Extended APIC Id. + /// + UINT32 ExtendedApicId; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_PROCESSOR_TOPOLOGY_EAX; + +/** + CPUID AMD Processor Topology EBX for CPUID leaf + #CPUID_AMD_PROCESSOR_TOPOLOGY. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 7:0] Core Id. + /// + UINT32 CoreId:8; + /// + /// [Bits 15:8] Threads per core. + /// + UINT32 ThreadsPerCore:8; + /// + /// [Bit 31:16] Reserved. + /// + UINT32 Reserved:16; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_PROCESSOR_TOPOLOGY_EBX; + +/** + CPUID AMD Processor Topology ECX for CPUID leaf + #CPUID_AMD_PROCESSOR_TOPOLOGY. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bits 7:0] Node Id. + /// + UINT32 NodeId:8; + /// + /// [Bits 10:8] Nodes per processor. + /// + UINT32 NodesPerProcessor:3; + /// + /// [Bit 31:11] Reserved. + /// + UINT32 Reserved:21; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_AMD_PROCESSOR_TOPOLOGY_ECX; + + +/** + CPUID Memory Encryption Information =20 @param EAX CPUID_MEMORY_ENCRYPTION_INFO (0x8000001F) =20 @@ -33,8 +588,8 @@ @retval EBX If memory encryption feature is present then return the page table bit number used to enable memory encryption= support and reducing of physical address space in bits. - @retval ECX Returns number of encrypted guest supported simultaneosuly. - @retval EDX Returns minimum SEV enabled and SEV disbled ASID.. + @retval ECX Returns number of encrypted guest supported simultaneously. + @retval EDX Returns minimum SEV enabled and SEV disabled ASID. =20 Example usage @code @@ -79,7 +634,7 @@ typedef union { UINT32 SevEsBit:1; =20 /// - /// [Bit 4:31] Reserved + /// [Bit 31:4] Reserved /// UINT32 ReservedBits:28; } Bits; @@ -99,17 +654,18 @@ typedef union { /// struct { /// - /// [Bit 0:5] Page table bit number used to enable memory encryption + /// [Bit 5:0] Page table bit number used to enable memory encryption /// UINT32 PtePosBits:6; =20 /// - /// [Bit 6:11] Reduction of system physical address space bits when me= mory encryption is enabled + /// [Bit 11:6] Reduction of system physical address space bits when + /// memory encryption is enabled /// UINT32 ReducedPhysBits:5; =20 /// - /// [Bit 12:31] Reserved + /// [Bit 31:12] Reserved /// UINT32 ReservedBits:21; } Bits; @@ -129,7 +685,7 @@ typedef union { /// struct { /// - /// [Bit 0:31] Number of encrypted guest supported simultaneously + /// [Bit 31:0] Number of encrypted guest supported simultaneously /// UINT32 NumGuests; } Bits; @@ -149,7 +705,7 @@ typedef union { /// struct { /// - /// [Bit 0:31] Minimum SEV enabled, SEV-ES disabled ASID + /// [Bit 31:0] Minimum SEV enabled, SEV-ES disabled ASID /// UINT32 MinAsid; } Bits; --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel