From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0080.outbound.protection.outlook.com [104.47.33.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D95D821A07AA1 for ; Thu, 22 Jun 2017 13:37:00 -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=W8Igd0QiursV+ZtivvQsucuzh5WRhVB3KB0Wwq92FM0=; b=iqz5fNzNi6VvoBLBuGqVo7v8Ra1foj4iIedJAkDuzqYaNI9aHNSGns9zxuPMF9NEaLT8RqPN4E5Iqo2sJ7TMyQsUVSD+r+ObNytXkZqVEUpam59y+wAv4nRVqWo5DoKdCExKBbts31WrvP9/L6CuATQ0/xQxgHwCgeB2iMOsIjA= 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 brijesh-build-machine.amd.com (165.204.77.1) by BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Thu, 22 Jun 2017 20:38:23 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Brijesh Singh , Jordan Justen , Laszlo Ersek , Jeff Fan , Liming Gao , Leo Duran Date: Thu, 22 Jun 2017 16:37:32 -0400 Message-Id: <1498163868-30191-2-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498163868-30191-1-git-send-email-brijesh.singh@amd.com> References: <1498163868-30191-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO1PR15CA0051.namprd15.prod.outlook.com (10.175.176.19) To BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 493475b7-d896-42a5-a043-08d4b9aea0c0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 3:GBEN6HIlW0ATtFa0Z1ilOpJx+4/a0+CHctlG7QWt2V9aeAayLUcdyP5sOJZRCManERoH1rUozdIYQFgIxTnboplzeHDiboUF5nEkJA6JCu6Zqwu82xXRT3TJ3SLCQM/b6hxhlJATdK5jknT808WRnPljW8rmTwBcQ6bGpxppaNVZPfYgCqJX1Epi4mR1xe7y71H05Rv5Fh8ANHyzHFXTS96tncwIibkJ72FdwZhIpD3u9hVaQyUgRcAmrRfLmJNYAQnSiAtqz23BdOF3maNv2MiYGhUarQxVFFBpdNXo2AJaMk5C31joWe1lj1WgST7XkfKtB6dRp5Tf7Q/xFbiTIQzxWX53s81a4B1p0pTLEVU=; 25:2lZyqZvpYRtPphQABUcgjYog/8qEIbyuGoYcjEBC4QkP62l4mVbUdOySTCj2MXJpIBPaXw1M/H7mCtPFilyZPoIRj48km7HUnt/2QR7SxWYMMSY9ypS6Us7pyHOwq983y1NrURO1ris18yhunk4v3//LXXQFoZgl9qS9CEGNzrJ84xAjsTRQGCBGXK+09pk66JixgXhQ5mKVomSgJTH80RkLyPXpx3fg8AAf8q//Vz1yvfW/YAFab8G+lddYZkNG/MeP798peAMFnqAMiOdv86AbSTSjdqkL/HVtIw4X/Q8eZqLI1044GmUKKuYKyTK3HR+wT65MHLey4tHgfgZd2M6CMetQyIK3N6rbLJud6ADlW4BJBTZcMBdm3J4Z0rPVVSdnYBXsePdJWzn4TjmvUa1UAZRxPE3r6VmROv461/SrFj6PGMGuQ+VuExSGt/DM0Drtdoasa2qCxdqJz2iHAumlKuT8EwohhASJ8epnDdM= X-MS-TrafficTypeDiagnostic: BY2PR12MB0145: X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 31:SXG1FnIFMAZkkSYT808JGvwZB2CW2zzoArTZE3r8G5L8uuY4UuY8J1VBVP219SQzxTCglpha4C45/ezud77b4XbbrWEOD2JIpveAiA5vljAT1n0/VmVJeyuMlg4ZfAZKjXZyS9HhUxmAjvbgDDHsxN3h7rwomuxkQoX0wmniGAwLxxLUcdERo3ijdn2s1CpnEN2eoqYanpaDhrosw4PTUvUH/hpoKpgCxwhvQ3YaoIY=; 20:f8SgvqS0JpHsMvdAmLQ9LvPHI+zqRFsE0mGNUKEQ0YH/PhxQkGS8I+bgN7dIkEGZjU0osW9Vmt+C7g74e+AjcqhFV88aObmhHUls38Z6Srepytu1SUHdUyBwPp/YCRSD4cp68cM4CU1R4VzMRB0dHu1q1T2Y3SlHDAyC0ejFT5gy+csqdsnABbuEVowpV1rwKVHqSpaFdCSugCAfcOR5iQCfn1HxABGxSS9LvZjlEA2SH8kFTlrEAcEFIIOiM7a0BjrtAbyeOKOOWXVv6Gq2ttcvfYW+bYhC7HEXyGnchiztSfF7KaDt8puEw9Kk1m1dGpG+oTKYUeJxUazND1h8PAwWkYTh4k3w8ss+p/Syx7hvweYavPesCQ/bzHKl4zbctva9Bbk5uT/NHMEAVP1JMjUGVEICV8gNDJm7xMPNba/HS/MnP7hK9hJcc50UuyijTyAM5Vw0a7bJLHTkMoflZR5L9KcFCUAE+m22eXvf4DpQHEQJIGAnI4xWRyAxaD4b 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)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR12MB0145; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR12MB0145; 4:g5/GXWt5GwDGMoQiHE1eg6/BELXGFLzfX14GoW1rLW?= =?us-ascii?Q?1BfwMID8AwelbNhnmVc/ey7hLfSrRtwOSxqdvJZjiesZwzwAj8yM0hHSuIG8?= =?us-ascii?Q?9JxDhi6lOv7z2itNtNQmzp5dqKHZiUnzH5dxzuxyQu+yyIUb2mpgotEtrEP0?= =?us-ascii?Q?4DbAm0UmutDj8x3VI8aT6OGmcMMmnwyuTUkUulbbiyq6fXuhSUUs1FjNGBEb?= =?us-ascii?Q?U9BSScmV+AvhIQEtLYjEn3DdyT+G7+JLnwAo2eA83zfS/IgzPi0+1dJLqPEM?= =?us-ascii?Q?o2suEUsHs6NBecsjODsRY3sy8wxHtAquXqFYl54TU1+w44M7PH7npOBCT+/Q?= =?us-ascii?Q?3HRsf5jTj0FkKrnIWa2qTXJoeUtWXzfHTN68dGxkG/EFcas9BlJ3OoYoo0nY?= =?us-ascii?Q?fVi+DZs/5ApxaNiTeRCQPahAb3J6iESYr8JY55bIzCWBQzolzVfS7QE7gD20?= =?us-ascii?Q?SjUUXpZe7t8HTTcXVVsnycKfda7F9TRELrwv3+R6nuGcn8KVHBn31z9eEMDo?= =?us-ascii?Q?boiw72yPfEE21duJpb4kT05GV33Kg1fdYkSAzIJ8T9/bYTJ6TEUgbNjS9Jez?= =?us-ascii?Q?UsLUvHmmK00OfPIQl9Hx2Vy5IVNxW0jV+BtYo3s462wpNdqQP/yjQtiUMuqX?= =?us-ascii?Q?2wFFPAkIrDfgaU37nktmIimYiLcqK2Jf/UQnEUZHOcDCYasD6J+mxpcUxPMM?= =?us-ascii?Q?V4uH2XDUtxZAxsP8iLlRnq3UqYAeoOhJ/ACMLVTn0GkA+KYXllwOnEBnsAfC?= =?us-ascii?Q?tjo94iufvmsKlLd9wMOUNLIGbhqlYEZGseAmNaN5owp3GATO+lMZ4TM3mCOk?= =?us-ascii?Q?pXKPxAePHF0rfmrUlLw96zn5jp5h/UbV2Ig3l+x9itTjT3TO4ES+V4yphTFm?= =?us-ascii?Q?8Q0cvBiDm35UfLmM6FUTnWE1nMWK32dLnOmqw/vo2PyfZMW2MZAEKiIP1CBx?= =?us-ascii?Q?pMygdUdWor5Xfoc0P8c1y0YX5AQzDsjxQxubOIueGOeunklCZJD9G2EBT+vy?= =?us-ascii?Q?l2wqypqcZEay7Xo1jxE4FWENu71m9feiF71T+GAuYo8g4i4DKbZrfQM4TJAr?= =?us-ascii?Q?g28UJ3m/AhfJwlyKNGV7na0WVuQlrWMdrbYW2sHFLuWUtpiwwIhLyK35kfBk?= =?us-ascii?Q?XtFvNIFzW4W1+E4rjrW+K8lNMfENnECk+/mXMIj0pI1o4sgQ2cpIZZgk99Kn?= =?us-ascii?Q?p8UbcdsLCP49c5+8N8pEZeaFqkJVSY6gZdtb7W9fdNttekkemlv9GGO/wxEV?= =?us-ascii?Q?ClF8ddqJd/EiBuE/E=3D?= X-Forefront-PRVS: 03468CBA43 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39850400002)(39860400002)(39410400002)(39400400002)(25786009)(189998001)(50226002)(76176999)(50986999)(2351001)(2361001)(7736002)(33646002)(2950100002)(6916009)(6666003)(6486002)(4326008)(53936002)(2906002)(110136004)(15188155005)(5003940100001)(16799955002)(8676002)(81166006)(38730400002)(478600001)(53376002)(966005)(36756003)(6306002)(305945005)(54906002)(47776003)(3846002)(66066001)(50466002)(48376002)(6116002)(86362001)(53416004)(5660300001)(575784001)(42186005)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0145; H:brijesh-build-machine.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR12MB0145; 23:J3+DSyHmLZbZEvFfo4R2qLOoWEtT+pSC4DcTixh+C?= =?us-ascii?Q?NzcteAXHdF1+I1N0htnKvTuzN95fnVtGbXI6IhKeyBdGPSHt2/+nb/cWLRHX?= =?us-ascii?Q?t/s/YWpldhwThXsEs2KZM1/5H8JOVchARM8iIN25bKI9VqydG/14Q/3HJJp6?= =?us-ascii?Q?ZUMWcviZbseRdrLWzl6B8Ttbf39Ppb+bXECEpLIRb/4BOrW0qHlWFh5v4MrT?= =?us-ascii?Q?qUkgK0fNsUD/w5ruAa1hROYOz57yy8t3yqHgSMOp8CwT0Csd2bcvtdBVWBJQ?= =?us-ascii?Q?max2ZoB80ni2VOce+47hhrPptBD97RIMXyXAJAIt3EltCQXY8bEbEV+aBEPb?= =?us-ascii?Q?XigwSqMMqqkUdnSOsv3NhI+DqHHs3SAUWOpiEJ0Bs6d0lOj8YUrr0R4rbOK2?= =?us-ascii?Q?LXqQ2dDeZrea9Ux0YnH6SvuRwmR4NnQuJRH3Jwm3/REAuVJChzNYv3fB/Jav?= =?us-ascii?Q?gpGNrr6mx06hNR9kMn6/g7hxDthGYjl2XR2+SMgIJ9CMCvwF06E/VH0wo+Tz?= =?us-ascii?Q?LKSVARVtKaoSUjKKsW0/PSzQj6MOBluJO2ynMcqzXync8AKf6xWsn1PFBFKL?= =?us-ascii?Q?mfyT6EV4fgj/ZZNfXSpXSqzGlU2rGb5Y667m3e9YqH1/SVWhhFImnVowpo8b?= =?us-ascii?Q?bWoWUfYntmVh0X4ItScf5P3JRf8Yp6LKII3ITlUa+SsVbzl/BvGETNsGcykb?= =?us-ascii?Q?PzSZkmBx2t4k9cC9jXE4TpKbNCCtNM1PB20YWrgjEs7z/SMJmyr8tb1t0Agf?= =?us-ascii?Q?x8Uj+Nk9d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9JgU28rd2ZZFklA+KdM4cnYVY+4+qkmxA6kBaEvFdhCW/YFUbySwxpZfH3Eg+SP8ivKFNjE3i04V1hYVsq/pSxTDXRN2nj1qbYwvgMLTGEzX7zFe/eN6BD5f1l3BF5ejTifw4NyxDYZec4GCdpdJ2KxlWqvpfKbt79mbcUyTrUFztcQD/t1ZfVuqmep8g4gfGAsfNeT5jAxAa44O/aGb51p2DTnBxQ9L/Fuy6aHC+riIeJB1ti4AJZqes4= X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 20:TlqQVRe1kSYx+cfE3/GWIHIyYpU8G3MbSDmCOxQHjl3YJjsn5TGfxfxi8s4D3riQdx4NQI7efR9SZYhe9yTiUGJkNHjHFyxBivu3PPQGrWtgPZf94rqmISaYt4urOxrkx+aemKVbPqcYLHcirbA7RWFqT/LErF/CmIMpiXtGqsP2fCK2ShYVawvcpIJFt2wz1ZM062YGVCeyuR9pZK+cL642qtS8sbeAT5Iy9qEvRM/7T8wPzJHJFf0c/CIVhh91 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2017 20:38:23.0852 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 Subject: [PATCH v7 01/17] UefiCpuPkg: Define AMD Memory Encryption specific CPUID and MSR 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, 22 Jun 2017 20:37:01 -0000 Content-Type: text/plain The patch defines AMD's Memory Encryption Information CPUID leaf and SEV status MSR. The complete description for CPUID leaf is available in APM volume 2, Section 15.34. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Jeff Fan Cc: Liming Gao Cc: Leo Duran Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh Reviewed-by: Jeff Fan --- UefiCpuPkg/Include/Register/Amd/Cpuid.h | 162 ++++++++++++++++++++ UefiCpuPkg/Include/Register/Amd/Fam17Msr.h | 62 ++++++++ UefiCpuPkg/Include/Register/Amd/Msr.h | 29 ++++ 3 files changed, 253 insertions(+) diff --git a/UefiCpuPkg/Include/Register/Amd/Cpuid.h b/UefiCpuPkg/Include/Register/Amd/Cpuid.h new file mode 100644 index 000000000000..5cd42667dc46 --- /dev/null +++ b/UefiCpuPkg/Include/Register/Amd/Cpuid.h @@ -0,0 +1,162 @@ +/** @file + CPUID leaf definitions. + + Provides defines for CPUID leaf indexes. Data structures are provided for + registers returned by a CPUID leaf that contain one or more bit fields. + If a register returned is a single 32-bit value, then a data structure is + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Specification Reference: + AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34 + +**/ + +#ifndef __AMD_CPUID_H__ +#define __AMD_CPUID_H__ + +/** + + Memory Encryption Information + + @param EAX CPUID_MEMORY_ENCRYPTION_INFO (0x8000001F) + + @retval EAX Returns the memory encryption feature support status. + @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.. + + Example usage + @code + UINT32 Eax; + UINT32 Ebx; + UINT32 Ecx; + UINT32 Edx; + + AsmCpuid (CPUID_MEMORY_ENCRYPTION_INFO, &Eax, &Ebx, &Ecx, &Edx); + @endcode +**/ + +#define CPUID_MEMORY_ENCRYPTION_INFO 0x8000001F + +/** + CPUID Memory Encryption support information EAX for CPUID leaf + #CPUID_MEMORY_ENCRYPTION_INFO. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] Secure Memory Encryption (Sme) Support + /// + UINT32 SmeBit:1; + + /// + /// [Bit 1] Secure Encrypted Virtualization (Sev) Support + /// + UINT32 SevBit:1; + + /// + /// [Bit 2] Page flush MSR support + /// + UINT32 PageFlushMsrBit:1; + + /// + /// [Bit 3] Encrypted state support + /// + UINT32 SevEsBit:1; + + /// + /// [Bit 4:31] Reserved + /// + UINT32 ReservedBits:28; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_MEMORY_ENCRYPTION_INFO_EAX; + +/** + CPUID Memory Encryption support information EBX for CPUID leaf + #CPUID_MEMORY_ENCRYPTION_INFO. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0:5] 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 + /// + UINT32 ReducedPhysBits:5; + + /// + /// [Bit 12:31] Reserved + /// + UINT32 ReservedBits:21; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_MEMORY_ENCRYPTION_INFO_EBX; + +/** + CPUID Memory Encryption support information ECX for CPUID leaf + #CPUID_MEMORY_ENCRYPTION_INFO. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0:31] Number of encrypted guest supported simultaneously + /// + UINT32 NumGuests; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_MEMORY_ENCRYPTION_INFO_ECX; + +/** + CPUID Memory Encryption support information EDX for CPUID leaf + #CPUID_MEMORY_ENCRYPTION_INFO. +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0:31] Minimum SEV enabled, SEV-ES disabled ASID + /// + UINT32 MinAsid; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; +} CPUID_MEMORY_ENCRYPTION_INFO_EDX; + +#endif diff --git a/UefiCpuPkg/Include/Register/Amd/Fam17Msr.h b/UefiCpuPkg/Include/Register/Amd/Fam17Msr.h new file mode 100644 index 000000000000..2c5d9738fae8 --- /dev/null +++ b/UefiCpuPkg/Include/Register/Amd/Fam17Msr.h @@ -0,0 +1,62 @@ +/** @file + MSR Definitions. + + Provides defines for Machine Specific Registers(MSR) indexes. Data structures + are provided for MSRs that contain one or more bit fields. If the MSR value + returned is a single 32-bit or 64-bit value, then a data structure is not + provided for that MSR. + + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Specification Reference: + AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34 + +**/ + +#ifndef __FAM17_MSR_H +#define __FAM17_MSR_H + +/** + Secure Encrypted Virtualization (SEV) status register + +**/ +#define MSR_SEV_STATUS 0xc0010131 + +/** + MSR information returned for #MSR_SEV_STATUS +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] Secure Encrypted Virtualization (Sev) is enabled + /// + UINT32 SevBit:1; + + /// + /// [Bit 1] Secure Encrypted Virtualization Encrypted State (SevEs) is enabled + /// + UINT32 SevEsBit:1; + + UINT32 Reserved:30; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; + /// + /// All bit fields as a 64-bit value + /// + UINT64 Uint64; +} MSR_SEV_STATUS_REGISTER; + +#endif diff --git a/UefiCpuPkg/Include/Register/Amd/Msr.h b/UefiCpuPkg/Include/Register/Amd/Msr.h new file mode 100644 index 000000000000..bde830feb0c5 --- /dev/null +++ b/UefiCpuPkg/Include/Register/Amd/Msr.h @@ -0,0 +1,29 @@ +/** @file + MSR Definitions. + + Provides defines for Machine Specific Registers(MSR) indexes. Data structures + are provided for MSRs that contain one or more bit fields. If the MSR value + returned is a single 32-bit or 64-bit value, then a data structure is not + provided for that MSR. + + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Specification Reference: + AMD64 Architecture Programming Manaul volume 2, March 2017, Sections 15.34 + +**/ + +#ifndef __AMD_MSR_H__ +#define __AMD_MSR_H__ + +#include +#include + +#endif -- 2.7.4