fix bug of smp startup
This commit is contained in:
parent
86d96159fe
commit
1402fe12e9
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue