/trunk/kernel/arch/sparc64/include/cpu.h |
51,14 → 51,15 |
|
#define IMPL_SPARC64V 0x5 |
|
typedef struct { |
struct cpu_arch { |
uint32_t mid; /**< Processor ID as read from UPA_CONFIG. */ |
ver_reg_t ver; |
uint32_t clock_frequency; /**< Processor frequency in Hz. */ |
uint64_t next_tick_cmpr; /**< Next clock interrupt should be |
generated when the TICK register |
matches this value. */ |
} cpu_arch_t; |
* generated when the TICK register |
* matches this value. |
*/ |
}; |
|
#endif |
|
/trunk/kernel/arch/ia64/include/cpu.h |
42,11 → 42,11 |
#define FAMILY_ITANIUM 0x7 |
#define FAMILY_ITANIUM2 0x1f |
|
typedef struct { |
struct cpu_arch { |
uint64_t cpuid0; |
uint64_t cpuid1; |
cpuid3_t cpuid3; |
} cpu_arch_t; |
}; |
|
/** Read CPUID register. |
* |
/trunk/kernel/arch/ppc32/include/cpuid.h |
37,12 → 37,12 |
|
#include <arch/types.h> |
|
typedef struct { |
struct cpu_info { |
uint16_t version; |
uint16_t revision; |
} __attribute__ ((packed)) cpu_info_t; |
} __attribute__ ((packed)); |
|
static inline void cpu_version(cpu_info_t *info) |
static inline void cpu_version(struct cpu_info *info) |
{ |
asm volatile ( |
"mfpvr %0\n" |
/trunk/kernel/arch/amd64/include/cpuid.h |
46,12 → 46,12 |
|
#include <arch/types.h> |
|
typedef struct { |
struct cpu_info { |
uint32_t cpuid_eax; |
uint32_t cpuid_ebx; |
uint32_t cpuid_ecx; |
uint32_t cpuid_edx; |
} __attribute__ ((packed)) cpu_info_t; |
} __attribute__ ((packed)); |
|
extern int has_cpuid(void); |
|
/trunk/kernel/arch/amd64/include/cpu.h |
57,7 → 57,7 |
#include <typedefs.h> |
#include <arch/pm.h> |
|
typedef struct { |
struct cpu_arch { |
int vendor; |
int family; |
int model; |
65,7 → 65,7 |
struct tss *tss; |
|
count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
} cpu_arch_t; |
}; |
|
struct star_msr { |
|
/trunk/kernel/arch/amd64/src/amd64.c |
103,7 → 103,7 |
|
void arch_pre_mm_init(void) |
{ |
cpu_info_t cpuid_s; |
struct cpu_info cpuid_s; |
|
cpuid(AMD_CPUID_EXTENDED,&cpuid_s); |
if (! (cpuid_s.cpuid_edx & (1<<AMD_EXT_NOEXECUTE))) |
/trunk/kernel/arch/ppc64/include/cpuid.h |
37,12 → 37,12 |
|
#include <arch/types.h> |
|
typedef struct { |
struct cpu_info { |
uint16_t version; |
uint16_t revision; |
} __attribute__ ((packed)) cpu_info_t; |
} __attribute__ ((packed)); |
|
static inline void cpu_version(cpu_info_t *info) |
static inline void cpu_version(struct cpu_info *info) |
{ |
asm volatile ( |
"mfpvr %0\n" |
/trunk/kernel/arch/ia32/include/cpuid.h |
37,12 → 37,12 |
|
#include <arch/types.h> |
|
typedef struct { |
struct cpu_info { |
uint32_t cpuid_eax; |
uint32_t cpuid_ebx; |
uint32_t cpuid_ecx; |
uint32_t cpuid_edx; |
} __attribute__ ((packed)) cpu_info_t; |
} __attribute__ ((packed)); |
|
struct __cpuid_extended_feature_info { |
unsigned sse3 : 1; |
97,7 → 97,7 |
return ret; |
} |
|
static inline void cpuid(uint32_t cmd, cpu_info_t *info) |
static inline void cpuid(uint32_t cmd, struct cpu_info *info) |
{ |
__asm__ volatile ( |
"movl %4, %%eax\n" |
/trunk/kernel/arch/ia32/include/cpu.h |
42,7 → 42,7 |
#define EFLAGS_IF (1 << 9) |
#define EFLAGS_RF (1 << 16) |
|
typedef struct { |
struct cpu_arch { |
int vendor; |
int family; |
int model; |
50,7 → 50,7 |
struct tss *tss; |
|
count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
} cpu_arch_t; |
}; |
|
|
#define CR4_OSFXSR_MASK (1<<9) |