Changeset 433 for soft/giet_vm/giet_boot
- Timestamp:
- Oct 12, 2014, 6:53:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_boot/boot.c
r427 r433 568 568 { 569 569 // allocate contiguous big physical pages 570 ppn = _get_big_ppn( palloc, npages ); 570 ppn = _get_big_ppn( palloc, npages ); 571 571 } 572 572 else // BPP already allocated 573 573 { 574 // test if new vseg has the same mode bits than 575 // the other vsegs in the same big page 576 unsigned int pte1_mode = 0; 577 if (pte1 & PTE_C) pte1_mode |= C_MODE_MASK; 578 if (pte1 & PTE_X) pte1_mode |= X_MODE_MASK; 579 if (pte1 & PTE_W) pte1_mode |= W_MODE_MASK; 580 if (pte1 & PTE_U) pte1_mode |= U_MODE_MASK; 581 if (vseg->mode != pte1_mode) { 582 _puts("\n[BOOT ERROR] in boot_vseg_map() : vseg "); 583 _puts( vseg->name ); 584 _puts(" has different flags ("); 585 _putx( vseg->mode ); 586 _puts(") than other vsegs sharing the same big page ("); 587 _putx( pte1_mode ); 588 _puts(")"); 589 _exit(); 590 } 591 574 592 ppn = ((pte1 << 9) & 0x0FFFFE00); 575 593 } … … 613 631 // compute max_pt2 614 632 _ptabs_max_pt2 = ((nsp<<12) - PT1_SIZE) / PT2_SIZE; 615 633 616 634 for ( vs = 0 ; vs < nspaces ; vs++ ) 617 635 { 618 _ptabs_vaddr [vs][x_dest][y_dest] = (vpn + offset) << 12; 636 _ptabs_vaddr [vs][x_dest][y_dest] = (vpn + offset) << 12; 619 637 _ptabs_paddr [vs][x_dest][y_dest] = ((paddr_t)(ppn + offset)) << 12; 620 638 _ptabs_next_pt2[vs][x_dest][y_dest] = 0; 621 639 offset += nsp; 622 /* 640 623 641 // reset all entries in PT1 (8 Kbytes) 624 642 _physical_memset( _ptabs_paddr[vs][x_dest][y_dest], PT1_SIZE, 0 ); 625 626 */627 643 } 628 644 } … … 630 646 #if BOOT_DEBUG_PT 631 647 _puts("[BOOT DEBUG] "); 632 _puts( vseg->name ); 648 _puts( vseg->name ); 633 649 _puts(" in cluster["); 634 650 _putd( x_dest );
Note: See TracChangeset
for help on using the changeset viewer.