Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F58224
memsize
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
br
Dec 15 2014, 2:15 PM
2014-12-15 14:15:47 (UTC+0)
Size
822 B
Referenced Files
None
Subscribers
None
memsize
View Options
Index: sys/mips/beri/beri_machdep.c
===================================================================
--- sys/mips/beri/beri_machdep.c (revision 275803)
+++ sys/mips/beri/beri_machdep.c (working copy)
@@ -184,6 +184,8 @@
char **envp = (char **)a2;
long memsize;
#ifdef FDT
+ struct mem_region mr[FDT_MEM_REGIONS];
+ int mr_cnt, err, val;
char buf[2048]; /* early stack supposedly big enough */
vm_offset_t dtbp;
phandle_t chosen;
@@ -268,6 +270,16 @@
cninit();
printf("entry: platform_start()\n");
+#ifdef FDT
+ /*
+ * Try to grab physical memory regions information from device tree.
+ * Override value provided by miniboot on success.
+ */
+ err = fdt_get_mem_regions(mr, &mr_cnt, &val);
+ if (err == 0)
+ memsize = val;
+#endif
+
bootverbose = 1;
if (bootverbose) {
printf("cmd line: ");
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
58108
Default Alt Text
memsize (822 B)
Attached To
Mode
P40 memsize
Attached
Detach File
Event Timeline
Log In to Comment