Date: Mon, 21 Aug 2006 20:58:23 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 104722 for review Message-ID: <200608212058.k7LKwNNU047774@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104722 Change 104722 by imp@imp_lighthouse on 2006/08/21 20:58:02 Init bss Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#8 (text) ==== @@ -30,6 +30,9 @@ #include "at91rm9200.h" #include "at91rm9200_lowlevel.h" +extern void *__bss_start__; +extern void *__bss_end__; + #define BAUD 115200 #define AT91C_US_ASYNC_MODE (AT91C_US_USMODE_NORMAL | AT91C_US_NBSTOP_1_BIT | \ AT91C_US_PAR_NONE | AT91C_US_CHRL_8_BITS | AT91C_US_CLKS_CLOCK) @@ -42,6 +45,8 @@ void _init(void) { + int *i; + AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; AT91PS_PDC pPDC = (AT91PS_PDC)&(pUSART->US_RPR); @@ -195,4 +200,9 @@ pUSART->US_MR = AT91C_US_ASYNC_MODE; pUSART->US_CR = AT91C_US_TXEN; pUSART->US_CR = AT91C_US_RXEN; + + /* Zero BSS now that we have memory setup */ + i = (int *)__bss_start__; + while (i < (int *)__bss_end__) + *i++ = 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608212058.k7LKwNNU047774>