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.

some questions about PCIe boot image

Hello,everyone ,

         I use C6678EVM and I have some questions about PCIe boot :

         I want to transport 3 images from linux PC to C6678 and  the code in pciedemo.c as following :

         

/* Load DDR init code into DSP */
		pushData(ddrInitCode, 0, &bootEntryAddr);

		/* Write boot entry address into MAGIC_ADDR */
		writeDSPMemory(0, MAGIC_ADDR, &bootEntryAddr, 4);       

		while (1) {
			readDSPMemory(0, MAGIC_ADDR, buffer, 4);
                   
			if (buffer[0] == 0)  break;
			for (i = 0; i < 1000; i++) i++;
		} 

		/* Load "Hello World" demo into DSP */
		pushData(bootCode, 8, &bootEntryAddr);
                
		/* Write boot entry address into MAGIC_ADDR */
		writeDSPMemory(0, MAGIC_ADDR, &bootEntryAddr, 4);
                while (1) {
			readDSPMemory(0, MAGIC_ADDR, buffer, 4);
                       
			if (buffer[0] == 0)  break;
			for (i = 0; i < 1000; i++) i++;
		} 
               pushData(shm_pcie_8_sobel, 9, &bootEntryAddr);
               writeDSPMemory(0, MAGIC_ADDR, &bootEntryAddr, 4);
               

        the first image is DDRinit,the second is the demo pcieboot _helloworld,the third is sobel processing  code .and I have changed code in  pcieboot _helloworld as following :

          

void main ()
{
    char                    version_msg[] = "\r\n\r\nPCIE Boot Hello World Example Version ";
    char                    boot_msg[80];
    platform_info           pform_info;
    uint32_t                core;
	platform_init_flags     init_flags;
    platform_init_config    init_config;
    volatile uint32_t* lvMarPtr;
    unsigned int L_Value, H_Value;
    lvMarPtr = (volatile uint32_t*)0x08000020;
    H_Value = 0x90000017    ;
    platform_init(&init_flags, &init_config);

	if (DNUM == 0)
    {


		/* Initialize UART */

		platform_uart_init();
	    platform_uart_set_baudrate(BOOT_UART_BAUDRATE);
		/* 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);
        L_Value = 0x8110003f    ;
        *lvMarPtr++ = L_Value;
        *lvMarPtr++ = H_Value;
        /* 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);
        }
        DEVICE_REG32_W(BOOT_MAGIC_ADDR(0), 0);
        start_boot();
        printf("%s\n",version);
    }

     you can see I have add the code to configure MPAX register ,after execute the code ,the logical address 0x90000000 will be mapped to different physical address .after configure MPAX register complete ,I have cleared the value in  magical address and wait my own image "shm_pcie_8_sobel".

     in my own image project ,I have put all sections in DDR in .cmd file,and the DDR:org = 0x90000000, len = 0x10000000,After I insmod pciedemo.ko,the DDRinit can execute successfully and it will jump to  "bootCode" to configure MPAX register .the MPAX register can be configured successful and the address is mapped successful .But it isn't  execute sobel processing  code  "shm_pcie_8_sobel"after configure MPAX register .I have look the magic address of core 0,is 0x9002ba00,which is the entry address of "shm_pcie_8_sobel",but why it is not execute the code ? 

    I have find,if I am not configure MPAX register in bootCode,it will jump to the entry address of "shm_pcie_8_sobel"and execute the code successfully,or if I map the different logical address successful as 0x80000000 not 0x90000000,it also can execute successfully.

   I think it may relate to .cmd I have put all sections in 0x90000000 and MPAX mapped logical address is 0x90000000,is there any way to solve the problem ?  

   If I described what is not clear ,please tell me .

   Regards,

   Simon