summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-23 20:46:56 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-23 20:46:56 +0000
commit9230e66e5c711bd077705465d34161d6b1e7fee7 (patch)
treea378dce30060a2b654a945c56ecd019d23881a8b /hw
parent0523c6b7c5605e93b1c9960a3a91d08535e9a77e (diff)
downloadqemu-9230e66e5c711bd077705465d34161d6b1e7fee7.tar.gz
CR8 support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1237 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-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)
{