• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
3  *
4  * UniProton is licensed under Mulan PSL v2.
5  * You can use this software according to the terms and conditions of the Mulan PSL v2.
6  * You may obtain a copy of Mulan PSL v2 at:
7  *          http://license.coscl.org.cn/MulanPSL2
8  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11  * See the Mulan PSL v2 for more details.
12  * Create: 2022-11-22
13  * Description: BSS初始化。
14  */
15 #include "prt_cpu_external.h"
16 /*
17  * 描述: BSS段初始化
18  */
OsBssInit(void)19 INIT_SEC_L4_TEXT void OsBssInit(void)
20 {
21     uintptr_t len = (uintptr_t)(&__bss_end__) - (uintptr_t)(&__bss_start__);
22     if (memset_s((void *)&__bss_start__, len, 0, len) != EOK) {
23         OS_GOTO_SYS_ERROR();
24     }
25 
26     return;
27 }