LoginSignup
0
0

More than 5 years have passed since last update.

Zybo > Chronicles blog 48 > AMPの使用 > 5. CPU1の起動 > sev(イベント送信)命令を送信

Last updated at Posted at 2016-06-16

MicroZed Chronicles リスト http://adiuvoengineering.com/?page_id=285
@ Adam Taylor blog
https://forums.xilinx.com/t5/Xcell-Daily-Blog/Adam-Taylor-s-MicroZed-Chronicles-Part-48-Bare-Metal-AMP/ba-p/515105

AMPにてCPU0からCPU1を起動するコード例

int main()
{
    int delay;

    //Disable cache on OCM
    Xil_SetTibAttributes(0xFFFF0000,0x14de2);  // S=b1 TEX=b100 AP=b1111, C=b0, B=b0
    SetupIntrSystem(&IntcInstancePtr);
    print("CPU0: writing start address for cpu1\n\r");
    Xil_Out32(CPU1STARTADR, 0x00200000);
    dmb(); // waits until write has finished

    print("CPU0: sending the SEV to wake up CPU1\n\r");
    sev();

    while(1) {
       for( delay = 0; delay < OP_DELAYl delay++) // wait
       {}
       print("CPU 0\n\r");
    }
    return 0;
}

1 つ目のプロセッサが 2 つ目のコアを起動させる必要がある場合は、ロケーション 0xFFFFFFF0 に目的の pc 値を書き込み、sev (イベント送信) 命令を送信する必要があります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0