]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.asm
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / X64 / CpuIdEx.asm
CommitLineData
2c7e5c2f
HT
1; Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
2; This program and the accompanying materials \r
3eb9473e 3; are licensed and made available under the terms and conditions of the BSD License \r
4; which accompanies this distribution. The full text of the license may be found at \r
5; http://opensource.org/licenses/bsd-license.php \r
6; \r
7; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
8; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
9;\r
10; Module Name:\r
11;\r
12; CpuIdEx.Asm\r
13;\r
14; Abstract:\r
15;\r
16; AsmCpuidEx function\r
17;\r
18; Notes:\r
19;\r
20;------------------------------------------------------------------------------\r
21\r
22 .code\r
23\r
24;------------------------------------------------------------------------------\r
25; UINT32\r
26; EFIAPI\r
27; AsmCpuidEx (\r
28; IN UINT32 RegisterInEax,\r
29; IN UINT32 RegisterInEcx,\r
30; OUT UINT32 *RegisterOutEax OPTIONAL,\r
31; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
32; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
33; OUT UINT32 *RegisterOutEdx OPTIONAL\r
34; )\r
35;------------------------------------------------------------------------------\r
36AsmCpuidEx PROC USES rbx\r
37 mov eax, ecx\r
38 mov ecx, edx\r
39 push rax ; save Index on stack\r
40 cpuid\r
41 mov r10, [rsp + 38h]\r
42 test r10, r10\r
43 jz @F\r
44 mov [r10], ecx\r
45@@:\r
46 mov rcx, r8\r
47 jrcxz @F\r
48 mov [rcx], eax\r
49@@:\r
50 mov rcx, r9\r
51 jrcxz @F\r
52 mov [rcx], ebx\r
53@@:\r
54 mov rcx, [rsp + 40h]\r
55 jrcxz @F\r
56 mov [rcx], edx\r
57@@:\r
58 pop rax ; restore Index to rax as return value\r
59 ret\r
60AsmCpuidEx ENDP\r
61\r
62 END\r