]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuId.S
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / CpuId.S
1 #------------------------------------------------------------------------------
2 #
3 # Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 # This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
8 #
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 #
12 # Module Name:
13 #
14 # CpuId.Asm
15 #
16 # Abstract:
17 #
18 # AsmCpuid function
19 #
20 # Notes:
21 #
22 #------------------------------------------------------------------------------
23
24 #include <EdkIIGlueBase.h>
25
26 .globl ASM_PFX(AsmCpuid)
27
28 #------------------------------------------------------------------------------
29 # VOID
30 # EFIAPI
31 # AsmCpuid (
32 # IN UINT32 RegisterInEax,
33 # OUT UINT32 *RegisterOutEax OPTIONAL,
34 # OUT UINT32 *RegisterOutEbx OPTIONAL,
35 # OUT UINT32 *RegisterOutEcx OPTIONAL,
36 # OUT UINT32 *RegisterOutEdx OPTIONAL
37 # )
38 #------------------------------------------------------------------------------
39 ASM_PFX(AsmCpuid):
40 push %ebx
41 push %ebp
42 movl %esp, %ebp
43 movl 12(%ebp), %eax
44 cpuid
45 push %ecx
46 movl 16(%ebp), %ecx
47 jecxz L1
48 movl %eax, (%ecx)
49 L1:
50 movl 20(%ebp), %ecx
51 jecxz L2
52 movl %ebx, (%ecx)
53 L2:
54 movl 24(%ebp), %ecx
55 jecxz L3
56 popl (%ecx)
57 L3:
58 movl 28(%ebp), %ecx
59 jecxz L4
60 movl %edx, (%ecx)
61 L4:
62 movl 12(%ebp), %eax
63 leave
64 pop %ebx
65 ret