67 lines
1.7 KiB
C
67 lines
1.7 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
/* os shim includes */
|
|
#include "os_types.h"
|
|
|
|
#include "ahb_hw.h"
|
|
#include "sec_glb.h"
|
|
|
|
#include "system.h"
|
|
#include "iot_system.h"
|
|
|
|
uint8_t system_check_lic()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
void system_set_restart_reason(uint8_t reason)
|
|
{
|
|
ahb_scratch_r0_set(SOFT_RESET_FLAG);
|
|
ahb_scratch_r1_set(reason);
|
|
}
|
|
|
|
void scratch_p_set_fast_boot(bool_t en)
|
|
{
|
|
(void)en;
|
|
return;
|
|
}
|
|
|
|
bool_t scratch_p_get_fast_boot(void)
|
|
{
|
|
return 2;
|
|
}
|
|
|
|
void system_get_fw_boot_param(sbl_param_input_t *ptr)
|
|
{
|
|
sbl_param_input_t *ptr_temp = (sbl_param_input_t *)(&_sp - 4);
|
|
|
|
ptr->flash_size = ptr_temp->flash_size;
|
|
ptr->fw_mode = ptr_temp->fw_mode;
|
|
ptr->run_in_psram = ptr_temp->run_in_psram;
|
|
ptr->print_ena = ptr_temp->print_ena;
|
|
|
|
return;
|
|
}
|
|
|
|
void system_restart_chip_by_soft()
|
|
{
|
|
sec_glb_chip_rst();
|
|
}
|
|
|
|
uint32_t system_get_rst_flag_reg()
|
|
{
|
|
return 0;
|
|
}
|