Author: cognet
Date: Sun Feb 13 20:02:46 2011
New Revision: 218666
URL: http://svn.freebsd.org/changeset/base/218666

Log:
  Call init_param1() much earlier, so that msgbufsize is non-zero when we want
  to map and use the msgbuf.

Modified:
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/econa/econa_machdep.c
  head/sys/arm/sa11x0/assabet_machdep.c
  head/sys/arm/xscale/i80321/ep80219_machdep.c
  head/sys/arm/xscale/i80321/iq31244_machdep.c
  head/sys/arm/xscale/ixp425/avila_machdep.c

Modified: head/sys/arm/at91/at91_machdep.c
==============================================================================
--- head/sys/arm/at91/at91_machdep.c    Sun Feb 13 19:46:55 2011        
(r218665)
+++ head/sys/arm/at91/at91_machdep.c    Sun Feb 13 20:02:46 2011        
(r218666)
@@ -234,7 +234,7 @@ at91_ramsize(void)
                bw = (cr & AT91SAM9G20_SDRAMC_CR_DBW_16) ? 1 : 2;
        }
 
-       return (1 << (cols + rows + banks + bw));
+       return ((1 << (cols + rows + banks + bw));
 }
 
 void *
@@ -302,6 +302,8 @@ initarm(void *arg, void *arg2)
        valloc_pages(kernelstack, KSTACK_PAGES);
        valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
 
+       /* Do basic tuning, hz etc */
+       init_param1();
        /*
         * Now we start construction of the L1 page table
         * We start by mapping the L2 page tables into the L1.
@@ -440,8 +442,6 @@ initarm(void *arg, void *arg2)
        phys_avail[i++] = PHYSADDR + memsize;
        phys_avail[i++] = 0;
        phys_avail[i++] = 0;
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/econa/econa_machdep.c
==============================================================================
--- head/sys/arm/econa/econa_machdep.c  Sun Feb 13 19:46:55 2011        
(r218665)
+++ head/sys/arm/econa/econa_machdep.c  Sun Feb 13 20:02:46 2011        
(r218666)
@@ -208,6 +208,9 @@ initarm(void *arg, void *arg2)
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);
 
+       /* Do basic tuning, hz etc */
+       init_param1();
+               
 
        freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
        /* Define a macro to simplify memory allocation */
@@ -384,8 +387,6 @@ initarm(void *arg, void *arg2)
        phys_avail[i++] = PHYSADDR + memsize;
        phys_avail[i++] = 0;
        phys_avail[i++] = 0;
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
 

Modified: head/sys/arm/sa11x0/assabet_machdep.c
==============================================================================
--- head/sys/arm/sa11x0/assabet_machdep.c       Sun Feb 13 19:46:55 2011        
(r218665)
+++ head/sys/arm/sa11x0/assabet_machdep.c       Sun Feb 13 20:02:46 2011        
(r218666)
@@ -226,6 +226,9 @@ initarm(void *arg, void *arg2)
        pcpu_init(pc, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);
 
+       /* Do basic tuning, hz etc */
+       init_param1();
+               
        physical_start = (vm_offset_t) KERNBASE;
        physical_end =  lastaddr;
        physical_freestart = (((vm_offset_t)physical_end) + PAGE_MASK) & 
~PAGE_MASK;
@@ -408,8 +411,6 @@ initarm(void *arg, void *arg2)
        mutex_init();
        pmap_bootstrap(freemempos, 0xd0000000, &kernel_l1pt);
 
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c
==============================================================================
--- head/sys/arm/xscale/i80321/ep80219_machdep.c        Sun Feb 13 19:46:55 
2011        (r218665)
+++ head/sys/arm/xscale/i80321/ep80219_machdep.c        Sun Feb 13 20:02:46 
2011        (r218666)
@@ -210,6 +210,9 @@ initarm(void *arg, void *arg2)
        (var) = freemempos;             \
        memset((char *)(var), 0, ((np) * PAGE_SIZE));
 
+       /* Do basic tuning, hz etc */
+       init_param1();
+
        while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0)
                freemempos -= PAGE_SIZE;
        valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE);
@@ -411,8 +414,6 @@ initarm(void *arg, void *arg2)
        phys_avail[i++] = 0;
        phys_avail[i] = 0;
        
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c
==============================================================================
--- head/sys/arm/xscale/i80321/iq31244_machdep.c        Sun Feb 13 19:46:55 
2011        (r218665)
+++ head/sys/arm/xscale/i80321/iq31244_machdep.c        Sun Feb 13 20:02:46 
2011        (r218666)
@@ -200,6 +200,9 @@ initarm(void *arg, void *arg2)
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);
 
+       /* Do basic tuning, hz etc */
+       init_param1();
+               
        freemempos = 0xa0200000;
        /* Define a macro to simplify memory allocation */
 #define        valloc_pages(var, np)                   \
@@ -417,8 +420,6 @@ initarm(void *arg, void *arg2)
        phys_avail[i++] = 0;
        phys_avail[i] = 0;
        
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
        return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/xscale/ixp425/avila_machdep.c
==============================================================================
--- head/sys/arm/xscale/ixp425/avila_machdep.c  Sun Feb 13 19:46:55 2011        
(r218665)
+++ head/sys/arm/xscale/ixp425/avila_machdep.c  Sun Feb 13 20:02:46 2011        
(r218666)
@@ -245,6 +245,9 @@ initarm(void *arg, void *arg2)
        pcpu_init(pcpup, 0, sizeof(struct pcpu));
        PCPU_SET(curthread, &thread0);
 
+       /* Do basic tuning, hz etc */
+       init_param1();
+               
        /*
         * We allocate memory downwards from where we were loaded
         * by RedBoot; first the L1 page table, then NUM_KERNEL_PTS
@@ -474,8 +477,6 @@ initarm(void *arg, void *arg2)
        phys_avail[i++] = 0;
        phys_avail[i] = 0;
 
-       /* Do basic tuning, hz etc */
-       init_param1();
        init_param2(physmem);
        kdb_init();
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to