summaryrefslogtreecommitdiff
path: root/com32/sysdump
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-05-11 12:59:56 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-05-11 12:59:56 -0700
commit59eed332a52ccf37dfb7ce288df68d3f4671e646 (patch)
treec317b23c15cb4c4e3bf59d7043544451a94a0e59 /com32/sysdump
parent914da438d9e68034c7376a5558386b494a35c514 (diff)
downloadsyslinux-59eed332a52ccf37dfb7ce288df68d3f4671e646.tar.gz
sysdump: use <sys/cpu.h>
Use <sys/cpu.h> where it makes sense. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/sysdump')
-rw-r--r--com32/sysdump/cpuid.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/com32/sysdump/cpuid.c b/com32/sysdump/cpuid.c
index ac80f229..372a70db 100644
--- a/com32/sysdump/cpuid.c
+++ b/com32/sysdump/cpuid.c
@@ -19,26 +19,6 @@ struct cpuid_info {
struct cpuid_data data;
};
-static bool has_eflag(uint32_t flag)
-{
- uint32_t f0, f1;
-
- asm("pushfl ; "
- "pushfl ; "
- "popl %0 ; "
- "movl %0,%1 ; "
- "xorl %2,%1 ; "
- "pushl %1 ; "
- "popfl ; "
- "pushfl ; "
- "popl %1 ; "
- "popfl"
- : "=&r" (f0), "=&r" (f1)
- : "ri" (flag));
-
- return !!((f0^f1) & flag);
-}
-
static void get_cpuid(uint32_t eax, uint32_t ecx, struct cpuid_data *data)
{
asm("pushl %%ebx ; cpuid ; movl %%ebx,%1 ; popl %%ebx"
@@ -59,7 +39,7 @@ void dump_cpuid(struct backend *be)
struct cpuid_data invalid_leaf;
struct cpuid_data data;
- if (!has_eflag(EFLAGS_ID))
+ if (!cpu_has_eflag(EFLAGS_ID))
return;
printf("Dumping CPUID... ");