summaryrefslogtreecommitdiff
path: root/src/sys/include/arch/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/include/arch/amd64')
-rw-r--r--src/sys/include/arch/amd64/lapic.h15
-rw-r--r--src/sys/include/arch/amd64/mdcpu.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/src/sys/include/arch/amd64/lapic.h b/src/sys/include/arch/amd64/lapic.h
index d73e7d0..3cb2f3a 100644
--- a/src/sys/include/arch/amd64/lapic.h
+++ b/src/sys/include/arch/amd64/lapic.h
@@ -31,10 +31,25 @@
#ifndef _MACHINE_LAPIC_H_
#define _MACHINE_LAPIC_H_ 1
+#define LAPIC_TIMER_VEC 0x81
+
/*
* Initialize the local APIC on the current
* processor.
*/
void lapic_init(void);
+/*
+ * Send an end-of-interrupt message to the current
+ * processor's Local APIC
+ */
+void lapic_eoi(void);
+
+/*
+ * Start Local APIC timer oneshot in microseconds.
+ *
+ * @us: Microseconds.
+ */
+void lapic_timer_oneshot_us(size_t usec);
+
#endif /* !_MACHINE_LAPIC_H_ */
diff --git a/src/sys/include/arch/amd64/mdcpu.h b/src/sys/include/arch/amd64/mdcpu.h
index 1503adb..3fccc42 100644
--- a/src/sys/include/arch/amd64/mdcpu.h
+++ b/src/sys/include/arch/amd64/mdcpu.h
@@ -48,6 +48,7 @@
* @lapic_base: LAPIC register interface base
* @x2apic: Has the x2APIC? Is 1 if true
* @tss: Task state segment for this core
+ * @lapic_tmr_freq: Local APIC timer frequency
*/
struct mdcore {
uint32_t apic_id;
@@ -55,6 +56,7 @@ struct mdcore {
void *lapic_base;
uint8_t x2apic : 1;
struct tss_entry tss;
+ size_t lapic_tmr_freq;
};
#endif /* !_MACHINE_MDCPU_H_ */