summaryrefslogtreecommitdiff
path: root/sys/inc
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-17 11:41:40 -0500
committerIan Moffett <ian@osmora.org>2025-11-17 11:41:40 -0500
commitc09f0ee6b338e30d8408dc43378f4e7838819275 (patch)
tree131dec09f99bce52c3e86ac5a1160e6c39de2f93 /sys/inc
parent358d38649de0ba2ee28ec4ba9315a76eaadbb947 (diff)
kern/amd64: lapic: Configure and calibrate timer
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/inc')
-rw-r--r--sys/inc/arch/amd64/lapic.h2
-rw-r--r--sys/inc/arch/amd64/mcb.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/inc/arch/amd64/lapic.h b/sys/inc/arch/amd64/lapic.h
index b65f14b..4f82681 100644
--- a/sys/inc/arch/amd64/lapic.h
+++ b/sys/inc/arch/amd64/lapic.h
@@ -30,6 +30,8 @@
#ifndef _MACHINE_LAPIC_H_
#define _MACHINE_LAPIC_H_ 1
+#define LAPIC_TMR_VEC 0x81
+
/*
* Initialize the Local APIC on-board the
* processor for the current core
diff --git a/sys/inc/arch/amd64/mcb.h b/sys/inc/arch/amd64/mcb.h
index eb63365..ccd71ce 100644
--- a/sys/inc/arch/amd64/mcb.h
+++ b/sys/inc/arch/amd64/mcb.h
@@ -40,11 +40,13 @@
* @hwid: Hardware APIC ID
* @xapic_io: MMIO base for the legacy xAPIC
* @has_x2apic: Set if x2APIC mode is supported
+ * @lapic_tmr_freq: Frequency of Local APIC timer
*/
struct mcb {
uint32_t hwid;
void *xapic_io;
uint8_t has_x2apic : 1;
+ size_t lapic_tmr_freq;
};
#endif /* !_MACHINE_MCB_H_ */