Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 1 | /* |
2 | * Copyright (C) 2016 Cadence Design Systems Inc. | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: GPL-2.0+ | ||||
5 | */ | ||||
6 | |||||
Simon Glass | 6ab9107 | 2017-03-31 08:40:38 -0600 | [diff] [blame] | 7 | #include <relocate.h> |
Chris Zankel | 1387dab | 2016-08-10 18:36:44 +0300 | [diff] [blame] | 8 | #include <asm/sections.h> |
9 | #include <asm/string.h> | ||||
10 | |||||
11 | int 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 |