Changeset 94d211e in mainline for kernel/genarch/src/mm/page_pt.c


Ignore:
Timestamp:
2018-03-21T19:32:48Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
1c7a170
Parents:
973be387
Message:

Change the way page flags work. TODO description

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/mm/page_pt.c

    r973be387 r94d211e  
    5555static void pt_mapping_remove(as_t *, uintptr_t);
    5656static bool pt_mapping_find(as_t *, uintptr_t, bool, pte_t *pte);
    57 static void pt_mapping_update(as_t *, uintptr_t, bool, pte_t *pte);
     57static void pt_mapping_update(as_t *, uintptr_t, bool, const pte_t *pte);
    5858static void pt_mapping_make_global(uintptr_t, size_t);
    5959
     
    9090                SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt));
    9191                SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page),
    92                     PAGE_NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |
    93                     PAGE_WRITE);
     92                    PAGE_NOT_PRESENT | PAGE_NEXT_LEVEL_PT);
    9493                /*
    9594                 * Make sure that a concurrent hardware page table walk or
     
    109108                SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt));
    110109                SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page),
    111                     PAGE_NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |
    112                     PAGE_WRITE);
     110                    PAGE_NOT_PRESENT | PAGE_NEXT_LEVEL_PT);
    113111                /*
    114112                 * Make the new PTL2 visible only after it is fully initialized.
     
    126124                SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt));
    127125                SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page),
    128                     PAGE_NOT_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE |
    129                     PAGE_WRITE);
     126                    PAGE_NOT_PRESENT | PAGE_NEXT_LEVEL_PT);
    130127                /*
    131128                 * Make the new PTL3 visible only after it is fully initialized.
     
    353350 * @param[in] pte  New PTE.
    354351 */
    355 void pt_mapping_update(as_t *as, uintptr_t page, bool nolock, pte_t *pte)
     352void pt_mapping_update(as_t *as, uintptr_t page, bool nolock, const pte_t *pte)
    356353{
    357354        pte_t *t = pt_mapping_find_internal(as, page, nolock);
     
    431428                SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(addr), KA2PA(l1));
    432429                SET_PTL1_FLAGS(ptl0, PTL0_INDEX(addr),
    433                     PAGE_PRESENT | PAGE_USER | PAGE_CACHEABLE |
    434                     PAGE_EXEC | PAGE_WRITE | PAGE_READ);
     430                    PAGE_NEXT_LEVEL_PT);
    435431        }
    436432}
Note: See TracChangeset for help on using the changeset viewer.