View Issue Details

IDProjectCategoryView StatusLast Update
0000547NetDCU9F3Spublic2011-05-30 16:52
ReporterKiepferAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionV1.15 
Target VersionV1.23Fixed in VersionV1.23 
Summary0000547: F3S partition is not detected correctly in case of high storage memory usage.
DescriptionUnfortunatly this error has dramatic impact. After reaching the critical storage memory usage the board will not boot up correctly and the partition driver will format the complete nand flash.
Forum Link
Found Driver Version
Fixed Driver VersionV2.08

Activities

Kiepfer

2011-04-04 10:54

developer   ~0000354

Problem is caused by the fact that F3S marks the written sectors as reserved, to avoid any filesystem damage by Windows CE. As partitioning is based on logical sector layer, the number of available logical sectors will decrease all the time and the partition driver will mark a partition invalid as soon as the starting sector of a (f3s) partition is higher than the overall logical sector number.
The risk of reaching this critical memory usage even is much higher when two F3S partitions are used.

Kiepfer

2011-04-06 15:18

developer   ~0000363

Last edited: 2011-04-06 15:19

As partitioning in bootloader already is done on logical layer this case should never happen. The problem seems to be in FAL, as two additional blocks are getting substracted from logical block range. When All F3S blocks are really used this probably causes the problem.

See fal.cpp:

BOOL CalculateLogicalRange(PFlashRegion pRegion)
{
    DWORD dwBlockID;
    DWORD dwNumLogicalBlocks = 0;
    
    for (dwBlockID = pRegion->dwStartPhysBlock; dwBlockID < pRegion->dwStartPhysBlock + pRegion->dwNumPhysBlocks; dwBlockID++)
    {
        DWORD dwStatus = FMD.pGetBlockStatus (dwBlockID);

        if (!(dwStatus & (BLOCK_STATUS_RESERVED | BLOCK_STATUS_BAD)))
        {
            dwNumLogicalBlocks++;
        }
    }

    if (dwNumLogicalBlocks <= pRegion->dwCompactBlocks)
    {
        ReportError((TEXT("FLASHDRV.DLL:CalculateLogicalRange() - Invalid number of logical blocks %d\r\n"), dwNumLogicalBlocks));
        return FALSE;
    }

    // Account for compaction blocks
    dwNumLogicalBlocks -= pRegion->dwCompactBlocks; //!! 2 by default
    pRegion->dwNumLogicalBlocks = dwNumLogicalBlocks;
    return TRUE;
}

froelich

2011-05-30 16:52

administrator   ~0000407

Updated F3S to new version V2.08. Added FSPART.DLL to platform.bib.