cpu.h 850 字节
Newer Older
1 2 3
#ifndef ARCH_X86_CPU_H

#define ARCH_X86_CPU_H
L
Linus Torvalds 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

struct cpu_model_info {
	int vendor;
	int family;
	char *model_names[16];
};

/* attempt to consolidate cpu attributes */
struct cpu_dev {
	char	* c_vendor;

	/* some have two possibilities for cpuid string */
	char	* c_ident[2];	

	struct		cpu_model_info c_models[4];

20
	void            (*c_early_init)(struct cpuinfo_x86 *c);
L
Linus Torvalds 已提交
21 22 23
	void		(*c_init)(struct cpuinfo_x86 * c);
	void		(*c_identify)(struct cpuinfo_x86 * c);
	unsigned int	(*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size);
Y
Yinghai Lu 已提交
24
	int	c_x86_vendor;
L
Linus Torvalds 已提交
25 26
};

Y
Yinghai Lu 已提交
27 28 29 30
#define cpu_dev_register(cpu_devX) \
	static struct cpu_dev *__cpu_dev_##cpu_devX __used \
	__attribute__((__section__(".x86_cpu_dev.init"))) = \
	&cpu_devX;
L
Linus Torvalds 已提交
31

Y
Yinghai Lu 已提交
32
extern struct cpu_dev *__x86_cpu_dev_start[], *__x86_cpu_dev_end[];
33

L
Linus Torvalds 已提交
34
extern void display_cacheinfo(struct cpuinfo_x86 *c);
35

36
#endif