SBL1启动 - Load Image

sbl1是平台相关的启动程序,除了执行必要的初始化操作,还负责加载PMIC,QSEE(TZ),RPM等Firmware,然后跳转到APPSBL执行(XBL跳转到XBL Core,也就是UEFI入口执行);

1. sbl1_config_table

所有在sbl1加载的image,都保存在sbl1_config_table[]数组中,这是一个配置表,记录Image加载前后的行为,boot_configuration_table_entry结构体定义如下:

@auth和@load的值为TRUE,表示加载并校验Image;
@boot_load_cancel函数检查是否要加载Image;
@target_img_partition_id表示Image所在分区的GUID值;
如果要立即执行Image,设置@exec值及@exec_func执行函数;
如果要跳转到Image执行,设置@jump值及@jump_func跳转函数,如APPSBL跳转函数;
FW加载前可能需要一些准备工作,可以放在@pre_procs函数列表,FW加载后会执行@post_procs函数列表;

typedef struct
{
  image_type host_img_id;                 /**< Image ID of the host */
  config_image_type host_img_type;        /**< Image type of the host */
  image_type target_img_id;               /**< Image ID of the target */
  config_image_type target_img_type;      /**< Image type of the target */
  secboot_sw_type target_img_sec_type;    /**< Secure Software ID of the target */
  boot_boolean load;                      /**< Target will be loaded */
  boot_boolean auth;                      /**< Target will be authenticated */
  boot_boolean exec;                      /**< Target will execute immediately after
                                               loading/authentication */
  boot_boolean jump;                      /**< Target will be jumped to after
                                               post procedures are complete */
  boot_boolean recovery;                  /**< Target image partiton will be restored from
                                               backup image partition once loading primary
                                               image fails */
  boot_procedure_func_type exec_func;     /**< Function pointer to execute function.
                                               Must be defined if exec is TRUE */
  boot_procedure_func_type jump_func;     /**< Function pointer to jump function.
                                               Must be defined if jump is TRUE */
  boot_procedure_func_type *pre_procs;    /**< Function pointer array to pre-procedures *
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值