• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 // Notes:
16 // Place all FreeRTOS-dependent initialization code here
17 
18 #include <common/bk_include.h>
19 #include "bk_private/components_init.h"
20 #include <common/bk_err.h>
21 #include "bk_arch.h"
22 #include "los_task.h"
23 #include <modules/pm.h>
24 
rtos_memory_init(void)25 int rtos_memory_init(void)
26 {
27 #if CONFIG_FULLY_HOSTED
28 	sys_mem_init();
29 #endif
30 
31 	return BK_OK;
32 }
33 
rtos_init(void)34 int rtos_init(void)
35 {
36 	arch_init();
37 	rtos_memory_init();
38 
39 	LOS_KernelInit();
40 	OsPmEnterHandlerSet(bk_pm_enter_sleep);
41 
42 	return BK_OK;
43 }
44