relocate.c 311 B

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