Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F58606
memsize
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
br
Dec 16 2014, 1:11 PM
2014-12-16 13:11:56 (UTC+0)
Size
968 B
Referenced Files
None
Subscribers
None
memsize
View Options
Index: sys/mips/beri/beri_machdep.c
===================================================================
--- sys/mips/beri/beri_machdep.c (revision 275828)
+++ sys/mips/beri/beri_machdep.c (working copy)
@@ -88,6 +88,11 @@
mips_init(void)
{
int i;
+#ifdef FDT
+ struct mem_region mr[FDT_MEM_REGIONS];
+ int mr_cnt, val;
+ int j;
+#endif
for (i = 0; i < 10; i++) {
phys_avail[i] = 0;
@@ -102,6 +107,25 @@
physmem = realmem;
+#ifdef FDT
+ if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) {
+
+ physmem = btoc(val);
+
+ /* Limit size of the first region */
+ phys_avail[1] = MIN(mr[0].mr_size, ctob(realmem));
+ dump_avail[1] = phys_avail[1];
+
+ /* Add the rest of regions */
+ for (i = 1, j = 2; i < mr_cnt; i++, j+=2) {
+ phys_avail[j] = mr[i].mr_start;
+ phys_avail[j+1] = mr[i].mr_size;
+ dump_avail[j] = phys_avail[j];
+ dump_avail[j+1] = phys_avail[j+1];
+ }
+ }
+#endif
+
init_param1();
init_param2(physmem);
mips_cpu_init();
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
58490
Default Alt Text
memsize (968 B)
Attached To
Mode
P41 memsize
Attached
Detach File
Event Timeline
Log In to Comment