Ignore:
Timestamp:
Aug 3, 2017, 10:15:18 AM (7 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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.