This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于PCIe boot的hello world demo的疑问



大家好:

       我在使用C6678EVM,用PCIe boot实现多核启动,在C:\ti\mcsdk_2_01_02_06\tools\boot_loader\examples\pcie有一个hello world demo,有个问题想要请教下大家:

       据我了解,hello world demo做的事情是core 0先启动了,然后由core 0将入口地址_c_int00写入其余几个core的magic address,然后发送中断唤醒其余几个核,其余几个核就可以开始跑这个工程了。

      我想验证core1~core7是否成功被唤醒并且开始跑这个工程,所以我对代码进行了如下修改:

      

	if (DNUM == 0)
    {
		/* Initialize UART */
		platform_uart_init();
        platform_uart_set_baudrate(BOOT_UART_BAUDRATE);

        printf("%s%s\n\n", version_msg, version);
        write_uart(version_msg);
        write_uart(version);

        write_uart("\r\n\r\nBooting Hello World image on Core 0 from PCIE ...");

        platform_get_info(&pform_info);

        /* Unlock the chip registers */
        DEVICE_REG32_W(KICK0, 0x83e70b13);
        DEVICE_REG32_W(KICK1, 0x95a4f1e0);

        /* Writing the entry address to other cores */
        for (core = 1; core < pform_info.cpu.core_count; core++)
        {
            sprintf(boot_msg, "\r\n\r\nBooting Hello World image on Core %d from Core 0 ...", core);
            write_uart(boot_msg);

			DEVICE_REG32_W(BOOT_MAGIC_ADDR(core), (uint32_t)&_c_int00);

			/* Delay 1us sec */
            platform_delay(1);
        }
        for (core = 1; core < pform_info.cpu.core_count; core++)
        {
            /* IPC interrupt other cores */
            DEVICE_REG32_W(IPCGR(core), 1);
            platform_delay(1000);
        }

    }

	else
		{
		sprintf(boot_msg, "\r\n\r\n core %d start...", DNUM);
		write_uart(boot_msg);
		write_boot_magic_number();
		}

      主要修改内容是在else{}里面加了打印信息,如果core1~core7被成功唤醒了,那么它们应该不会执行DNUM==0里的内容(DNUM寄存器为核号吧?),而会执行else里面的内容,也就是各自核都会输入“core %d start”,但实际上并没有输出这个内容,还是只输出了DNUM==0里的内容,如下:

         

        我想请问下为何我自己加在else里的打印信息没有被输出?如果8个核都启动了应该会输出啊?

        还有这个_c_int00这个入口地址指向哪儿啊?是从main函数开始执行吗?

        谢谢!