Ignore:
Timestamp:
Apr 29, 2019, 7:25:09 PM (5 years ago)
Author:
alain
Message:

This version has been tested on the sort multithreaded application
for TSAR_IOB architectures ranging from 1 to 8 clusters.
It fixes three bigs bugs:
1) the dev_ioc device API has been modified: the dev_ioc_sync_read()
and dev_ioc_sync_write() function use now extended pointers on the
kernel buffer to access a mapper stored in any cluster.
2) the hal_uspace API has been modified: the hal_copy_to_uspace()
and hal_copy_from_uspace() functions use now a (cxy,ptr) couple
to identify the target buffer (equivalent to an extended pointer.
3) an implementation bug has been fixed in the assembly code contained
in the hal_copy_to_uspace() and hal_copy_from_uspace() functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_display.c

    r625 r626  
    5656    else if( type == DISPLAY_MAPPER            ) return "MAPPER";
    5757    else if( type == DISPLAY_BARRIER           ) return "BARRIER";
     58    else if( type == DISPLAY_FAT               ) return "FAT";
    5859    else                                         return "undefined";
    5960}
     
    436437            break;
    437438        }
     439        /////////////////
     440        case DISPLAY_FAT:
     441        {
     442            uint32_t  entries = (uint32_t)arg1;
     443
     444            if( entries > 4096 )
     445                {
     446
     447#if DEBUG_SYSCALLS_ERROR
     448printk("\n[ERROR] in %s for FAT : nb_entries larger than 4096\n",
     449__FUNCTION__ );
     450#endif
     451                        this->errno = EINVAL;
     452                        return -1;
     453                }
     454
     455            if( entries == 0 )  // display fat context in cluster cxy
     456            {
     457                uint32_t  cxy = (uint32_t)arg0;
     458
     459                if( cluster_is_undefined( cxy ) )
     460                {
     461
     462#if DEBUG_SYSCALLS_ERROR
     463printk("\n[ERROR] in %s for FAT : illegal cxy argument %x\n",
     464__FUNCTION__ , cxy );
     465#endif
     466                     this->errno = EINVAL;
     467                     return -1;
     468                }
     469
     470                fatfs_display_ctx( cxy );
     471            }
     472            else                  // display nb_entries in page
     473            {                       
     474                uint32_t page = (uint32_t)arg0;
     475
     476                fatfs_display_fat( page , entries );
     477            }
     478
     479            break;
     480        }
    438481        ////////
    439482        default:
Note: See TracChangeset for help on using the changeset viewer.