Ignore:
Timestamp:
Aug 29, 2017, 12:03:37 PM (4 years ago)
Author:
alain
Message:

This version executed successfully the user "init" process on a mono-processor TSAR architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.c

    r367 r406  
    143143    error_t       error;
    144144
    145     mapper_dmsg("\n[INFO] %s : enters for page %d in mapper %x\n",
     145    mapper_dmsg("\n[DMSG] %s : enters for page %d / mapper %x\n",
    146146                __FUNCTION__ , index , mapper );
    147147
     
    170170        if ( page == NULL )   // missing page => create it and load it from file system
    171171        {
    172             mapper_dmsg("\n[INFO] %s : missing page => load from device\n", __FUNCTION__ );
     172            mapper_dmsg("\n[DMSG] %s : missing page => load from device\n", __FUNCTION__ );
    173173
    174174            // allocate one page from PPM
     
    212212            }
    213213
    214             // update the mapper and index fields in page descriptor
    215             // required by the vfs_move_page_to_mapper()
    216             page->mapper = mapper;
    217             page->index  = index;
    218 
    219214            // launch I/O operation to load page from file system
    220215            error = vfs_mapper_move_page( page,
     
    259254    }
    260255
    261     mapper_dmsg("\n[INFO] %s : exit for page %d in mapper %x / page_desc = %x\n",
     256    mapper_dmsg("\n[DMSG] %s : exit for page %d / mapper %x / page_desc = %x\n",
    262257                __FUNCTION__ , index , mapper , page );
    263258
     
    315310    uint8_t  * buf_ptr;        // current buffer  address
    316311
    317     mapper_dmsg("\n[INFO] %s : enters / to_buf = %d / buffer = %x\n",
     312    mapper_dmsg("\n[DMSG] %s : enters / to_buf = %d / buffer = %x\n",
    318313                __FUNCTION__ , to_buffer , buffer );
    319314
     
    341336        else                       page_count = CONFIG_PPM_PAGE_SIZE;
    342337
    343         mapper_dmsg("\n[INFO] %s : index = %d / offset = %d / count = %d\n",
     338        mapper_dmsg("\n[DMSG] %s : index = %d / offset = %d / count = %d\n",
    344339                    __FUNCTION__ , index , page_offset , page_count );
    345340
     
    356351        buf_ptr = (uint8_t *)buffer + done;
    357352
    358         mapper_dmsg("\n[INFO] %s : index = %d / buf_ptr = %x / map_ptr = %x\n",
     353        mapper_dmsg("\n[DMSG] %s : index = %d / buf_ptr = %x / map_ptr = %x\n",
    359354                    __FUNCTION__ , index , buf_ptr , map_ptr );
    360355
     
    373368    }
    374369
    375     mapper_dmsg("\n[INFO] %s : exit for buffer %x\n",
     370    mapper_dmsg("\n[DMSG] %s : exit for buffer %x\n",
    376371                __FUNCTION__, buffer );
    377372
     
    398393    cxy_t      dst_cxy;        // destination cluster
    399394
    400     mapper_dmsg("\n[INFO] %s : enters / to_buf = %d / buffer = %l / size = %x / cycle %d\n",
    401                 __FUNCTION__ , to_buffer , buffer_xp , size , hal_time_stamp() );
     395    // get buffer cluster and local pointer
     396    cxy_t     buffer_cxy = GET_CXY( buffer_xp );
     397    uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp );
     398
     399    mapper_dmsg("\n[DMSG] %s : to_buf = %d / buf_cxy = %x / buf_ptr = %x / size = %x\n",
     400    __FUNCTION__ , to_buffer , buffer_cxy , buffer_ptr , size );
    402401
    403402    // compute offsets of first and last bytes in file
     
    409408    uint32_t last  = max_byte >> CONFIG_PPM_PAGE_SHIFT;
    410409
    411     // get buffer cluster and local pointer
    412     cxy_t     buffer_cxy = GET_CXY( buffer_xp );
    413     uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp );
     410    mapper_dmsg("\n[DMSG] %s : first_page = %d / last_page = %d\n",
     411    __FUNCTION__ , first , last );
    414412
    415413    // compute source and destination clusters
     
    440438        else                       page_count = CONFIG_PPM_PAGE_SIZE;
    441439
    442         mapper_dmsg("\n[INFO] %s : page_index = %d / offset = %d / count = %d\n",
     440        mapper_dmsg("\n[DMSG] %s : page_index = %d / offset = %d / bytes = %d\n",
    443441                    __FUNCTION__ , index , page_offset , page_count );
    444442
     
    466464        }
    467465
    468         mapper_dmsg("\n[INFO] %s : index = %d\n", __FUNCTION__ , index );
    469 
    470466        // move fragment
    471467        hal_remote_memcpy( XPTR( dst_cxy , dst_ptr ), XPTR( src_cxy , src_ptr ), page_count );
     
    474470    }
    475471
    476     mapper_dmsg("\n[INFO] %s : exit for buffer %l / size = %x / cycle %d\n",
    477                 __FUNCTION__ , buffer_xp , size , hal_time_stamp() );
     472    mapper_dmsg("\n[DMSG] %s : exit / buf_cxy = %x / buf_ptr = %x / size = %x\n",
     473    __FUNCTION__ , buffer_cxy , buffer_ptr , size );
    478474
    479475    return 0;
    480476
    481 }  // end mapper_move_kernel_buffer()
    482 
     477}  // end mapper_move_kernel()
     478
Note: See TracChangeset for help on using the changeset viewer.