kernel: implement cpu IDs and per-cpu variables
This commit is contained in:
@@ -36,7 +36,7 @@ struct acpi_rsdp {
|
||||
struct acpi_rsdp_20 rsdp_20;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
|
||||
struct acpi_sdt {
|
||||
char s_sig[4];
|
||||
uint32_t s_length;
|
||||
@@ -66,7 +66,7 @@ struct acpi_madt {
|
||||
} __packed;
|
||||
|
||||
extern kern_status_t acpi_init(void);
|
||||
extern kern_status_t acpi_smp_init(void);
|
||||
extern kern_status_t acpi_scan_cpu_topology(void);
|
||||
|
||||
extern struct acpi_sdt *acpi_find_sdt(uint32_t sig);
|
||||
|
||||
|
||||
12
arch/x86_64/include/arch/msr.h
Normal file
12
arch/x86_64/include/arch/msr.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef ARCH_MSR_H_
|
||||
#define ARCH_MSR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MSR_GS_BASE 0xC0000101
|
||||
|
||||
/* defined in cpu_ctrl.S */
|
||||
extern uint64_t rdmsr(uint32_t id);
|
||||
extern void wrmsr(uint32_t id, uint64_t val);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user