Changeset 226 for soft/giet_vm


Ignore:
Timestamp:
Dec 14, 2012, 10:10:12 AM (12 years ago)
Author:
karaoui
Message:

2 modifications:
Better debug info for the tty number used,
Adding the O_TRUNC flag when opening/creating the map.bin.

Location:
soft/giet_vm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/drivers.c

    r225 r226  
    232232//      _tty_error()
    233233////////////////////////////////////////////////////////////////////////////////
    234 void _tty_error( unsigned int task_id )
     234void _tty_error( unsigned int tty_id, unsigned int task_id )
    235235{
    236236    unsigned int proc_id = _procid();
    237237
    238238    _get_lock(&_tty_put_lock);
    239     _puts("\n[GIET ERROR] TTY index too large for task ");
     239    if( tty_id == 0xFFFFFFFF )
     240        _puts("\n[GIET ERROR] no TTY assigned to the task ");
     241    else
     242        _puts("\n[GIET ERROR] TTY index too large for task ");
    240243    _putd( task_id );
    241244    _puts(" on processor ");
     
    263266    if ( tty_id >= NB_TTYS )
    264267    {
    265         _tty_error( task_id );
     268        _tty_error( tty_id , task_id );
    266269        return 0;
    267270    }
     
    299302    if ( tty_id >= NB_TTYS )
    300303    {
    301         _tty_error( task_id );
     304        _tty_error( tty_id, task_id );
    302305        return 0;
    303306    }
  • soft/giet_vm/xml/xml_parser.c

    r222 r226  
    129129unsigned int kernel_init_base    = 0x80090000;  /* system init entry */
    130130
    131 unsigned int boot_code_base      = 0xBFC00000;   /* boot code */
     131unsigned int boot_code_base      = 0xBFC00000;  /* boot code */
    132132unsigned int boot_stack_base     = 0xBFC08000;  /* boot temporary stack */
    133133unsigned int boot_mapping_base   = 0xBFC0C000;  /* mapping_info blob */
     
    19671967
    19681968    //open file
    1969     int fdout = open( file_path, (O_CREAT | O_RDWR), (S_IWUSR | S_IRUSR) );
     1969    int fdout = open( file_path, (O_CREAT | O_RDWR | O_TRUNC), (S_IWUSR | S_IRUSR) );
    19701970    if ( fdout < 0)
    19711971    {
    19721972        perror("open");
    1973         exit(1);
    1974     }
    1975 
    1976     //reinitialise the file
    1977     if( ftruncate(fdout, 0) )
    1978     {
    1979         perror("truncate");
    19801973        exit(1);
    19811974    }
Note: See TracChangeset for help on using the changeset viewer.