Loading bareboard image to SC3900 cores of B4860 from PA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loading bareboard image to SC3900 cores of B4860 from PA

1,111 Views
chrisharding
Contributor I

Hi,

I'm trying to load a simple image to the SC3900 from the PA. The example in the SDK document is also setting up IPC, and we just want to do the basics to get started.

Anyone had any success with this and give me any pointers?

0 Kudos
3 Replies

950 Views
michelle
NXP Pro Support
NXP Pro Support

OK

The DSP boot loader is not really meant to be used this way, however, if the intent is a no SDOS bareboard application (why?) then procderually you can load your DSP binary image in the same way with the PA side application, but in your DSP code, you will need to write a value of 0xfe to hardware semaphore 0 so that the PA side application sees the DSP code is executing as expected.  This is done with our IPC code on the DSP side, but can certainly be replicated manually outside of the SDOS drivers....  I'd say have a look at the SDOS source for reference on how to/where/addressing.

BR,

Michelle

0 Kudos

950 Views
chrisharding
Contributor I

Thank you for your response.

My apologises I was mistaken and it is an SDOS application that simply blinks the available LEDs on the B4860QDS.

Trying to follow the instructions from the SDK document for dsp_bt

In Uboot - Appended to bootargs:  default_hugepagesz=256m hugepagesz=256m hugepages=1

The next command (setenv bootm_size 0x100000000) seems to cause the B4860 to crash when doing the insmod on hetmgr

    Unable to handle kernel paging request for data at address 0x00000000
    Faulting instruction address: 0xc000000000074904
    Oops: Kernel access of bad area, sig: 11 [#1]

So instead I am using the alternate suggestion of setenv bootm_size 0x70000000

I'm then adding the kernel modules,

insmod /usr/driver/IPC/single_rat/hetmgr.ko
insmod /usr/driver/IPC/single_rat/shm.ko
insmod /usr/driver/IPC/single_rat/l1d.ko

cat /proc/devices | grep 'het_mgr'
cat /proc/devices | grep 'shm'
cat /proc/devices | grep 'l1d'

mknod /dev/fsl_shm c 248 0
mknod /dev/het_mgr c 249 0
mknod /dev/fsl_l1d c 247 0

and setting shmmax as well

echo 10000000 > /proc/sys/kernel/shmmax

Then using SSH, I copy over the application to the B4860, and run it with

cd /ipc
./dsp_bt -h 0 -c 0 -i ~/c0_led_test.bin

and I just get the following:

    ===B4860QDS DSP boot Application (3.1.0) ===
     SYSTEM MAP
    DSP PrivArea: Addr=80000000 Size=7ff00000
    Shared CtrlArea: Addr=fff00000 Size=100000
    DSP Core0 M2: Addr=0 Size=0
    DSP Core1 M2: Addr=0 Size=0
    DSP M3: Addr=c40000000 Size=8000
    PA CCSRBAR: Addr =ffe000000 Size=1000000
   DSP CCSRBAR: Addr =ffe000000 Size=1000000
    shmget: Invalid argument
    error in init_hugetlb frm pre_load_B4

I've tried passsing alternate addresses to hetmgr with insmod

insmod /usr/driver/IPC/single_rat/hetmgr.ko dsp_private_addr=0x20000000 dsp_private_size=0x4FF00000 shared_ctrl_addr=0x6FF00000

but it appears that these are ignored, and I always get the same address ranges printed above.

I've tried running different images, including those in the /ipc folder, and get the same error each time.

Any help would be appreicated

Chris

0 Kudos

950 Views
michelle
NXP Pro Support
NXP Pro Support

Hi

 

OK I don't have time to go and do this on my board at the moment (its Linux is a bit lost), but from my notes on this:

 

Usage
$dsp_bt <PA_SC_Handshake_SEM> <core> <filename> <rel_addr(in decimal)> ...

examples:
DSP boot without PA SC handshake
./dsp_bt 0 0 sc0.bin 2147639296  1 sc1.bin 2147639296  2 sc2.bin 2147639296
 3 sc3.bin 2147639296  4 sc4.bin 2147639296  5 sc5.bin 2147639296

 

DSP boot with PA SC handshake using HW semaphore 1
./dsp_bt 1 0 sc0.bin 2147622912  1 sc1.bin 2147622912  2 sc2.bin 2147622912
 3 sc3.bin 2147622912  4 sc4.bin 2147622912  5 sc5.bin 2147622912

Maybe some definitions for what you are doing first:

 

  •                         mem=880M
    • Sets available system memory to 880 Mbytes, this is to accommodate the DSP memory space being allocated a large amount of system memory
  •                         ramdisk_size=600000
  •                          default_hugepagesz=256m
    • Sets support the default huge page size to 256 MB when creating a hugepage
    • The DSP image to be run will occupy a large block of memory
  •                           hugepagesz=256m
    • Sets the huge page size to 256 MB
  •                           hugepages=1
    • Sets the number of persistent huge pages available to 1
  •                            dsp_private_addr=0x40000000
  •                             dsp_private_size=0x40000000     
  •                             max_num_ipc_channels=64

 

Allow for more huge pages, make sure you have enough memory :smileyhappy:  Worst case, debug the dsp_bt app?  You have the source for all of it :smileyhappy:, it looks like it cannot allocate the memory required.

0 Kudos