summaryrefslogtreecommitdiff
path: root/src/cpu/simple_init/simple_cpu_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/simple_init/simple_cpu_init.c')
-rw-r--r--src/cpu/simple_init/simple_cpu_init.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cpu/simple_init/simple_cpu_init.c b/src/cpu/simple_init/simple_cpu_init.c
new file mode 100644
index 0000000000..39b5832971
--- /dev/null
+++ b/src/cpu/simple_init/simple_cpu_init.c
@@ -0,0 +1,26 @@
+#include <linux/console.h>
+#include <device/device.h>
+#include <device/path.h>
+#include <device/cpu.h>
+
+#if CONFIG_SMP
+#error "This Configuration does not support SMP"
+#endif
+
+void initialize_cpus(device_t root)
+{
+ struct device_path cpu_path;
+ struct cpu_info *info;
+
+ /* Find the info struct for this cpu */
+ info = cpu_info();
+
+ /* Get the device path of the boot cpu */
+ cpu_path.type = DEVICE_PATH_BOOT_CPU;
+
+ /* Find the device struct for the boot cpu */
+ info->cpu = alloc_find_dev(root->link[1], &cpu_path);
+
+ /* Initialize the bootstrap processor */
+ cpu_initialize();
+}