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

#define ARCH_X86_CPU_H
L
Linus Torvalds 已提交
4 5

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

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

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

	struct		cpu_model_info c_models[4];

J
Jaswinder Singh Rajput 已提交
20 21 22 23 24
	void            (*c_early_init)(struct cpuinfo_x86 *);
	void		(*c_init)(struct cpuinfo_x86 *);
	void		(*c_identify)(struct cpuinfo_x86 *);
	unsigned int	(*c_size_cache)(struct cpuinfo_x86 *, unsigned int);
	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