You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.8 KiB
79 lines
1.8 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2014-2020. All rights reserved.
|
|
* Description: boot
|
|
* Author: SmartMedia_BSP
|
|
* Create: 2014-06-04
|
|
*/
|
|
|
|
#ifndef BOOTH
|
|
#define BOOTH
|
|
|
|
typedef enum {
|
|
BOOT_PARTITION_PRIMARY = 0,
|
|
BOOT_PARTITION_BACKUP,
|
|
BOOT_PARTITION_A,
|
|
BOOT_PARTITION_B,
|
|
BOOT_PARTITION_UNKNOWN
|
|
} boot_partition_flag;
|
|
|
|
typedef union {
|
|
struct {
|
|
unsigned int act_boot : 4;
|
|
unsigned int exp_boot : 4;
|
|
unsigned int primary_retry_times : 4;
|
|
unsigned int backup_retry_times : 4;
|
|
unsigned int reserved : 16;
|
|
} bit;
|
|
unsigned int u32;
|
|
} boot_flag_reg;
|
|
|
|
typedef int (*fn_init)(void);
|
|
|
|
extern unsigned int _bss_start;
|
|
extern unsigned int _bss_end;
|
|
extern unsigned int _text_end;
|
|
extern unsigned int _blank_zone_start;
|
|
extern unsigned int _blank_zone_end;
|
|
|
|
extern char __text_start[];
|
|
extern char __text_end[];
|
|
extern char __bss_start[];
|
|
extern char __bss_end[];
|
|
extern char __page_table_start[];
|
|
extern char __page_table_end[];
|
|
extern char __end[];
|
|
extern unsigned int __init_start;
|
|
extern unsigned int __init_end;
|
|
extern char __symbol_start[];
|
|
extern char __symbol_end[];
|
|
|
|
extern unsigned int g_fbl_version;
|
|
extern unsigned int g_fbl_version_mask;
|
|
|
|
/* arm system function */
|
|
extern void reboot(void);
|
|
extern void reset_cpu(unsigned long addr);
|
|
extern long long get_chipid_reg(void);
|
|
extern unsigned int get_ca_vendor_reg(void);
|
|
|
|
/* cpu.c */
|
|
extern unsigned int get_ca_vendor(void);
|
|
|
|
extern unsigned int get_timer_clock(void);
|
|
|
|
unsigned long long get_ddr_actual_size(void);
|
|
unsigned int get_ddr_size(void);
|
|
|
|
void start_cmdline(void);
|
|
|
|
int boot_start(void);
|
|
void app_init(void);
|
|
void uart_init(void);
|
|
void sysmem_init(void);
|
|
void key_area_init(void);
|
|
void bootargs_prepare(void);
|
|
void boot_second_bootloader(void);
|
|
void *get_fbl_key_area(unsigned int *length);
|
|
void switch_starup_partition(void);
|
|
#endif /* BOOTH */
|