2015-06-08 07:30:50 +02:00
|
|
|
Index: biosdevname-0.6.2/src/bios_dev_name.c
|
2015-02-21 23:50:57 +01:00
|
|
|
===================================================================
|
2015-06-08 07:30:50 +02:00
|
|
|
--- biosdevname-0.6.2.orig/src/bios_dev_name.c
|
|
|
|
+++ biosdevname-0.6.2/src/bios_dev_name.c
|
2015-02-22 00:07:03 +01:00
|
|
|
@@ -114,10 +114,21 @@ static u_int32_t
|
2015-02-21 23:50:57 +01:00
|
|
|
cpuid (u_int32_t eax, u_int32_t ecx)
|
|
|
|
{
|
|
|
|
asm volatile (
|
|
|
|
- "xor %%ebx, %%ebx; cpuid"
|
2015-02-22 00:16:56 +01:00
|
|
|
+#ifdef __x86_64__
|
2015-02-22 00:20:21 +01:00
|
|
|
+ "push %%rbx\n"
|
2015-02-22 00:07:03 +01:00
|
|
|
+#else
|
2015-02-22 00:02:24 +01:00
|
|
|
+ "push %%ebx\n"
|
2015-02-22 00:07:03 +01:00
|
|
|
+#endif
|
2015-02-22 00:28:28 +01:00
|
|
|
+ "xor %%ebx, %%ebx\n" /* not useful? ebx is overwritten by call? */
|
2015-02-21 23:50:57 +01:00
|
|
|
+ "cpuid\n"
|
2015-02-22 00:16:56 +01:00
|
|
|
+#ifdef __x86_64__
|
2015-02-22 00:20:21 +01:00
|
|
|
+ "pop %%rbx\n"
|
2015-02-22 00:07:03 +01:00
|
|
|
+#else
|
2015-02-22 00:02:24 +01:00
|
|
|
+ "pop %%ebx\n"
|
2015-02-22 00:07:03 +01:00
|
|
|
+#endif
|
2015-02-21 23:50:57 +01:00
|
|
|
: "=a" (eax), "=c" (ecx)
|
|
|
|
: "a" (eax)
|
|
|
|
- : "%ebx", "%edx");
|
|
|
|
+ : "%edx");
|
|
|
|
return ecx;
|
|
|
|
}
|
|
|
|
|