relocate.c 304 B

1234567891011121314151617
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2016 Cadence Design Systems Inc.
  4. */
  5. #include <relocate.h>
  6. #include <asm/sections.h>
  7. #include <asm/string.h>
  8. int clear_bss(void)
  9. {
  10. size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
  11. memset((void *)&__bss_start, 0x00, len);
  12. return 0;
  13. }