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

#define ARCH_X86_CPU_H
L
Linus Torvalds 已提交
4 5 6 7

struct cpu_model_info {
	int vendor;
	int family;
8
	const char *model_names[16];
L
Linus Torvalds 已提交
9 10 11 12
};

/* attempt to consolidate cpu attributes */
struct cpu_dev {
13
	const char	* c_vendor;
L
Linus Torvalds 已提交
14 15

	/* some have two possibilities for cpuid string */
16
	const char	* c_ident[2];
L
Linus Torvalds 已提交
17 18 19

	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
#define cpu_dev_register(cpu_devX) \
28
	static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \
Y
Yinghai Lu 已提交
29 30
	__attribute__((__section__(".x86_cpu_dev.init"))) = \
	&cpu_devX;
L
Linus Torvalds 已提交
31

32 33
extern const struct cpu_dev *const __x86_cpu_dev_start[],
			    *const __x86_cpu_dev_end[];
34

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

37
#endif