Changeset 626 for trunk/kernel/kern


Ignore:
Timestamp:
Apr 29, 2019, 7:25:09 PM (6 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.

Location:
trunk/kernel/kern
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/do_syscall.c

    r610 r626  
    22 * do_syscall.c - architecture independant entry-point for system calls.
    33 *
    4  * Author    Alain Greiner (2016,2017,2018)
     4 * Author    Alain Greiner (2016,2017,2018, 2019)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    106106
    107107    sys_exit,               // 50
     108    sys_sync,               // 51
     109    sys_fsync,              // 52
    108110};
    109111
     
    169171
    170172    case SYS_EXIT:                         return "EXIT";             // 50
     173    case SYS_SYNC:                         return "SYNC";             // 51
     174    case SYS_FSYNC:                        return "FSYNc";            // 52
    171175
    172176    default:                               return "undefined";
  • trunk/kernel/kern/kernel_init.c

    r624 r626  
    898898}
    899899
     900
     901
     902
     903
     904/////////////////////////////////
     905// kleenex debug function
     906/////////////////////////////////
     907void display_fat( uint32_t step )
     908{
     909    fatfs_ctx_t * fatfs_ctx = fs_context[FS_TYPE_FATFS].extend;
     910    if( fatfs_ctx != NULL )
     911    {
     912        printk("\n[%s] step %d at cycle %d\n", __FUNCTION__, step, (uint32_t)hal_get_cycles() );
     913        xptr_t     mapper_xp = fatfs_ctx->fat_mapper_xp;
     914        mapper_display_page( mapper_xp , 0 , 128 );
     915    }
     916    else
     917    {
     918        printk("\n[%s] step %d : fatfs context not initialized\n", __FUNCTION__, step );
     919    }
     920}
     921
     922
     923
     924
     925
    900926///////////////////////////////////////////////////////////////////////////////////////////
    901927// This function is the entry point for the kernel initialisation.
     
    11431169        if( CONFIG_VFS_ROOT_IS_FATFS )
    11441170        {
    1145             // 1. allocate memory for FATFS context extension in cluster 0
     1171            // 1. allocate memory for FATFS context in cluster 0
    11461172            fatfs_ctx_t * fatfs_ctx = fatfs_ctx_alloc();
    11471173
     
    11551181            // 2. access boot device to initialize FATFS context
    11561182            fatfs_ctx_init( fatfs_ctx );
    1157  
     1183
    11581184            // 3. get various informations from FATFS context
    11591185            uint32_t root_dir_cluster = fatfs_ctx->root_dir_cluster;
  • trunk/kernel/kern/process.c

    r625 r626  
    14471447#if( DEBUG_PROCESS_MAKE_FORK & 1 )
    14481448cycle = (uint32_t)hal_get_cycles();
    1449 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1449if( DEBUG_PROCESS_MAKE_FORK < cycle )
    14501450printk("\n[%s] thread[%x,%x] / child takes TXT ownership / cycle %d\n",
    14511451__FUNCTION__ , pid, trdid, cycle );
     
    15561556#if DEBUG_PROCESS_MAKE_EXEC
    15571557uint32_t cycle = (uint32_t)hal_get_cycles();
    1558 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1558if( local_cxy == 0x11 )
    15591559printk("\n[%s] thread[%x,%x] enters for %s / cycle %d\n",
    15601560__FUNCTION__, pid, thread->trdid, path, cycle );
     
    15791579#if (DEBUG_PROCESS_MAKE_EXEC & 1)
    15801580cycle = (uint32_t)hal_get_cycles();
    1581 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1581if( local_cxy == 0x11 )
    15821582printk("\n[%s] thread[%x,%x] opened file <%s> / cycle %d\n",
    15831583__FUNCTION__, pid, thread->trdid, path, cycle );
     
    15891589#if (DEBUG_PROCESS_MAKE_EXEC & 1)
    15901590cycle = (uint32_t)hal_get_cycles();
    1591 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1591if( local_cxy == 0x11 )
    15921592printk("\n[%s] thread[%x,%x] deleted existing threads / cycle %d\n",
    15931593__FUNCTION__, pid, thread->trdid, cycle );
     
    15991599#if( DEBUG_PROCESS_MAKE_EXEC & 1 )
    16001600cycle = (uint32_t)hal_get_cycles();
    1601 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1601if( local_cxy == 0x11 )
    16021602printk("\n[%s] thread[%x,%x] completed VMM reset / cycle %d\n",
    16031603__FUNCTION__, pid, thread->trdid, cycle );
     
    16161616#if( DEBUG_PROCESS_MAKE_EXEC & 1 )
    16171617cycle = (uint32_t)hal_get_cycles();
    1618 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1618if( local_cxy == 0x11 )
    16191619printk("\n[%s] thread[%x,%x] registered args/envs vsegs / cycle %d\n",
    16201620__FUNCTION__, pid, thread->trdid, cycle );
     
    16341634#if( DEBUG_PROCESS_MAKE_EXEC & 1 )
    16351635cycle = (uint32_t)hal_get_cycles();
    1636 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
     1636if( local_cxy == 0x11 )
    16371637printk("\n[%s] thread[%x,%x] registered code/data vsegs / cycle %d\n",
    16381638__FUNCTION__, pid, thread->trdid, cycle );
Note: See TracChangeset for help on using the changeset viewer.