IDE mount on PENTIUM bsp (VXWorks 6.3) - VxWorks

This is a discussion on IDE mount on PENTIUM bsp (VXWorks 6.3) - VxWorks ; I am attempting to mount an 40 pin IDE FLASH module as a DOS drive using VXWorks 6.3 on a PENTIUM bsp. The flash module contains a single DOS partition and the VXWorks boot partition. The target will boot of ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: IDE mount on PENTIUM bsp (VXWorks 6.3)

  1. IDE mount on PENTIUM bsp (VXWorks 6.3)

    I am attempting to mount an 40 pin IDE FLASH module as a DOS drive
    using VXWorks 6.3 on a PENTIUM bsp.
    The flash module contains a single DOS partition and the VXWorks boot
    partition. The target will boot of the IDE Flash module correctly and
    reads the bootrom.sys from the DOS partition however I am unable to
    read or write to it as a DOS drive.

    I have tried using the following code to mount the drive as DOS.

    device_t xbd;
    DEV_HDR *deviceFound = NULL;
    const char *pNameTail = NULL;
    deviceFound = iosDevFind ("/ata0a",(const char**)&pNameTail);
    if ((pNameTail[0] != 0) && (deviceFound != NULL))
    {
    xbd = ataXbdDevCreate(0,0,0,0,"/ata0a");
    if( !xbd )
    {
    printMsg("ataDriveInitialise: ataXbdDevCreate failed /ata0a\n");
    return;
    }
    else
    {
    printMsg("xbd = %d",(int)xbd);
    }
    if(dosFsDevCreate("/ata0a",xbd,10,NONE) == ERROR)
    {
    printMsg("ataDriveInitialise: dosFsDevCreate Failed\n");
    return;
    }
    printMsg("ataDriveInitialise: ataXbdDevCreate Success\n");
    return;
    }
    else
    {
    printMsg("ataDriveInitialise: Device Not Found\n");
    return;
    }

    Using this method the ataXbdDevCreate routine returns a device_t and
    does not report errors even with ATA_DEBUG defined within ataDrv.h and
    ATA_DEBUG_LEVEL set to 10 in ataDrv.c. However dosFsDevCreate reports
    to following error:-

    dosFsDevCreate("/ata0a/",xbd,10,0)
    0x4dd0d2c (tShell0): dosFsLib.c : ERROR reading the device boot sector
    0x4dd0d2c (tShell0): dosFsLib.c : media not formatted or not present
    0x4dd0d2c (tShell0): dosFsLib.c : error when mounting volume 0x464f754
    0x4dd0d2c (tShell0): dosFsLib.c : Failed to create a dosFs volume

    I have also tried:-

    IMPORT ATA_RESOURCE ataResources[];
    ATA_RESOURCE *pAtaResource = &ataResources[0];

    if (ataDrv (0, pAtaResource->drives, pAtaResource->intVector,
    pAtaResource->intLevel, pAtaResource->configType,
    pAtaResource->semTimeout, pAtaResource->wdgTimeout) == ERROR)
    {
    printErr ("Could not initialize ATA device.\n");
    return;
    }
    printf ("Attaching to ATA device... ");
    if (usrAtaConfig (0, 0, "/ata0a") == ERROR)
    {
    printErr ("usrAtaConfig failed.\n");
    return;
    }

    This method does not report any errors however I am still not able to
    read or write to the DOS drive.

    IS there something I am missing? Or has anyone else had problems with
    this operation?


  2. Re: IDE mount on PENTIUM bsp (VXWorks 6.3)

    Sorry the section "The flash module contains a single DOS partition
    and the VXWorks boot
    partition" is confusing. I meant that there is a single DOS partiction
    containing the bootline.sys and then the boot sector not two DOS
    partitions.


  3. Re: IDE mount on PENTIUM bsp (VXWorks 6.3)

    Hi,
    have you solved this problem by now?
    I have the same problem mounting an ATA drive with vx(does't)Works 6.2. A WindRiver guy stopped by and could not help. He wanted to take the hardware with him, to sink into it. But, we did use ATA_DEBUG and debug level of 20 and got debug messages. The WR guy seems to not have paid full attention to the debug messages. The next day, I went through the debug messages and found the following.
    A function ataIndentify (or something similar, I am now writing from home, do not know the exact function name) in atadrv.c actually fails. The device is not identified as ATA and the function ataDrv() simply jumps to the end where it exits with OK (this function is happy as long as a device was found). But, not identifying the device as ATA skips the steps of getting the ATA_PARAMS etc. which leads to the drive being mounted as rawFs. The same damn vxworks 6.2 succeeds mounting an ATA drive on an older hardware of ours. The identify function tries to write some registers and read it back to know that the device is there. This is what fails in our newer hardware.
    Monday I am going to skip this identify function and see what happens.
    cu

  4. Re: IDE mount on PENTIUM bsp (VXWorks 6.3): SOLUTION !!!

    Hi,
    today, our WR guy fixed the problem. He sent me an image of vxWorks 6.4 which properly initializes the harddrive.

    The difference between 6.2/6.3 and 6.4:
    6.4 checks to see if the controller is DMA capable. 6.2 and 6.3 assume the DMA capability.
    So, if you can, please, update to latest vxWorks or contact WR for a patch.

    And if you had already solved the problem, hope some one else, having this rare problem (since vxWorks is hardly used in conjuction with a HD) will find this solution fast enough.
    cheers.

  5. Re: IDE mount on PENTIUM bsp (VXWorks 6.3)

    Hi ,
    I am facing problem while Formatting my virtual disk. Just wanted to know if its the same problem as you people faced? and what do we do ?


    1) First i create a virtual device using pBlkDevRoot =
    virtualDiskCreate();

    2)Since we can use dosFsDevInit()to initialise DOS filesystem in 6.3 i
    use a XBD wrapper utility which converts BLK_DEV device to XBD type
    and by default instantiates rawFS on it.

    xbdBlkDevCreate(pBlkDevRoot, "/");
    value = 1 = 0x1
    or

    xbdBlkDevCreateSync(pBlkDevRoot,"/");
    Instantiating / as rawFs, device = 0x20001

    value = 65537 = 0x10001

    3) then try to format using
    c)dosfsDiskFormat("/vroot");
    Formatting /vroot:0 for DOSFS
    Instantiating /vroot:0 as rawFs, device = 0x10001
    Formatting...Retrieved old volume params with %38 confidence:
    Volume Parameters: FAT type: FAT32, sectors per cluster 0
    0 FAT copies, 0 clusters, 0 sectors per FAT
    Sectors reserved 0, hidden 0, FAT sectors 0
    Root dir entries 0, sysId (null) , serial number 56fb0000
    Label:" " ...
    Disk with 83968 sectors of 512 bytes will be formatted with:
    Volume Parameters: FAT type: FAT32, sectors per cluster 8
    2 FAT copies, 536870891 clusters, 82 sectors per FAT
    Sectors reserved 1, hidden 83968, FAT sectors 164
    Root dir entries 0, sysId VXDOS16 , serial number 56fb0000
    Label:" " ...
    dosFsVolFormat: bad format parameters, errno = 0x16
    Failed.
    value = -1 = 0xffffffff
    ->
    -> printErrno 0x16
    errno = 0x16 : S_errno_EINVAL.
    value = 0 = 0x0

    d) I tried using -dofFsDevCreate() before formatting but it returns
    unknown volume format error

    > dosFsDevCreate("/",xbd_root,10,0x00000002 | 0x00000100 | 0x00000200 )

    0x6a6c4c58 (tShell0): dosFsLib.c : Malformed boot sector. Offset 0,
    value 0.
    0x6a6c4c58 (tShell0): dosFsLib.c : error when mounting volume
    0x6a6c4f30
    0x6a6c4c58 (tShell0): dosFsLib.c : Failed to create a dosFs volume
    value = -1 = 0xffffffff
    ->

    Any pointers would be of great help..

    Thanks.

  6. Re: IDE mount on PENTIUM bsp (VXWorks 6.3)

    I am trying to format my xbd device in vxworks 6.3. Wnated to knw if the problem is same as you guys faced..I am struggling from past 1 week to identify the cause
    procedure i follow befor that:

    1) First i create a virtual device using pBlkDevRoot =
    virtualDiskCreate();

    2)Since we cant use dosFsDevInit()to initialise DOS filesystem in 6.3 i
    use a XBD wrapper utility which converts BLK_DEV device to XBD type
    and by default instantiates rawFS on it.

    xbd_root=xbdBlkDevCreate(pBlkDevRoot, "/vroot");
    value = 1 = 0x1
    or

    xbdBlkDevCreateSync(pBlkDevRoot,"/vroot");
    Instantiating / as rawFs, device = 0x20001

    value = 65537 = 0x10001

    3) then try to format using
    c)dosfsDiskFormat("/vroot");
    Formatting /vroot:0 for DOSFS
    Instantiating /vroot:0 as rawFs, device = 0x10001
    Formatting...Retrieved old volume params with %38 confidence:
    Volume Parameters: FAT type: FAT32, sectors per cluster 0
    0 FAT copies, 0 clusters, 0 sectors per FAT
    Sectors reserved 0, hidden 0, FAT sectors 0
    Root dir entries 0, sysId (null) , serial number 56fb0000
    Label:" " ...
    Disk with 83968 sectors of 512 bytes will be formatted with:
    Volume Parameters: FAT type: FAT32, sectors per cluster 8
    2 FAT copies, 536870891 clusters, 82 sectors per FAT
    Sectors reserved 1, hidden 83968, FAT sectors 164
    Root dir entries 0, sysId VXDOS16 , serial number 56fb0000
    Label:" " ...
    dosFsVolFormat: bad format parameters, errno = 0x16
    Failed.
    value = -1 = 0xffffffff
    ->
    -> printErrno 0x16
    errno = 0x16 : S_errno_EINVAL.
    value = 0 = 0x0

    d) I tried using -dofFsDevCreate() before formatting but it returns
    unknown volume format error

    > dosFsDevCreate("/vroot",xbd_root,10,0x00000002 | 0x00000100 | 0x00000200 )

    0x6a6c4c58 (tShell0): dosFsLib.c : Malformed boot sector. Offset 0,
    value 0.
    0x6a6c4c58 (tShell0): dosFsLib.c : error when mounting volume
    0x6a6c4f30
    0x6a6c4c58 (tShell0): dosFsLib.c : Failed to create a dosFs volume
    value = -1 = 0xffffffff
    ->
    -> errno
    errno = 0x680ddc70: value = 3670044 = 0x38001c

    any idea what is the problem here? any input would be of greta help..

+ Reply to Thread