blob: 010c1b035ef59d6705369ed1cdefb000a9e5e005 [file] [log] [blame]
Chris Zankel1387dab2016-08-10 18:36:44 +03001/*
2 * Copyright (C) 2016 Cadence Design Systems Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
Simon Glass6ab91072017-03-31 08:40:38 -06007#include <relocate.h>
Chris Zankel1387dab2016-08-10 18:36:44 +03008#include <asm/sections.h>
9#include <asm/string.h>
10
11int clear_bss(void)
12{
13 size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
14
15 memset((void *)&__bss_start, 0x00, len);
16 return 0;
17}
18