/trunk/kernel/generic/include/time/timeout.h |
---|
36,7 → 36,7 |
#define KERN_TIMEOUT_H_ |
#include <arch/types.h> |
#include <typedefs.h> |
#include <cpu.h> |
#include <synch/spinlock.h> |
#include <adt/list.h> |
/trunk/kernel/generic/include/cpu.h |
---|
52,7 → 52,7 |
* |
* There is one structure like this for every processor. |
*/ |
struct cpu { |
typedef struct { |
SPINLOCK_DECLARE(lock); |
tlb_shootdown_msg_t tlb_messages[TLB_MESSAGE_QUEUE_LEN]; |
91,7 → 91,7 |
* Stack used by scheduler when there is no running thread. |
*/ |
uint8_t *stack; |
}; |
} cpu_t; |
extern cpu_t *cpus; |
/trunk/kernel/generic/include/typedefs.h |
---|
47,10 → 47,6 |
typedef unsigned long long task_id_t; |
typedef unsigned long context_id_t; |
typedef struct cpu_info cpu_info_t; |
typedef struct cpu cpu_t; |
typedef struct cpu_arch cpu_arch_t; |
typedef struct task task_t; |
typedef enum state state_t; |
typedef struct thread thread_t; |
/trunk/kernel/arch/sparc64/include/cpu.h |
---|
51,15 → 51,14 |
#define IMPL_SPARC64V 0x5 |
struct cpu_arch { |
typedef struct { |
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. |
*/ |
}; |
generated when the TICK register |
matches this value. */ |
} cpu_arch_t; |
#endif |
/trunk/kernel/arch/ia64/include/cpu.h |
---|
42,11 → 42,11 |
#define FAMILY_ITANIUM 0x7 |
#define FAMILY_ITANIUM2 0x1f |
struct cpu_arch { |
typedef struct { |
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> |
struct cpu_info { |
typedef struct { |
uint16_t version; |
uint16_t revision; |
} __attribute__ ((packed)); |
} __attribute__ ((packed)) cpu_info_t; |
static inline void cpu_version(struct cpu_info *info) |
static inline void cpu_version(cpu_info_t *info) |
{ |
asm volatile ( |
"mfpvr %0\n" |
/trunk/kernel/arch/ppc32/include/cpu.h |
---|
37,10 → 37,10 |
#include <typedefs.h> |
struct cpu_arch { |
typedef struct { |
int version; |
int revision; |
}; |
} cpu_arch_t; |
#endif |
/trunk/kernel/arch/amd64/include/cpuid.h |
---|
46,12 → 46,12 |
#include <arch/types.h> |
struct cpu_info { |
typedef struct { |
uint32_t cpuid_eax; |
uint32_t cpuid_ebx; |
uint32_t cpuid_ecx; |
uint32_t cpuid_edx; |
} __attribute__ ((packed)); |
} __attribute__ ((packed)) cpu_info_t; |
extern int has_cpuid(void); |
/trunk/kernel/arch/amd64/include/cpu.h |
---|
57,7 → 57,7 |
#include <typedefs.h> |
#include <arch/pm.h> |
struct cpu_arch { |
typedef struct { |
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) |
{ |
struct cpu_info cpuid_s; |
cpu_info_t 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> |
struct cpu_info { |
typedef struct { |
uint16_t version; |
uint16_t revision; |
} __attribute__ ((packed)); |
} __attribute__ ((packed)) cpu_info_t; |
static inline void cpu_version(struct cpu_info *info) |
static inline void cpu_version(cpu_info_t *info) |
{ |
asm volatile ( |
"mfpvr %0\n" |
/trunk/kernel/arch/ppc64/include/cpu.h |
---|
37,10 → 37,10 |
#include <typedefs.h> |
struct cpu_arch { |
typedef struct { |
int version; |
int revision; |
}; |
} cpu_arch_t; |
#endif |
/trunk/kernel/arch/mips32/include/cpu.h |
---|
37,10 → 37,10 |
#include <arch/types.h> |
struct cpu_arch { |
typedef struct { |
uint32_t imp_num; |
uint32_t rev_num; |
}; |
} cpu_arch_t; |
#endif |
/trunk/kernel/arch/ia32/include/cpuid.h |
---|
37,12 → 37,12 |
#include <arch/types.h> |
struct cpu_info { |
typedef struct { |
uint32_t cpuid_eax; |
uint32_t cpuid_ebx; |
uint32_t cpuid_ecx; |
uint32_t cpuid_edx; |
} __attribute__ ((packed)); |
} __attribute__ ((packed)) cpu_info_t; |
struct __cpuid_extended_feature_info { |
unsigned sse3 : 1; |
97,7 → 97,7 |
return ret; |
} |
static inline void cpuid(uint32_t cmd, struct cpu_info *info) |
static inline void cpuid(uint32_t cmd, cpu_info_t *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) |
struct cpu_arch { |
typedef struct { |
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) |