#include <string.h>
-static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
- unsigned int *ecx, unsigned int *edx)
-{
- asm volatile("cpuid"
- : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
- : "0" (*eax), "2" (*ecx)
- : "memory");
-}
-
static inline void cpuid(unsigned int op,
unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx)
static inline int arch_init(char *envp[])
{
unsigned int level;
- char str[12];
+ char str[13];
cpuid(0, &level, (unsigned int *) &str[0],
(unsigned int *) &str[8],
(unsigned int *) &str[4]);
+ str[12] = '\0';
if (!strcmp(str, "GenuineIntel"))
tsc_reliable = arch_init_intel(level);
else if (!strcmp(str, "AuthenticAMD"))