Browse Source

fix bug of smp startup from Wa_Weigen and Huang_Yuqing

it is OK
pull/3/head
xuedongliang 1 year ago
parent
commit
302079ab81
  1. 4
      arch/risc-v/k210/boot.S
  2. 9
      board/aiit-riscv64-board/board.c
  3. 10
      board/k210-emulator/board.c
  4. 9
      board/kd233/board.c
  5. 9
      board/maix-go/board.c

4
arch/risc-v/k210/boot.S

@ -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

9
board/aiit-riscv64-board/board.c

@ -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
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
break;
#endif
break;
default:
break;
}

10
board/k210-emulator/board.c

@ -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
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
break;
#endif
break;
default:
break;
}

9
board/kd233/board.c

@ -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
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
break;
#endif
break;
default:
break;
}

9
board/maix-go/board.c

@ -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
#ifndef ARCH_SMP
asm volatile("wfi");
#endif
}
#ifdef ARCH_SMP
SecondaryCpuCStart();
break;
#endif
break;
default:
break;
}

Loading…
Cancel
Save