On 21 February 2011 13:23, Andrew Turner <and...@fubar.geek.nz> wrote: > On Sun, 13 Feb 2011 20:02:46 +0000 (UTC) > Olivier Houchard <cog...@freebsd.org> wrote: >> 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(); > This appears to be wrong. As msgbufsize is set in init_param1 it is > used before being set in the at91 initarm function. > > Andrew >
Oh, this should work (see also in attach). init_param1() moved under PCPU_SET(curthread, &thread0). Index: sys/arm/xscale/i8134x/crb_machdep.c =================================================================== --- sys/arm/xscale/i8134x/crb_machdep.c (revision 218911) +++ sys/arm/xscale/i8134x/crb_machdep.c (working copy) @@ -196,6 +196,9 @@ pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0x00200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -389,8 +392,6 @@ 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 - Index: sys/arm/xscale/pxa/pxa_machdep.c =================================================================== --- sys/arm/xscale/pxa/pxa_machdep.c (revision 218911) +++ sys/arm/xscale/pxa/pxa_machdep.c (working copy) @@ -182,6 +182,9 @@ 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) \ @@ -424,8 +427,6 @@ phys_avail[0] = round_page(virtual_avail - KERNBASE + phys_avail[0]); #endif - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Index: sys/arm/s3c2xx0/s3c24x0_machdep.c =================================================================== --- sys/arm/s3c2xx0/s3c24x0_machdep.c (revision 218911) +++ sys/arm/s3c2xx0/s3c24x0_machdep.c (working copy) @@ -257,6 +257,9 @@ pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + #define KERNEL_TEXT_BASE (KERNBASE) freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK; /* Define a macro to simplify memory allocation */ @@ -438,8 +441,6 @@ phys_avail[2] = 0; phys_avail[3] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); Index: sys/arm/at91/at91_machdep.c =================================================================== --- sys/arm/at91/at91_machdep.c (revision 218911) +++ sys/arm/at91/at91_machdep.c (working copy) @@ -256,6 +256,9 @@ 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 */ #define valloc_pages(var, np) \ @@ -302,8 +305,6 @@ 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. -- wbr, pluknet
arm_msgbufsize_cleanup.diff
Description: Binary data
_______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"