Skip to contentSkip to conversation

Reset CPU on INIT IPI

PATCH Applied Gleb Natapov 2 participants 2 messages Sep 25, 2008 – Oct 1, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reset CPU on INIT IPI

INIT IPI should reset CPU. Also non boot CPU should be halted. It will be un-halted by SIPI.

hw/apic.c +5 -0
index 64e75ad..1a44c3a 100644
@@ -458,6 +458,11 @@ static void apic_init_ipi(APICState *s)
     s->initial_count = 0;
     s->initial_count_load_time = 0;
     s->next_time = 0;
+
+    cpu_reset(s->cpu_env);
+
+    if (!(s->apicbase & MSR_IA32_APICBASE_BSP))
+        s->cpu_env->halted = 1;
 }
 
 /* send a SIPI message to the CPU to start it */

--
Gleb.

#1 lore raw
Quoted 2 lines · Gleb Natapov

INIT IPI should reset CPU. Also non boot CPU should be halted. It will be un-halted by SIPI.

Applied, thanks.

Quoted 23 lines
hw/apic.c +5 -1
index 64e75ad..1a44c3a 100644
@@ -458,6 +458,11 @@ static void apic_init_ipi(APICState *s)
     s->initial_count = 0;
     s->initial_count_load_time = 0;
     s->next_time = 0;
+
+    cpu_reset(s->cpu_env);
+
+    if (!(s->apicbase & MSR_IA32_APICBASE_BSP))
+        s->cpu_env->halted = 1;
 }
 
 /* send a SIPI message to the CPU to start it */
--

Gleb.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net