Changeset 815 for soft


Ignore:
Timestamp:
Apr 1, 2016, 2:23:41 PM (9 years ago)
Author:
bouyer
Message:

Deal with x_width/y_width different from 4.

Location:
soft/giet_vm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_common/pmem.c

    r794 r815  
    7474    p->nxt_bppi = bpi + n;
    7575
    76     return (x << 24) + (y << 20) + (bpi << 9);
     76    return (x << (20 + Y_WIDTH)) + (y << 20) + (bpi << 9);
    7777
    7878} // end get_big_ppn()
     
    115115    p->nxt_sppi = p->nxt_sppi + n;
    116116
    117     return (x << 24) + (y << 20) + (bpi << 9) + spi;
     117    return (x << (20 + Y_WIDTH)) + (y << 20) + (bpi << 9) + spi;
    118118
    119119} // end _get_small_ppn()
  • soft/giet_vm/giet_kernel/sys_handler.c

    r790 r815  
    39813981    unsigned long long paddr = _v2p_translate( (unsigned int)ptr , &flags );
    39823982   
    3983     *x = (paddr>>36) & 0xF;
    3984     *y = (paddr>>32) & 0xF;
     3983    *x = (paddr>> (32 + Y_WIDTH)) & ((1 << X_WIDTH) - 1);
     3984    *y = (paddr>>32) & ((1 << Y_WIDTH) - 1);
    39853985
    39863986    return SYSCALL_OK;
Note: See TracChangeset for help on using the changeset viewer.