fix bug of smp startup from Wa_Weigen and Huang_Yuqing

it is OK
This commit is contained in:
xuedongliang 2021-05-18 18:39:13 +08:00
commit 302079ab81
5 changed files with 35 additions and 22 deletions

View File

@ -70,13 +70,13 @@ _begin:
j Kd233Start
#ifdef ARCH_SMP
.data
.globl cpu2_boot_flag
.align 3
cpu2_boot_flag:
.8byte 0
#endif
.section .text.entry
.align 2

View File

@ -84,14 +84,17 @@ void Kd233Start(uint32_t mhartid)
/*kernel start entry*/
entry();
break;
#ifdef ARCH_SMP
case CPU1:
while(0x2018050420191010 != cpu2_boot_flag) { ///< waiting for boot flag ,then start cpu1 core
}
SecondaryCpuCStart();
break;
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
#endif
break;
default:
break;
}

View File

@ -82,14 +82,18 @@ void Kd233Start(uint32_t mhartid)
/*kernel start entry*/
entry();
break;
#ifdef ARCH_SMP
case CPU1:
while(0x2018050420191010 != cpu2_boot_flag) { ///< waiting for boot flag ,then start cpu1 core
}
SecondaryCpuCStart();
break;
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
#endif
break;
default:
break;
}

View File

@ -81,14 +81,17 @@ void Kd233Start(uint32_t mhartid)
/*kernel start entry*/
entry();
break;
#ifdef ARCH_SMP
case CPU1:
while(0x2018050420191010 != cpu2_boot_flag) { ///< waiting for boot flag ,then start cpu1 core
}
SecondaryCpuCStart();
break;
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
#endif
break;
default:
break;
}

View File

@ -77,14 +77,17 @@ void Kd233Start(uint32_t mhartid)
/*kernel start entry*/
entry();
break;
#ifdef ARCH_SMP
case CPU1:
while(0x2018050420191010 != cpu2_boot_flag) { ///< waiting for boot flag ,then start cpu1 core
}
SecondaryCpuCStart();
break;
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
#endif
break;
default:
break;
}