diff options
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/simple_init/Config.lb | 1 | ||||
-rw-r--r-- | src/cpu/simple_init/simple_cpu_init.c | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/cpu/simple_init/Config.lb b/src/cpu/simple_init/Config.lb new file mode 100644 index 0000000000..ba1753c930 --- /dev/null +++ b/src/cpu/simple_init/Config.lb @@ -0,0 +1 @@ +object simple_cpu_init.o
\ No newline at end of file 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(); +} |