summaryrefslogtreecommitdiff
path: root/src/cpu/simple_init/simple_cpu_init.c
blob: e0a80c6820ed351aff27b1d568c555e2f109f767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <console/console.h>
#include <device/device.h>
#include <device/path.h>
#include <cpu/cpu.h>

#if CONFIG_SMP
#error "This Configuration does not support SMP"
#endif

void initialize_cpus(struct bus *cpu_bus)
{
	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_CPU;
	cpu_path.u.cpu.id = 0;

	/* Find the device struct for the boot cpu */
	info->cpu = alloc_find_dev(cpu_bus, &cpu_path);
	
	/* Initialize the bootstrap processor */
	cpu_initialize();
}