lib/aos/paging.c
errval_t paging_init(void)
{
    // DBG(VERBOSE, "paging_init\n");
 
    // TODO (M4): initialize self-paging handler
    // TIP: use thread_set_exception_handler() to setup a page fault handler
    // TIP: Think about the fact that later on, you'll have to make sure that
    // you can handle page faults in any thread of a domain.
 
    set_current_paging_state(&current);
 
    // According to the book, the L1 page table is at the following address.
    struct capref l1_pagetable = {
        .cnode = cnode_page,
        .slot = 0,
    };
 
    paging_init_state(&current, (1<<25), l1_pagetable, get_default_slot_allocator());
    return SYS_ERR_OK;
}
/**
 * \brief This function initializes the paging for this domain
 * It is called once before main.
 */
\brief This function initializes the paging for this domain
It is called once before main.
\ brief This function initializes the paging for this domain It is called once before main .
errval_t paging_init(void)
{
    set_current_paging_state(&current);
    struct capref l1_pagetable = {
        .cnode = cnode_page,
        .slot = 0,
    };
    paging_init_state(&current, (1<<25), l1_pagetable, get_default_slot_allocator());
    return SYS_ERR_OK;
}
errval_t paging_init ( void ) { set_current_paging_state ( & current ) ; struct capref l1_pagetable = { . cnode = cnode_page , . slot = 0 , } ; paging_init_state ( & current , ( 1 << 25 ) , l1_pagetable , get_default_slot_allocator ( ) ) ; return SYS_ERR_OK ; }
\brief This function initializes the paging for this domain
 It is called once before main.
\ brief This function initializes the paging for this domain It is called once before main .
// DBG(VERBOSE, "paging_init\n"); // TODO (M4): initialize self-paging handler // TIP: use thread_set_exception_handler() to setup a page fault handler // TIP: Think about the fact that later on, you'll have to make sure that // you can handle page faults in any thread of a domain. // According to the book, the L1 page table is at the following address.