Skip to contentSkip to conversation

x86: Pass correct cpu_index to ap_init()

PATCH New Bin Meng 2 participants 3 messages Oct 14, 2015 – Oct 18, 2015 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: Pass correct cpu_index to ap_init()

In sipi_vector.S, cpu_index (passed as %eax) is wrongly overwritten by the ap_init() function address. Correct it.

---

 arch/x86/cpu/sipi_vector.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/cpu/sipi_vector.S +2 -2
index bcef12c..0c4a157 100644
@@ -190,8 +190,8 @@ load_msr:
 
 	/* c_handler(cpu_num) */
 	movl	%esi, %eax	/* cpu_num */
-	mov	c_handler, %eax
-	call	*%eax
+	mov	c_handler, %esi
+	call	*%esi
 
 	.align	4
 .globl	sipi_params
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 x86: Pass correct cpu_index to ap_init()

Hi Bin,

Quoted 9 lines · Bin Meng

In sipi_vector.S, cpu_index (passed as %eax) is wrongly overwritten by the ap_init() function address. Correct it.

---

 arch/x86/cpu/sipi_vector.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I wonder if this value is even useful, but we do use it for debug output.

Regards,
Simon

#2 lore raw

PATCH 1/1 x86: Pass correct cpu_index to ap_init()

Quoted 10 lines · Simon Glass

Hi Bin,

Quoted 7 lines · Bin Meng

In sipi_vector.S, cpu_index (passed as %eax) is wrongly overwritten by the ap_init() function address. Correct it.

---

Quoted 6 lines
Quoted 2 lines
 arch/x86/cpu/sipi_vector.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I wonder if this value is even useful, but we do use it for debug output.

Applied to u-boot-x86, thanks!