- zsize = mem_size >> 2; /* Get target zone size as 1/4 of physical memory */
- if(zsize < ZONE_MAP_MIN) zsize = ZONE_MAP_MIN; /* Clamp to min */
- if(zsize > ZONE_MAP_MAX) zsize = ZONE_MAP_MAX; /* Clamp to max */
- zone_init(zsize); /* Allocate address space for zones */
+ zlog_ready = TRUE;
+
+ if (PE_parse_boot_argn("zsize", &zsizearg, sizeof (zsizearg)))
+ zsize = zsizearg * 1024ULL * 1024ULL;
+ else {
+ zsize = sane_size >> 2; /* Get target zone size as 1/4 of physical memory */
+ }
+
+ if (zsize < ZONE_MAP_MIN)
+ zsize = ZONE_MAP_MIN; /* Clamp to min */
+ if (zsize > sane_size >> 1)
+ zsize = sane_size >> 1; /* Clamp to half of RAM max */
+#if !__LP64__
+ if (zsize > ZONE_MAP_MAX)
+ zsize = ZONE_MAP_MAX; /* Clamp to 1.5GB max for K32 */
+#endif /* !__LP64__ */
+
+ vm_mem_bootstrap_kprintf(("vm_mem_bootstrap: calling kext_alloc_init\n"));
+ kext_alloc_init();
+
+ vm_mem_bootstrap_kprintf(("vm_mem_bootstrap: calling zone_init\n"));
+ assert((vm_size_t) zsize == zsize);
+ zone_init((vm_size_t) zsize); /* Allocate address space for zones */