cpu.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifdef CONFIG_X86_32
  2. struct cpu_model_info {
  3. int vendor;
  4. int family;
  5. char *model_names[16];
  6. };
  7. /* attempt to consolidate cpu attributes */
  8. struct cpu_dev {
  9. char * c_vendor;
  10. /* some have two possibilities for cpuid string */
  11. char * c_ident[2];
  12. struct cpu_model_info c_models[4];
  13. void (*c_early_init)(struct cpuinfo_x86 *c);
  14. void (*c_init)(struct cpuinfo_x86 * c);
  15. void (*c_identify)(struct cpuinfo_x86 * c);
  16. unsigned int (*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size);
  17. };
  18. extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
  19. struct cpu_vendor_dev {
  20. int vendor;
  21. struct cpu_dev *cpu_dev;
  22. };
  23. #define cpu_vendor_dev_register(cpu_vendor_id, cpu_dev) \
  24. static struct cpu_vendor_dev __cpu_vendor_dev_##cpu_vendor_id __used \
  25. __attribute__((__section__(".x86cpuvendor.init"))) = \
  26. { cpu_vendor_id, cpu_dev }
  27. extern struct cpu_vendor_dev __x86cpuvendor_start[], __x86cpuvendor_end[];
  28. extern int get_model_name(struct cpuinfo_x86 *c);
  29. extern void display_cacheinfo(struct cpuinfo_x86 *c);
  30. #endif /* CONFIG_X86_32 */
  31. extern void __cpuinit amd_enable_pci_ext_cfg(struct cpuinfo_x86 *c);