Changeset 545 for trunk


Ignore:
Timestamp:
Sep 21, 2018, 10:23:06 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Fix memory access at 0x10 and 0x14

chdev_dir() tried to read chdev_dir.iob to display information
about the IOB, but on TSAR LETI there's no IOB and this pointer
is NULL.

File:
1 edited

Legend:

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

    r527 r545  
    456456
    457457    // IOB
    458     cxy  = GET_CXY( chdev_dir.iob );
    459     ptr  = GET_PTR( chdev_dir.iob );
    460     base = (uint32_t)hal_remote_lwd( XPTR( cxy , &ptr->base ) );
    461     nolock_printk("  - iob       : cxy = %X / ptr = %X / base = %X\n", cxy, ptr, base);
     458    if (chdev_dir.iob != NULL )
     459    {
     460        cxy  = GET_CXY( chdev_dir.iob );
     461        ptr  = GET_PTR( chdev_dir.iob );
     462        base = (uint32_t)hal_remote_lwd( XPTR( cxy , &ptr->base ) );
     463        nolock_printk("  - iob       : cxy = %X / ptr = %X / base = %X\n", cxy, ptr, base);
     464    }
    462465
    463466    // PIC
Note: See TracChangeset for help on using the changeset viewer.