kernel: implement cpu IDs and per-cpu variables
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <socks/object.h>
|
||||
#include <arch/e820.h>
|
||||
#include <socks/init.h>
|
||||
#include <socks/percpu.h>
|
||||
#include <socks/cpu.h>
|
||||
#include <socks/memblock.h>
|
||||
#include <socks/vm.h>
|
||||
#include <socks/printk.h>
|
||||
@@ -53,7 +55,13 @@ int ml_init(uintptr_t arg)
|
||||
|
||||
pmap_bootstrap();
|
||||
|
||||
acpi_init();
|
||||
acpi_scan_cpu_topology();
|
||||
init_per_cpu_areas();
|
||||
|
||||
cpu_data_t *this_cpu = get_this_cpu();
|
||||
this_cpu->c_flags = CPU_ONLINE;
|
||||
this_cpu->c_id = this_cpu();
|
||||
put_cpu(this_cpu);
|
||||
|
||||
vm_zone_descriptor_t vm_zones[] = {
|
||||
{ .zd_id = VM_ZONE_DMA, .zd_node = 0, .zd_name = "dma", .zd_base = 0x00, .zd_limit = 0xffffff },
|
||||
|
||||
Reference in New Issue
Block a user