The following Bitrig commit seems to be required for
the Compulab Utilite and doesn't cause any problems on bbb.

commit 6ea8cdd3daffb2edde3eadf87d3fea6d2f47384c                                 
                    
Author: Patrick Wildt <[email protected]>                                       
                    
Date:   Sat Dec 7 15:04:09 2013 +0100                                           
                    
                                                                                
                    
    Load additional memory space into UVM.                                      
                    
                                                                                
                    
    Also bump the amount of 'space' to 2.  More space has not                   
                    
    been observed yet.                                                          
                    
                                                                                
                    
    ok drahn@

Index: armv7/armv7/armv7_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/armv7/armv7/armv7_machdep.c,v
retrieving revision 1.17
diff -u -p -r1.17 armv7_machdep.c
--- armv7/armv7/armv7_machdep.c 10 Dec 2014 15:29:53 -0000      1.17
+++ armv7/armv7/armv7_machdep.c 14 Jan 2015 13:06:46 -0000
@@ -395,8 +395,7 @@ copy_io_area_map(pd_entry_t *new_pd)
 u_int
 initarm(void *arg0, void *arg1, void *arg2)
 {
-       int loop;
-       int loop1;
+       int loop, loop1, i;
        u_int l1pagetable;
        pv_addr_t kernel_l1pt;
        paddr_t memstart;
@@ -732,6 +731,14 @@ initarm(void *arg0, void *arg1, void *ar
        uvm_setpagesize();        /* initialize PAGE_SIZE-dependent variables */
        uvm_page_physload(atop(physical_freestart), atop(physical_freeend),
            atop(physical_freestart), atop(physical_freeend), 0);
+
+       for (i = 1; i < bootconfig.dramblocks; i++) {
+               vaddr_t dramstart = bootconfig.dram[i].address;
+               vaddr_t dramend = dramstart + bootconfig.dram[i].pages * 
PAGE_SIZE;
+               physmem += bootconfig.dram[i].pages;
+               uvm_page_physload(atop(dramstart), atop(dramend),
+                   atop(dramstart), atop(dramend), 0);
+       }
 
        /* Boot strap pmap telling it where the kernel page table is */
 #ifdef VERBOSE_INIT_ARM
Index: armv7/include/vmparam.h
===================================================================
RCS file: /cvs/src/sys/arch/armv7/include/vmparam.h,v
retrieving revision 1.1
diff -u -p -r1.1 vmparam.h
--- armv7/include/vmparam.h     4 Sep 2013 14:38:29 -0000       1.1
+++ armv7/include/vmparam.h     14 Jan 2015 13:06:53 -0000
@@ -75,7 +75,7 @@
  * max number of non-contig chunks of physical RAM you can have
  */
 
-#define        VM_PHYSSEG_MAX          1
+#define        VM_PHYSSEG_MAX          2
 #define        VM_PHYSSEG_STRAT        VM_PSTRAT_RANDOM
 
 /*

Reply via email to