usr/src/uts/i86pc/os/startup.c
changeset 2991 4b13d6c49c6b
parent 2712 f74a135872bc
child 3290 256464cbb73c
equal deleted inserted replaced
2990:4b58146a29c7 2991:4b13d6c49c6b
  1473 {
  1473 {
  1474 	struct segmap_crargs a;
  1474 	struct segmap_crargs a;
  1475 	extern void hat_kern_setup(void);
  1475 	extern void hat_kern_setup(void);
  1476 	pgcnt_t pages_left;
  1476 	pgcnt_t pages_left;
  1477 
  1477 
  1478 	extern int exec_lpg_disable, use_brk_lpg, use_stk_lpg, use_zmap_lpg;
  1478 	extern int use_brk_lpg, use_stk_lpg;
  1479 	extern pgcnt_t auto_lpg_min_physmem;
       
  1480 
  1479 
  1481 	PRM_POINT("startup_vm() starting...");
  1480 	PRM_POINT("startup_vm() starting...");
  1482 
  1481 
  1483 	/*
  1482 	/*
  1484 	 * The next two loops are done in distinct steps in order
  1483 	 * The next two loops are done in distinct steps in order
  1727 
  1726 
  1728 	/*
  1727 	/*
  1729 	 * disable automatic large pages for small memory systems or
  1728 	 * disable automatic large pages for small memory systems or
  1730 	 * when the disable flag is set.
  1729 	 * when the disable flag is set.
  1731 	 */
  1730 	 */
  1732 	if (physmem < auto_lpg_min_physmem || auto_lpg_disable) {
  1731 	if (!auto_lpg_disable && mmu.max_page_level > 0) {
  1733 		exec_lpg_disable = 1;
  1732 		max_uheap_lpsize = LEVEL_SIZE(1);
       
  1733 		max_ustack_lpsize = LEVEL_SIZE(1);
       
  1734 		max_privmap_lpsize = LEVEL_SIZE(1);
       
  1735 		max_uidata_lpsize = LEVEL_SIZE(1);
       
  1736 		max_utext_lpsize = LEVEL_SIZE(1);
       
  1737 		max_shm_lpsize = LEVEL_SIZE(1);
       
  1738 	}
       
  1739 	if (physmem < privm_lpg_min_physmem || mmu.max_page_level == 0 ||
       
  1740 	    auto_lpg_disable) {
  1734 		use_brk_lpg = 0;
  1741 		use_brk_lpg = 0;
  1735 		use_stk_lpg = 0;
  1742 		use_stk_lpg = 0;
  1736 		use_zmap_lpg = 0;
  1743 	}
       
  1744 	if (mmu.max_page_level > 0) {
       
  1745 		mcntl0_lpsize = LEVEL_SIZE(1);
  1737 	}
  1746 	}
  1738 
  1747 
  1739 	PRM_POINT("Calling hat_init_finish()...");
  1748 	PRM_POINT("Calling hat_init_finish()...");
  1740 	hat_init_finish();
  1749 	hat_init_finish();
  1741 	PRM_POINT("hat_init_finish() done");
  1750 	PRM_POINT("hat_init_finish() done");