source: rtems/bsps/powerpc/shared/start/zerobss.c @ 9964895

5
Last change on this file since 9964895 was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.

  • 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.