blob: 3dc8edc801d7721f946bb4824c0129a41f080b1a [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Chris Zankelc978b522016-08-10 18:36:44 +03002/*
3 * Copyright (C) 2016 Cadence Design Systems Inc.
Chris Zankelc978b522016-08-10 18:36:44 +03004 */
5
Simon Glasse47b2d62017-03-31 08:40:38 -06006#include <relocate.h>
Chris Zankelc978b522016-08-10 18:36:44 +03007#include <asm/sections.h>
8#include <asm/string.h>
9
10int clear_bss(void)
11{
12 size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
13
14 memset((void *)&__bss_start, 0x00, len);
15 return 0;
16}