source: rtems/c/src/lib/libbsp/powerpc/shared/startup/zerobss.c @ 72866a7

4.115
Last change on this file since 72866a7 was 72866a7, checked in by Joel Sherrill <joel.sherrill@…>, on 10/15/14 at 19:23:07

libbsp/powerpc/shared/startup/zerobss.c: Fix warnings

  • Property mode set to 100644
File size: 988 bytes
Line 
1/*
2 *  zero the various bss areas.
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2014.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 *
13 *  Modified to support the MCP750.
14 *  Modifications Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
15 */
16
17#include <string.h>
18#include <bsp.h>
19
20/* prevent these from being accessed in the short data areas */
21extern unsigned long __bss_start[], __SBSS_START__[], __SBSS_END__[];
22extern unsigned long __SBSS2_START__[], __SBSS2_END__[];
23extern unsigned long __bss_end[];
24
25void zero_bss(void)
26{
27  memset(
28    __SBSS_START__,
29    0,
30    ((unsigned) __SBSS_END__) - ((unsigned)__SBSS_START__)
31  );
32  memset(
33    __SBSS2_START__,
34    0,
35    ((unsigned) __SBSS2_END__) - ((unsigned)__SBSS2_START__)
36  );
37  memset(
38    __bss_start,
39    0,
40    ((unsigned) __bss_end) - ((unsigned)__bss_start)
41  );
42}
Note: See TracBrowser for help on using the repository browser.