sammielove45 / propgcc

Automatically exported from code.google.com/p/propgcc
1 stars 1 forks source link

Propeller-load: -z and -l eat a lock #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Compile the attached file as usual (propeller-elf-gcc -m<model> tst.c -o 
tst.elf
2. Run tst.elf on any board that supports XMMC and SD (e.g. a C3), using 
propeller-load -b <board> -r -t tst.elf
3. Do this for models lmm and xmmc.  In xmmc mode, run these additional tests:

propeller-load -b <board> -r -t -z tst.elf
propeller-load -b <board> -r -t -l tst.elf

What is the expected output? What do you see instead?

In LMM mode, there should be 7 cogs and 7 locks free.  In XMMC mode, there 
should be 6 cogs and 7 locks free.  However, in both the -z and the -l cases, 
there are only 6 locks free.

Additional information:

I believe the misplaced lock is the in the LMM kernel's lock for the C runtime 
of the sd_loader.c or sd_cache_loader.c trampoline programs - nothing frees the 
lock before handing over control to vm_start.s.

Original issue reported on code.google.com by tjstefan...@charter.net on 2 Apr 2012 at 2:03

Attachments: