sizeram removal/conversion.
[coreboot.git] / src / arch / ppc / lib / cpu.c
1 #include <console/console.h>
2 #include <arch/io.h>
3 #include <string.h>
4 #include <cpu/cpu.h>
5 #include <cpu/ppc/cpuid.h>
6 #include <smp/start_stop.h>
7 #include "ppc.h"
8 #include "ppcreg.h"
9
10 #error "FIXME what should call cpu_initialize?"
11
12 void cpu_initialize(void)
13 {
14         /* Because we busy wait at the printk spinlock.
15          * It is important to keep the number of printed messages
16          * from secondary cpus to a minimum, when debugging is
17          * disabled.
18          */
19         struct device *cpu;
20         struct cpu_info *info;
21         info = cpu_info();
22
23         printk_notice("Initializing CPU #%d\n", info->index);
24
25         cpu = info->cpu;
26         if (!cpu) {
27                 die("CPU: missing cpu device structure");
28         }
29         
30         /* Find what type of cpu we are dealing with */
31         cpu->vendor 0;  /* PPC cpus do not have a vendor field */
32         cpu->device = ppc_getpvr();
33         display_cpuid(cpu);
34
35 #if 0
36         /* Lookup the cpu's operations */
37         set_cpu_ops(cpu);
38
39         /* Initialize the cpu */
40         if (cpu->ops && cpu->ops->init) {
41                 cpu->enabled = 1;
42                 cpu->initialized = 1;
43                 cpu->ops->init();
44         }
45 #endif  
46         /* Turn on caching if we haven't already */
47
48         printk_info("CPU #%d Initialized\n", processor_id);
49         return processor_id;
50 }
51