kernel: add c++ support
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
|
||||
static uint32_t *lapic_base;
|
||||
|
||||
extern int check_apic(void);
|
||||
extern "C" {
|
||||
/* defined in apic_ctrl.S */
|
||||
extern int check_apic(void);
|
||||
}
|
||||
|
||||
static uintptr_t apic_get_base(void)
|
||||
{
|
||||
@@ -78,7 +81,7 @@ kern_status_t local_apic_enable(void)
|
||||
}
|
||||
|
||||
apic_set_base(apic_get_base());
|
||||
lapic_base = find_lapic(madt);
|
||||
lapic_base = (uint32_t *)find_lapic(madt);
|
||||
|
||||
local_apic_write(0xF0, local_apic_read(0xF0) | 0x100);
|
||||
|
||||
@@ -104,11 +107,11 @@ static void init_all_ioapic(void)
|
||||
|
||||
kern_status_t apic_init(void)
|
||||
{
|
||||
static int bsp_id = -1;
|
||||
static unsigned int bsp_id = (unsigned int)-1;
|
||||
|
||||
/* the bootstrap processor will be the first one ro call apic_init().
|
||||
it is responsible for initialising the I/O APICs */
|
||||
if (bsp_id == -1) {
|
||||
if (bsp_id == (unsigned int)-1) {
|
||||
bsp_id = this_cpu();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user