summaryrefslogtreecommitdiff
path: root/kernel/apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/apic.c')
-rw-r--r--kernel/apic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/apic.c b/kernel/apic.c
index 75837f7..509fd3b 100644
--- a/kernel/apic.c
+++ b/kernel/apic.c
@@ -71,6 +71,7 @@ static uint32_t apic_read(uint32_t offset)
uint32_t apic_id()
{
+ if(local_apic_addr==0)return 0;
return apic_read(APIC_APICID)>>24;
}