Rev 1787 | Rev 1899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1881 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
- | 35 | #include <arch/asm.h> |
|
35 | #include <cpu.h> |
36 | #include <cpu.h> |
36 | #include <arch.h> |
37 | #include <arch.h> |
37 | #include <arch/register.h> |
38 | #include <arch/register.h> |
38 | #include <arch/asm.h> |
- | |
39 | #include <print.h> |
39 | #include <print.h> |
- | 40 | #include <arch/boot/boot.h> |
|
40 | 41 | ||
41 | void cpu_arch_init(void) |
42 | void cpu_arch_init(void) |
42 | { |
43 | { |
- | 44 | CPU->arch.clock_frequency = bootinfo.processor.clock_frequency; |
|
43 | } |
45 | } |
44 | 46 | ||
45 | void cpu_identify(void) |
47 | void cpu_identify(void) |
46 | { |
48 | { |
47 | CPU->arch.ver.value = ver_read(); |
49 | CPU->arch.ver.value = ver_read(); |
Line 91... | Line 93... | ||
91 | default: |
93 | default: |
92 | impl = "Unknown"; |
94 | impl = "Unknown"; |
93 | break; |
95 | break; |
94 | } |
96 | } |
95 | 97 | ||
96 | printf("cpu%d: manuf=%s, impl=%s, mask=%d\n", CPU->id, manuf, impl, CPU->arch.ver.mask); |
98 | printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n", |
- | 99 | CPU->id, manuf, impl, CPU->arch.ver.mask, CPU->arch.clock_frequency/1000000); |
|
97 | } |
100 | } |
98 | 101 | ||
99 | /** @} |
102 | /** @} |
100 | */ |
103 | */ |