Rev 3783 | Rev 3862 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3783 | Rev 3798 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | void cpu_arch_init(void) |
49 | void cpu_arch_init(void) |
50 | { |
50 | { |
51 | uint64_t myid; |
51 | uint64_t myid; |
52 | __hypercall_fast_ret1(0, 0, 0, 0, 0, CPU_MYID, &myid); |
52 | __hypercall_fast_ret1(0, 0, 0, 0, 0, CPU_MYID, &myid); |
53 | 53 | ||
- | 54 | CPU->arch.id = myid; |
|
- | 55 | ||
54 | md_node_t node = md_get_root(); |
56 | md_node_t node = md_get_root(); |
55 | 57 | ||
56 | /* walk through MD, find the current CPU node & its clock-frequency */ |
58 | /* walk through MD, find the current CPU node & its clock-frequency */ |
57 | while (true) { |
59 | while (true) { |
58 | 60 | ||
Line 89... | Line 91... | ||
89 | * @param m Processor structure of the CPU for which version information is to |
91 | * @param m Processor structure of the CPU for which version information is to |
90 | * be printed. |
92 | * be printed. |
91 | */ |
93 | */ |
92 | void cpu_print_report(cpu_t *m) |
94 | void cpu_print_report(cpu_t *m) |
93 | { |
95 | { |
94 | // TODO: modify cpu_t so that it contains a pointer to the MD of |
96 | printf("cpu%d: Niagara (%d MHz)\n", m->id, |
95 | // the represented CPU, from this function print the information found in the MD. |
- | |
96 | printf("Niagara, 5MHz\n"); |
97 | m->arch.clock_frequency / 1000000); |
97 | } |
98 | } |
98 | 99 | ||
99 | /** @} |
100 | /** @} |
100 | */ |
101 | */ |