Changeset fa7450c in mainline


Ignore:
Timestamp:
2005-12-20T17:44:10Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
113b98b
Parents:
d6e8529
Message:

Fix page_insert_mapping().
Some architectures (e.g. ia32) need to have the lower-numbered PTL's flagged as PAGE_WRITE in order to prevent overriding protection bits of leaf TTE's.

Location:
generic/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • generic/src/main/kinit.c

    rd6e8529 rfa7450c  
    174174        if (!a)
    175175                panic("vm_area_create: vm_stack\n");
    176         vm_area_map(a, m);     
     176        vm_area_map(a, m);
    177177       
    178178        thread_ready(t);
  • generic/src/mm/page.c

    rd6e8529 rfa7450c  
    8383                memsetb(newpt, PAGE_SIZE, 0);
    8484                SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt));
    85                 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
     85                SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE);
    8686        }
    8787
     
    9292                memsetb(newpt, PAGE_SIZE, 0);
    9393                SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt));
    94                 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
     94                SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE);
    9595        }
    9696
     
    101101                memsetb(newpt, PAGE_SIZE, 0);
    102102                SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt));
    103                 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
     103                SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE | PAGE_WRITE);
    104104        }
    105105
Note: See TracChangeset for help on using the changeset viewer.