|
SATA driver on the P1013. xpt_alloc / xpt_free.
|
08/16/2014 11:06 PM
post111462
|
SATA driver on the P1013. xpt_alloc / xpt_free.
I'm bringing up a custom P1013 board and testing out the SATA interface. P1013/P1022 BSPs don't have a SATA driver, but
the P1010 does. So I grab that, and build it under my bsp. Everything builds fine and it runs, sort of.
P1010 bsp has libcam but not cam-disk.
My qnx650 toolchain has libcam and cam-disk.so, but not the xpt_alloc function that the driver uses.
It looks like xpt_alloc allocates DMAable, non-cacheable contiguous memory, and substituting something like mmap this
doesn't work - the driver hangs and throws errors.
mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_PRIVATE | MAP_ANON | MAP_PHYS, NOFD, 0);
After 10 minutes or so, it eventually succeeds.
If I use the libcam that came with the P1010 driver, it identifies the drive quickly. But then I get a version mismatch
against my cam-disk.so and it never creates /dev/hd0.
Can someone point me to the source code for xpt_alloc() / xpt_free()? I can't seem to find it. Is libcam and cam-disk
source available?
Header is at bsp-freescale-p1010-rdb.6.5.0-1.2.2/src/hardware/devb/include/xpt.h
QNX 6.5.0
P1022 bsp
|
|
|