From 9230e66e5c711bd077705465d34161d6b1e7fee7 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 23 Jan 2005 20:46:56 +0000 Subject: CR8 support git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1237 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/apic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hw/apic.c') diff --git a/hw/apic.c b/hw/apic.c index 82b8584..486b9bf 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) { -- cgit v1.1