Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | if (sysenv != NULL) { | ||||
} | } | ||||
freeenv(sysenv); | freeenv(sysenv); | ||||
} | } | ||||
/* | /* | ||||
* Good {morning,afternoon,evening,night}. | * Good {morning,afternoon,evening,night}. | ||||
*/ | */ | ||||
startrtclock(); | startrtclock(); | ||||
if (!(efi_boot && vm_guest == VM_GUEST_HV)) | |||||
printcpuinfo(); | printcpuinfo(); | ||||
/* | /* | ||||
* Display physical memory if SMBIOS reports reasonable amount. | * Display physical memory if SMBIOS reports reasonable amount. | ||||
*/ | */ | ||||
memsize = 0; | memsize = 0; | ||||
sysenv = kern_getenv("smbios.memory.enabled"); | sysenv = kern_getenv("smbios.memory.enabled"); | ||||
if (sysenv != NULL) { | if (sysenv != NULL) { | ||||
memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10; | memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10) << 10; | ||||
freeenv(sysenv); | freeenv(sysenv); | ||||
} | } | ||||
if (memsize < ptoa((uintmax_t)vm_free_count())) | if (memsize < ptoa((uintmax_t)vm_free_count())) | ||||
memsize = ptoa((uintmax_t)Maxmem); | memsize = ptoa((uintmax_t)Maxmem); | ||||
if (!(efi_boot && vm_guest == VM_GUEST_HV)) | |||||
printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); | printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); | ||||
realmem = atop(memsize); | realmem = atop(memsize); | ||||
/* | /* | ||||
* Display any holes after the first chunk of extended memory. | * Display any holes after the first chunk of extended memory. | ||||
*/ | */ | ||||
if (bootverbose) { | if (bootverbose) { | ||||
int indx; | int indx; | ||||
printf("Physical memory chunk(s):\n"); | printf("Physical memory chunk(s):\n"); | ||||
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { | for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { | ||||
vm_paddr_t size; | vm_paddr_t size; | ||||
size = phys_avail[indx + 1] - phys_avail[indx]; | size = phys_avail[indx + 1] - phys_avail[indx]; | ||||
printf( | printf( | ||||
"0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n", | "0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n", | ||||
(uintmax_t)phys_avail[indx], | (uintmax_t)phys_avail[indx], | ||||
(uintmax_t)phys_avail[indx + 1] - 1, | (uintmax_t)phys_avail[indx + 1] - 1, | ||||
(uintmax_t)size, (uintmax_t)size / PAGE_SIZE); | (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); | ||||
} | } | ||||
} | } | ||||
vm_ksubmap_init(&kmi); | vm_ksubmap_init(&kmi); | ||||
if (!(efi_boot && vm_guest == VM_GUEST_HV)) | |||||
printf("avail memory = %ju (%ju MB)\n", | printf("avail memory = %ju (%ju MB)\n", | ||||
ptoa((uintmax_t)vm_free_count()), | ptoa((uintmax_t)vm_free_count()), | ||||
ptoa((uintmax_t)vm_free_count()) / 1048576); | ptoa((uintmax_t)vm_free_count()) / 1048576); | ||||
#ifdef DEV_PCI | #ifdef DEV_PCI | ||||
if (bootverbose && intel_graphics_stolen_base != 0) | if (bootverbose && intel_graphics_stolen_base != 0) | ||||
printf("intel stolen mem: base %#jx size %ju MB\n", | printf("intel stolen mem: base %#jx size %ju MB\n", | ||||
(uintmax_t)intel_graphics_stolen_base, | (uintmax_t)intel_graphics_stolen_base, | ||||
(uintmax_t)intel_graphics_stolen_size / 1024 / 1024); | (uintmax_t)intel_graphics_stolen_size / 1024 / 1024); | ||||
#endif | #endif | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 1,595 Lines • Show Last 20 Lines |