]>
Commit | Line | Data |
---|---|---|
47fc17d8 | 1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
4e6b101f | 3 | ; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r |
bb817c56 | 4 | ; This program and the accompanying materials\r |
47fc17d8 | 5 | ; are licensed and made available under the terms and conditions of the BSD License\r |
6 | ; which accompanies this distribution. The full text of the license may be found at\r | |
35a17154 | 7 | ; http://opensource.org/licenses/bsd-license.php.\r |
47fc17d8 | 8 | ;\r |
9 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | ;\r | |
12 | ; Module Name:\r | |
13 | ;\r | |
e1f414b6 | 14 | ; CpuIdEx.Asm\r |
47fc17d8 | 15 | ;\r |
16 | ; Abstract:\r | |
17 | ;\r | |
e1f414b6 | 18 | ; AsmCpuidEx function\r |
47fc17d8 | 19 | ;\r |
20 | ; Notes:\r | |
21 | ;\r | |
22 | ;------------------------------------------------------------------------------\r | |
23 | \r | |
e1f414b6 | 24 | .686\r |
25 | .model flat,C\r | |
47fc17d8 | 26 | .code\r |
27 | \r | |
28 | ;------------------------------------------------------------------------------\r | |
29 | ; UINT32\r | |
30 | ; EFIAPI\r | |
e1f414b6 | 31 | ; AsmCpuidEx (\r |
47fc17d8 | 32 | ; IN UINT32 RegisterInEax,\r |
33 | ; IN UINT32 RegisterInEcx,\r | |
34 | ; OUT UINT32 *RegisterOutEax OPTIONAL,\r | |
35 | ; OUT UINT32 *RegisterOutEbx OPTIONAL,\r | |
36 | ; OUT UINT32 *RegisterOutEcx OPTIONAL,\r | |
37 | ; OUT UINT32 *RegisterOutEdx OPTIONAL\r | |
38 | ; )\r | |
39 | ;------------------------------------------------------------------------------\r | |
e1f414b6 | 40 | AsmCpuidEx PROC USES ebx\r |
41 | push ebp\r | |
42 | mov ebp, esp\r | |
43 | mov eax, [ebp + 12]\r | |
44 | mov ecx, [ebp + 16]\r | |
45 | cpuid\r | |
46 | push ecx\r | |
47 | mov ecx, [ebp + 20]\r | |
48 | jecxz @F\r | |
49 | mov [ecx], eax\r | |
50 | @@:\r | |
51 | mov ecx, [ebp + 24]\r | |
52 | jecxz @F\r | |
53 | mov [ecx], ebx\r | |
54 | @@:\r | |
de74f0c2 | 55 | mov ecx, [ebp + 32]\r |
e1f414b6 | 56 | jecxz @F\r |
de74f0c2 | 57 | mov [ecx], edx\r |
e1f414b6 | 58 | @@:\r |
4e6b101f | 59 | mov ecx, [ebp + 28]\r |
e1f414b6 | 60 | jecxz @F\r |
5fe292b4 | 61 | pop DWORD [ecx]\r |
e1f414b6 | 62 | @@:\r |
63 | mov eax, [ebp + 12]\r | |
64 | leave\r | |
65 | ret\r | |
66 | AsmCpuidEx ENDP\r | |
47fc17d8 | 67 | \r |
68 | END\r |