Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109315276
D20496.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
D20496.diff
View Options
Index: head/sys/riscv/riscv/machdep.c
===================================================================
--- head/sys/riscv/riscv/machdep.c
+++ head/sys/riscv/riscv/machdep.c
@@ -64,6 +64,7 @@
#include <sys/sysproto.h>
#include <sys/tslog.h>
#include <sys/ucontext.h>
+#include <sys/vmmeter.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
@@ -140,7 +141,34 @@
identify_cpu();
+ printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem),
+ ptoa((uintmax_t)realmem) / (1024 * 1024));
+
+ /*
+ * Display any holes after the first chunk of extended memory.
+ */
+ if (bootverbose) {
+ int indx;
+
+ printf("Physical memory chunk(s):\n");
+ for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
+ vm_paddr_t size;
+
+ size = phys_avail[indx + 1] - phys_avail[indx];
+ printf(
+ "0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n",
+ (uintmax_t)phys_avail[indx],
+ (uintmax_t)phys_avail[indx + 1] - 1,
+ (uintmax_t)size, (uintmax_t)size / PAGE_SIZE);
+ }
+ }
+
vm_ksubmap_init(&kmi);
+
+ printf("avail memory = %ju (%ju MB)\n",
+ ptoa((uintmax_t)vm_free_count()),
+ ptoa((uintmax_t)vm_free_count()) / (1024 * 1024));
+
bufinit();
vm_pager_bufferinit();
}
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -640,6 +640,7 @@
continue;
dump_avail[map_slot] = start;
dump_avail[map_slot + 1] = end;
+ realmem += atop((vm_offset_t)(end - start));
if (start >= kernstart && end <= pa)
continue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 11:37 AM (21 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16452736
Default Alt Text
D20496.diff (1 KB)
Attached To
Mode
D20496: RISC-V: announce real and available memory at boot
Attached
Detach File
Event Timeline
Log In to Comment