Changeset f9425006 in mainline
- Timestamp:
- 2006-01-13T16:29:20Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 214e89e3
- Parents:
- 20d50a1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/mm/tlb.c
r20d50a1 rf9425006 400 400 page_mask_t mask; 401 401 entry_lo_t lo0, lo1; 402 entry_hi_t hi ;402 entry_hi_t hi, hi_save; 403 403 int i; 404 405 hi_save.value = cp0_entry_hi_read(); 404 406 405 407 printf("TLB:\n"); … … 418 420 lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn); 419 421 } 422 423 cp0_entry_hi_write(hi_save.value); 420 424 } 421 425 … … 425 429 ipl_t ipl; 426 430 entry_lo_t lo0, lo1; 431 entry_hi_t hi_save; 427 432 int i; 428 433 434 hi_save.value = cp0_entry_hi_read(); 429 435 ipl = interrupts_disable(); 430 436 … … 446 452 447 453 interrupts_restore(ipl); 454 cp0_entry_hi_write(hi_save.value); 448 455 } 449 456 … … 456 463 ipl_t ipl; 457 464 entry_lo_t lo0, lo1; 458 entry_hi_t hi ;465 entry_hi_t hi, hi_save; 459 466 int i; 460 467 461 468 ASSERT(asid != ASID_INVALID); 462 469 470 hi_save.value = cp0_entry_hi_read(); 463 471 ipl = interrupts_disable(); 464 472 … … 484 492 485 493 interrupts_restore(ipl); 494 cp0_entry_hi_write(hi_save.value); 486 495 } 487 496 … … 495 504 ipl_t ipl; 496 505 entry_lo_t lo0, lo1; 497 entry_hi_t hi ;506 entry_hi_t hi, hi_save; 498 507 tlb_index_t index; 499 508 500 509 ASSERT(asid != ASID_INVALID); 501 510 511 hi_save.value = cp0_entry_hi_read(); 502 512 ipl = interrupts_disable(); 503 513 … … 526 536 527 537 interrupts_restore(ipl); 528 } 538 cp0_entry_hi_write(hi_save.value); 539 } -
generic/src/mm/as.c
r20d50a1 rf9425006 59 59 60 60 /* 61 * Here we assume that PFN (Physical Frame Number s) space61 * Here we assume that PFN (Physical Frame Number) space 62 62 * is smaller than the width of index_t. UNALLOCATED_PFN 63 63 * can be then used to mark mappings wich were not 64 * allocated a physical frame.64 * yet allocated a physical frame. 65 65 */ 66 66 #define UNALLOCATED_PFN ((index_t) -1) … … 142 142 /* 143 143 * Frames will be allocated on-demand by 144 * as_page_fault(). 144 * as_page_fault() or preloaded by 145 * as_area_load_mapping(). 145 146 */ 146 147 a->mapping[i] = UNALLOCATED_PFN; … … 160 161 spinlock_unlock(&as->lock); 161 162 interrupts_restore(ipl); 162 163 163 164 return a; 164 165 } … … 181 182 for (i = 0; i < a->size; i++) { 182 183 ASSERT(a->mapping[i] == UNALLOCATED_PFN); 184 ASSERT(pfn[i] != UNALLOCATED_PFN); 183 185 a->mapping[i] = pfn[i]; 184 186 } … … 195 197 * @param page Faulting page. 196 198 * 197 * @return 0 on page fault, 1 if address space operation199 * @return 0 on page fault, 1 on success. 198 200 */ 199 201 int as_page_fault(__address page) … … 251 253 memsetb(frame, FRAME_SIZE, 0); 252 254 area->mapping[vpn] = frame / FRAME_SIZE; 255 ASSERT(area->mapping[vpn] != UNALLOCATED_PFN); 253 256 } else { 254 257 frame = area->mapping[vpn] * FRAME_SIZE;
Note:
See TracChangeset
for help on using the changeset viewer.