Attempt to pass a
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 1 Jan 2017 01:08:39 +0000 (17:08 -0800)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 1 Jan 2017 01:08:39 +0000 (17:08 -0800)
arm_chainloader/loader.cc

index 2764097..9b617fc 100644 (file)
@@ -102,6 +102,19 @@ struct LoaderImpl {
                res = fdt_setprop(v_fdt, node, "bootargs", cmdline, strlen((char*) cmdline) + 1);
                logf("fdt_setprop(): %d\n", res);
 
+                /* pass in a memory map, skipping first meg for bootcode */
+                int memory = fdt_path_offset(v_fdt, "/memory");
+                if(memory < 0)
+                    return NULL;
+
+                /* start the memory map at 1M and grow continuous for 256M
+                 * TODO: does this disrupt I/O? */
+
+                uint32_t memmap[] = { 0x100000, 0x10000000 };
+
+                res = fdt_setprop(v_fdt, memory, "reg", (void*) memmap, sizeof(memmap));
+                logf("fdt_setprop(): %d\n", res);
+
                logf("valid fdt loaded at 0x%X\n", (unsigned int)fdt);
 
                return fdt;
This page took 0.023799 seconds and 4 git commands to generate.