summary refs log tree commit diff stats
path: root/hw/apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/apic.c')
-rw-r--r--hw/apic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 82b858486b..486b9bf876 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -100,6 +100,18 @@ uint64_t cpu_get_apic_base(CPUState *env)
     return s->apicbase;
 }
 
+void cpu_set_apic_tpr(CPUX86State *env, uint8_t val)
+{
+    APICState *s = env->apic_state;
+    s->tpr = (val & 0x0f) << 4;
+}
+
+uint8_t cpu_get_apic_tpr(CPUX86State *env)
+{
+    APICState *s = env->apic_state;
+    return s->tpr >> 4;
+}
+
 /* return -1 if no bit is set */
 static int get_highest_priority_int(uint32_t *tab)
 {