Changeset 656 for trunk/kernel/mm/kcm.c


Ignore:
Timestamp:
Dec 6, 2019, 12:07:51 PM (4 years ago)
Author:
alain
Message:

Fix several bugs in the FATFS and in the VFS,
related to the creation of big files requiring
more than 4 Kbytes (one cluster) on device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/kcm.c

    r635 r656  
    509509        {
    510510        // get one 4 Kbytes page from remote PPM
    511         page_t * page = ppm_remote_alloc_pages( kcm_cxy , 0 );
    512 
    513             if( page == NULL )
     511        xptr_t page_xp = ppm_remote_alloc_pages( kcm_cxy , 0 );
     512
     513            if( page_xp == XPTR_NULL )
    514514            {
    515515                    printk("\n[ERROR] in %s : failed to allocate page in cluster %x\n",
     
    519519        }
    520520
    521             // get remote page base address
    522             xptr_t base_xp = ppm_page2base( XPTR( kcm_cxy , page ) );
     521            // get extended pointer on allocated buffer
     522            xptr_t base_xp = ppm_page2base( page_xp );
    523523
    524524        // get local pointer on kcm_page
     
    529529            hal_remote_s64( XPTR( kcm_cxy , &kcm_page->status ) , 0 );
    530530            hal_remote_spt( XPTR( kcm_cxy , &kcm_page->kcm )    , kcm_ptr );
    531             hal_remote_spt( XPTR( kcm_cxy , &kcm_page->page )   , page );
     531            hal_remote_spt( XPTR( kcm_cxy , &kcm_page->page )   , GET_PTR( page_xp ) );
    532532
    533533            // introduce new page in remote KCM active_list
Note: See TracChangeset for help on using the changeset viewer.