Changeset 315 for trunk/kernel/syscalls


Ignore:
Timestamp:
Aug 3, 2017, 10:15:18 AM (5 years ago)
Author:
alain
Message:

Redefine the fuctions ppm_base2page() / ppm_page2base() / ppm_page2ppn() / ppm_ppn2page() / ppm_base2ppn() / ppm_ppn2base(),
to use explicitely extended pointers.

Location:
trunk/kernel/syscalls
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_exec.c

    r302 r315  
    8585    kmem_req_t   req;         // kmem request
    8686    page_t     * page;        // page descriptor
     87    xptr_t       base_xp;     // extended pointer on page base
    8788    uint32_t     order;       // ln2( number of pages to store strings )
    8889    char      ** k_pointers;  // base of kernel array of pointers
     
    103104    if( page == NULL ) return ENOMEM;
    104105
    105     k_pointers = ppm_page2vaddr( page );
     106    base_xp = ppm_page2base( XPTR( local_cxy , page ) );
     107    k_pointers = (char **)GET_PTR( base_xp );
    106108
    107109    // allocate several physical pages to store the strings themselve
     
    111113    if( page == NULL ) return ENOMEM;
    112114
    113     k_buf_base = ppm_page2vaddr( page );
     115    base_xp = ppm_page2base( XPTR( local_cxy , page ) );
     116    k_buf_base = (char *)GET_PTR( base_xp );
    114117
    115118    // copy the array of pointers to kernel buffer
  • trunk/kernel/syscalls/sys_write.c

    r313 r315  
    9393    error = vfs_user_move( false,               // from buffer
    9494                           file_xp,
    95                            kbuf ,
    96                            nbytes );
     95                           buf ,
     96                           count );
    9797
    9898    if( error )
Note: See TracChangeset for help on using the changeset viewer.