]>
Commit | Line | Data |
---|---|---|
b341712e | 1 | #------------------------------------------------------------------------------\r |
2 | #\r | |
2c7e5c2f HT |
3 | # Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r |
4 | # This program and the accompanying materials\r | |
b341712e | 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 | |
7 | # http://opensource.org/licenses/bsd-license.php\r | |
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 | |
14 | # CpuIdEx.Asm\r | |
15 | #\r | |
16 | # Abstract:\r | |
17 | #\r | |
18 | # AsmCpuidEx function\r | |
19 | #\r | |
20 | # Notes:\r | |
21 | #\r | |
22 | #------------------------------------------------------------------------------\r | |
23 | \r | |
24 | #include <EdkIIGlueBase.h>\r | |
25 | \r | |
26 | .686:\r | |
27 | .code:\r | |
28 | \r | |
29 | #------------------------------------------------------------------------------\r | |
30 | # UINT32\r | |
31 | # EFIAPI\r | |
32 | # AsmCpuidEx (\r | |
33 | # IN UINT32 RegisterInEax,\r | |
34 | # IN UINT32 RegisterInEcx,\r | |
35 | # OUT UINT32 *RegisterOutEax OPTIONAL,\r | |
36 | # OUT UINT32 *RegisterOutEbx OPTIONAL,\r | |
37 | # OUT UINT32 *RegisterOutEcx OPTIONAL,\r | |
38 | # OUT UINT32 *RegisterOutEdx OPTIONAL\r | |
39 | # )\r | |
40 | #------------------------------------------------------------------------------\r | |
41 | .globl ASM_PFX(AsmCpuidEx)\r | |
42 | ASM_PFX(AsmCpuidEx):\r | |
43 | push %ebx\r | |
44 | push %ebp\r | |
45 | movl %esp, %ebp\r | |
46 | movl 12(%ebp), %eax\r | |
47 | movl 16(%ebp), %ecx\r | |
48 | cpuid\r | |
49 | push %ecx\r | |
50 | movl 20(%ebp), %ecx\r | |
51 | jecxz L1\r | |
52 | movl %eax, (%ecx)\r | |
53 | L1:\r | |
54 | movl 24(%ebp), %ecx\r | |
55 | jecxz L2\r | |
56 | movl %ebx, (%ecx)\r | |
57 | L2:\r | |
58 | movl 28(%ebp), %ecx\r | |
59 | jecxz L3\r | |
60 | popl (%ecx)\r | |
61 | L3:\r | |
62 | movl 32(%ebp), %edx\r | |
63 | jecxz L4\r | |
64 | movl %edx, (%ecx)\r | |
65 | L4:\r | |
66 | movl 12(%ebp), %eax\r | |
67 | leave\r | |
68 | pop %ebx\r | |
69 | ret\r |