Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1760
Line 71... Line 71...
71
pte_t *ptl0_create(int flags)
71
pte_t *ptl0_create(int flags)
72
{
72
{
73
    pte_t *src_ptl0, *dst_ptl0;
73
    pte_t *src_ptl0, *dst_ptl0;
74
    ipl_t ipl;
74
    ipl_t ipl;
75
 
75
 
76
    dst_ptl0 = (pte_t *) PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC)));
76
    dst_ptl0 = (pte_t *) frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC);
77
 
77
 
78
    if (flags & FLAG_AS_KERNEL) {
78
    if (flags & FLAG_AS_KERNEL) {
79
        memsetb((__address) dst_ptl0, PAGE_SIZE, 0);
79
        memsetb((__address) dst_ptl0, PAGE_SIZE, 0);
80
    } else {
80
    } else {
81
        __address src, dst;
81
        __address src, dst;
Line 106... Line 106...
106
 *
106
 *
107
 * @param page_table Physical address of PTL0.
107
 * @param page_table Physical address of PTL0.
108
 */
108
 */
109
void ptl0_destroy(pte_t *page_table)
109
void ptl0_destroy(pte_t *page_table)
110
{
110
{
111
    frame_free(ADDR2PFN((__address) page_table));
111
    frame_free((__address)page_table);
112
}
112
}
113
 
113
 
114
/** Lock page tables.
114
/** Lock page tables.
115
 *
115
 *
116
 * Lock only the address space.
116
 * Lock only the address space.