Subversion Repositories HelenOS

Rev

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

Rev 3392 Rev 3393
Line 285... Line 285...
285
            panic("unexpected pfrc (%d)\n", pfrc);
285
            panic("unexpected pfrc (%d)\n", pfrc);
286
        }
286
        }
287
    }
287
    }
288
 
288
 
289
    /*
289
    /*
290
     * Fail if the page is not writable.
-
 
291
     */
-
 
292
    if (!pte->w)
-
 
293
        goto fail;
-
 
294
 
-
 
295
    /*
-
 
296
     * Read the faulting TLB entry.
290
     * Read the faulting TLB entry.
297
     */
291
     */
298
    tlbr();
292
    tlbr();
299
 
293
 
300
    /*
294
    /*
Line 400... Line 394...
400
 
394
 
401
    /*
395
    /*
402
     * Check if the mapping exists in page tables.
396
     * Check if the mapping exists in page tables.
403
     */
397
     */
404
    pte = page_mapping_find(AS, badvaddr);
398
    pte = page_mapping_find(AS, badvaddr);
405
    if (pte && pte->p) {
399
    if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) {
406
        /*
400
        /*
407
         * Mapping found in page tables.
401
         * Mapping found in page tables.
408
         * Immediately succeed.
402
         * Immediately succeed.
409
         */
403
         */
410
        return pte;
404
        return pte;
Line 423... Line 417...
423
             * The mapping ought to be in place.
417
             * The mapping ought to be in place.
424
             */
418
             */
425
            page_table_lock(AS, true);
419
            page_table_lock(AS, true);
426
            pte = page_mapping_find(AS, badvaddr);
420
            pte = page_mapping_find(AS, badvaddr);
427
            ASSERT(pte && pte->p);
421
            ASSERT(pte && pte->p);
-
 
422
            ASSERT(pte->w || access != PF_ACCESS_WRITE);
428
            return pte;
423
            return pte;
429
            break;
424
            break;
430
        case AS_PF_DEFER:
425
        case AS_PF_DEFER:
431
            page_table_lock(AS, true);
426
            page_table_lock(AS, true);
432
            *pfrc = AS_PF_DEFER;
427
            *pfrc = AS_PF_DEFER;