forked from xuos/xiuos
fix sync core bootup.
This commit is contained in:
parent
b8031eaf51
commit
a8aea9338f
|
@ -43,6 +43,12 @@ extern int sys_spawn(char* img_start, char* name, char** argv);
|
||||||
|
|
||||||
static struct TraceTag hardkernel_tag, softkernel_tag;
|
static struct TraceTag hardkernel_tag, softkernel_tag;
|
||||||
static volatile int core_para_init = 0;
|
static volatile int core_para_init = 0;
|
||||||
|
|
||||||
|
static void sync_cores() {
|
||||||
|
while (core_para_init != 0xF) ;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* init tracer */
|
/* init tracer */
|
||||||
|
@ -100,6 +106,7 @@ int main(void)
|
||||||
|
|
||||||
// sync memory
|
// sync memory
|
||||||
__sync_synchronize();
|
__sync_synchronize();
|
||||||
|
sync_cores();
|
||||||
start_smp_cache_broadcast(cpu_id);
|
start_smp_cache_broadcast(cpu_id);
|
||||||
// enter kernel seriously
|
// enter kernel seriously
|
||||||
xizi_enter_kernel();
|
xizi_enter_kernel();
|
||||||
|
|
Loading…
Reference in New Issue