Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168425494
D27546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27546.diff
View Options
Index: sys/amd64/amd64/machdep.c
===================================================================
--- sys/amd64/amd64/machdep.c
+++ sys/amd64/amd64/machdep.c
@@ -234,6 +234,8 @@
{
uintmax_t memsize;
char *sysenv;
+ uintmax_t early_free_count;
+ int indx;
/*
* On MacBooks, we need to disallow the legacy USB circuit to
@@ -284,14 +286,17 @@
/*
* Display any holes after the first chunk of extended memory.
*/
+ early_free_count = 0;
if (bootverbose) {
- int indx;
-
printf("Physical memory chunk(s):\n");
- for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
- vm_paddr_t size;
+ }
+
+ for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
+ vm_paddr_t size;
- size = phys_avail[indx + 1] - phys_avail[indx];
+ size = phys_avail[indx + 1] - phys_avail[indx];
+ early_free_count += (uintmax_t)size;
+ if (bootverbose) {
printf(
"0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n",
(uintmax_t)phys_avail[indx],
@@ -303,8 +308,7 @@
vm_ksubmap_init(&kmi);
printf("avail memory = %ju (%ju MB)\n",
- ptoa((uintmax_t)vm_free_count()),
- ptoa((uintmax_t)vm_free_count()) / 1048576);
+ early_free_count, (early_free_count / 1048576));
#ifdef DEV_PCI
if (bootverbose && intel_graphics_stolen_base != 0)
printf("intel stolen mem: base %#jx size %ju MB\n",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 29, 6:17 AM (14 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37499019
Default Alt Text
D27546.diff (1 KB)
Attached To
Mode
D27546: Avoid vm_free_count() for physmem available before VM ACPI walk.
Attached
Detach File
Event Timeline
Log In to Comment