One thing that's quite a bit confusing in v3 is the mess of cpu.c and cpu.h.
include/arch/x86/cpu.h defines lots of functions which should be in a .c file instead. They are: struct cpuid_result cpuid(u32 op); u32 cpuid_eax(u32 op); u32 cpuid_ebx(u32 op); u32 cpuid_ecx(u32 op); u32 cpuid_edx(u32 op); void get_fms(struct cpuinfo_x86 *c, u32 tfms); unsigned long read_cr0(void); void write_cr0(unsigned long cr0); void invd(void); void wbinvd(void); void enable_cache(void); void disable_cache(void); void cpu_relax(void); void hlt(void);
arch/x86/geodelx/cpu.c is completely unused, but the contents look important. Why don't we call them?
northbridge/amd/k8/cpu.c is used.
Can someone please illustrate the underlying architecture?
(Background: I'm trying to add timestamping to printk, but I'm totally at a loss where I should place get_timestamp().)
Regards, Carl-Daniel