From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on061e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::61e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5F72021AE3CC0 for ; Thu, 25 May 2017 07:32:48 -0700 (PDT) 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=QUySS4bbq/Ealslwb9TaSy5EMJ1U1I16UMfTFsCrfW0=; b=u9iTa32Ik8CrvJlr/lqsYVxsipdN55vTJtI0IALJDNGXDGU2nrkH11AJ6PAoIASblHJmDQORh5fgsWCLnozMNHUHBH6OOcvG9gQpt1rGfUffz3OizcPHjp9CKjDU715ge1D0wmkbAqfWTVb9d555hE2X2tV1otd2hpdETslgvCY= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1240.namprd12.prod.outlook.com (10.168.167.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 25 May 2017 14:32:46 +0000 From: Leo Duran To: CC: Leo Duran , Jordan Justen , Jeff Fan , Liming Gao , Brijesh Singh Date: Thu, 25 May 2017 09:32:31 -0500 Message-ID: <1495722752-17445-2-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495722752-17445-1-git-send-email-leo.duran@amd.com> References: <1495722752-17445-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO2PR05CA0073.namprd05.prod.outlook.com (10.166.88.169) To CY4PR12MB1240.namprd12.prod.outlook.com (10.168.167.15) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1240: X-MS-Office365-Filtering-Correlation-Id: f84b7030-5ebd-435c-bc77-08d4a37aea10 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY4PR12MB1240; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1240; 3:pZGEs8ZCKWMyzk2cmOwxVOu7zOY/CdMGA3fCdOOYRB3uw1jNZ83I11SI7jTRqBpSn7Lygs1tO2y8JDzbnNiMW8o6wIqvPnJMCeqRjzRpfeV0kcsJEet3zTw2lOxEH6f/Jsm7K6wpm6fDIt+vZa8n0RY9kbxSEK7i1Rr5Z9rneD7k/6EMecOq1v5qlfnEeUR0pCyFB/Khb9xcNf9ACFkBw2ZAuSKCX+dM5ESxaihym6tGkDBJgbaRGLPntvsugc0KZctl5o5sJVK2eJyK72MPWVOD+5PRKVTcCXeYYf+OVBrZep9pdi1mZG+7p4B68fkYEjeYomh4QiVmXkxBEI0+B5NHNF6ItlEomG1toYn9+08=; 25:pFA9oeJv67FJ0OO/ZI3KDilzC9mwZ57zE8sr6r8fd9n6gAl8IihQWykF5TymPe5lXPUcquW0sdu23Y7gyUXjl/YnVTe3EgDxP+18Np+CZ8qxwjkDhTU6ZWAm6NW8eMHZVPx+4NPn1W+A5pCFCATKwvw+6Tb2AS+uK36Yso6HJ0Rau/BHKwSBxBFRKpefhLZqfqNyOnrWdCffw0BgMmZRZvo4HnTpX0c0C7ayBgtPQxlURnwThyskSQ4hz0dIkI+fEEkSmOuqfGzCf0rNLMOgoBdvJhxPR+4Je0NqbTclJVhL+9ewLfIC196kM7ogUnX+fFQHv0UOlzxh2iic8zHuuK+xohqmbQ/gyH/kYM65mohNzA47Egfn0lgriCuLQE4KKaPAVeOp8MqLHS8EZo+doBdsEl0AzyjZhCWk2S6rLJU1w6uTi+XB152hgForqAyDKsN7WvBkQH1NccsdE9hLAJlnJcBNOm52ORPNu9d1DpE= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1240; 31:ajxrwVhWQ8lSxK9s2iQBvnRgjqVjU14vxTC+88q5CVCYTwWhFywoONQUfweuLINl80N1nQwO0Ky/c+4AUYvw1EkBBBe7WtuiojTEumFkSLfmRN2+0iRNkei4w3h0VU6TiAKxyo+zASu/CopFYlQBaIaWrmu0v4NO82Vh3JMwKAr16onPp1NngOwkN6dCdJeUa6U624A3NN6cCEeEoGZKk9sz/SR/74nCeAbWBUWz7VY=; 20:vEzSOkCVOnCmbGxnNIT4tN82lcLRFZp63rzaDVVMQX08ZtbsLno3SWdUuEm+c7IeJbhEl5KHAB77dSUZw309tAy5CQxMc5g1O5zFBt9K/+rDJicgX8PI1aFmnqj/b1oVk3aNJ9JBF87ihWBOWXAlQkr5XiHX6YIAUWWPFezZijhIvoRoOHekf5Hd7CG8SXh+nVaJDXbZZUXX5Lua2sRvtKnffzczP6poEz39KtUE4XEu6acnx2ztCd0CTsqeHLxP/QeofUTgH70BGf1CmTPuNSso415TT7dO7Up6KLCkPBurJK/OTz34hJS8RMoIFsFDPoHrvqiWhlvvhh6R3TglAwjmmXzNrBcGjDLMyqefiYxcGAvgdMb/iwyoKbYjj1EbjIdtkXiNgqXkkFSNehvxoVrOCYWbUb3O96mjAkj749FTLaGVFWwOVmblSDm/XwxweXPTu8txQ0LduHz6DMm6zMCYOtEQRK7xMU5wVJAAmkO/NomjoQKS2IjNBiYyQbec X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148); SRVR:CY4PR12MB1240; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1240; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1240; 4:EpBuqEBRbmfakoRMbImjTz93Sr0zl7g5GbLq0ghd+Z9+RyZ6juGhJj4fHVXOc066i+fHyv+ffOfsZYwl8qfJxxP9XBV91LQN6zGMgR4F9hnZWQqudzn+jka7fehFnOR7iijRCPbPdD2B3OyXAUJUyowNEU/EZQq1RfFgtC/DbWuv6wCYxU5PZWdGeq0oF6YcYw1eRA2LmDlhJcI2ieTnOohztXgWaoIy0a4SwBJLixMPyk+LL48q2KiDvtMKSvZ4x8F+Sx1zCIwmD0fgb3vy5wXe51CagAMH5a8XUwaClBfgcVy/jkW5c0qNWw2tJVwEByScVggPsqU8k28vNxk6s2wu/TQNP/vAnthhjKF1Nma9qQ42VgQtjFFMcJY/7rn7bncdusA8kPDi5CW6/I17jOMUNlY520DOX9tNUpFj73PjEqyCDu2JRN7170nty+ZJqrqHj6iPUY75BbpViZ/A+wqAlO99jOZM2kCUx+OG3/VuJ5kzP1X70Yb5u/DF/RXaR/LTPDjapZKiRVqBkSd0YxqsL5Qpvy8nIgzvty6BiJuYgxsZEkaUJ06y5Mxkxhrw1N6RZn6SdXrZRfwdKGqq06nZwRA07N4I/YajXnJ9SwI8cq29e8fsKJwevGJ8Mc3WKPiTqpYH0eodmUq/CQtwtZfQkiR1i2dg7EG70JMGaWH7Fp+oMl3H6dvy8RneEfd/E+0L7R6lCZZeL1rckpMp+g8podlS/dcgst03HVbew3wyCk9lAwIdIN5WUvCIygpoAcUQd9quZuHGzidIUB/DSIfN7fkIVzB64MgFeTk1TTFeMLGoHhBBmxub+PwzVx1rk9mOCGaaCYoiM7S2F+59cyK4O8chIQJdipYbiIkVwOqJA675dIChQ6F3/QTGPlNU X-Forefront-PRVS: 0318501FAE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(39860400002)(39850400002)(39400400002)(39450400003)(39840400002)(39410400002)(48376002)(2906002)(478600001)(50466002)(47776003)(5660300001)(36756003)(2351001)(3846002)(86362001)(54906002)(53936002)(6116002)(6486002)(38730400002)(7736002)(305945005)(4326008)(33646002)(8676002)(25786009)(53416004)(50226002)(5003940100001)(6666003)(189998001)(2950100002)(42186005)(6916009)(66066001)(81166006)(76176999)(50986999)(110136004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1240; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1240; 23:Egqbt1dGGLYGHVo4iKbSWbNiqR62+GDGNCN5E9TFV?= =?us-ascii?Q?xonCYFYiCTqPSLhrF5gAWZ6+eahGiGaFl4RVgStL65xk2nWSHOnCeLp+MHLD?= =?us-ascii?Q?1ccQzIltzI7ayxxasp7TRZ9YtHRdwRCOU9Uv9CI7ZPYvVpJgDYk22Q+hOBsn?= =?us-ascii?Q?nWfA4Mi7f0QigfIPOkRSK8UW6XGIrCWpXR1Y6mPm+NkcOe4TRvYF/VyRg4SU?= =?us-ascii?Q?1YNdftpyvFZSSC4CQnFxYOxl12BD0Yxk6S7gepHhDo/gVK+BXOwRzAjfABsJ?= =?us-ascii?Q?rqaNuHOAqtfo7oSulHPbAFcaBXMH9tAvkWD6U4cMOSbcpmekQ+LMbkyH9/k1?= =?us-ascii?Q?XswCqRBeCoDq/zpLu1D/XwHP9Um9vIO30o+ccPSMgNFx96K89QCsCVZSj9n3?= =?us-ascii?Q?pL4pJcoBT0zHfSW5XhG4s4Uap8gYFIMZTo7I+4vWEvHdsy4aM1iVpDwLW0fK?= =?us-ascii?Q?lDNyjWKMNJ0uLcXddxwWvBsP095cza3XqjkJiDCTI2zzBSNJ73cmhSjmaWrx?= =?us-ascii?Q?pg7G6aIrZwxES0x+EYmaRROESW+UCcgH6fYYaD6GL5bMA40eMSfP54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T3Awi9NaHK9RwJF2dmZleGMuamiwww7/Gi+rlAim8PxIsi4g+dJVZzIB6O2s6RIFJ15ZtCJWbR0EtYiKiWxCDiEaYO6L+L3XAQGV8QooCshbw+PXI0k6vaWxT8eZU2L3Nxda3s9C6cLrQBoRNF8s+BNhOoaSKMt1SOXjfqEoPOnFgbh+/fE05bGKo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 14:32:46.8440 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1240 Subject: [PATCH v2 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: , X-List-Received-Date: Thu, 25 May 2017 14:32:48 -0000 Content-Type: text/plain 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 | 265 ++++++++++++++++++++++++++++++-- 1 file changed, 256 insertions(+), 9 deletions(-) diff --git a/UefiCpuPkg/Include/Register/Amd/Cpuid.h b/UefiCpuPkg/Include/Register/Amd/Cpuid.h index 74ffb95..4a26bf7 100644 --- a/UefiCpuPkg/Include/Register/Amd/Cpuid.h +++ b/UefiCpuPkg/Include/Register/Amd/Cpuid.h @@ -7,6 +7,7 @@ not provided for that register. Copyright (c) 2017, Advanced Micro Devices. All rights reserved.
+ This program and the accompanying materials are licensed and made available 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,253 @@ #define __AMD_CPUID_H__ /** + CPUID Extended Processor Signature and Feature Bits - Memory Encryption Information + @param EAX CPUID_EXTENDED_CPU_SIG (0x80000001) + + @retval EAX CPUID_EXTENDED_CPU_SIG. + @retval EBX Reserved. + @retval ECX Extended Processor Signature and Feature Bits information + described by the type CPUID_AMD_EXTENDED_CPU_SIG_ECX. + @retval EDX Extended Processor Signature and Feature Bits information + described by the type CPUID_EXTENDED_CPU_SIG_EDX. + + Example usage + @code + UINT32 Eax; + CPUID_AMD_EXTENDED_CPU_SIG_ECX Ecx; + CPUID_EXTENDED_CPU_SIG_EDX Edx; + + AsmCpuid (CPUID_EXTENDED_CPU_SIG, &Eax, NULL, &Ecx.Uint32, &Edx.Uint32); + @endcode +**/ + +/** + CPUID AMD Extended Processor Signature and Feature Bits 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] Extened 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 AMD Processor Topology + + @param EAX CPUID_AMD_PROCESSOR_TOPOLOGY (0x8000001E) + + @retval EAX Extended APIC ID. + @retval EBX Core Indentifiers. + @retval ECX Node Indentifiers. + @retval EDX Reserved. + + Example usage + @code + UINT32 Eax; + UINT32 Ebx; + UINT32 Ecx; + UINT32 Edx; + + AsmCpuid (CPUID_AMD_PROCESSOR_TOPOLOGY, &Eax, &Ebx, &Ecx, &Edx); + @endcode +**/ +#define CPUID_AMD_PROCESSOR_TOPOLOGY 0x8000001E + +/** + CPUID AMD Processor Topology support information 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 support information 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 support information 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 @param EAX CPUID_MEMORY_ENCRYPTION_INFO (0x8000001F) @@ -33,8 +279,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. Example usage @code @@ -79,7 +325,7 @@ typedef union { UINT32 SevEsBit:1; /// - /// [Bit 4:31] Reserved + /// [Bit 31:4] Reserved /// UINT32 ReservedBits:28; } Bits; @@ -99,17 +345,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; /// - /// [Bit 6:11] Reduction of system physical address space bits when memory encryption is enabled + /// [Bit 11:6] Reduction of system physical address space bits when + /// memory encryption is enabled /// UINT32 ReducedPhysBits:5; /// - /// [Bit 12:31] Reserved + /// [Bit 31:12] Reserved /// UINT32 ReservedBits:21; } Bits; @@ -129,7 +376,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 +396,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; -- 2.7.4