plat/meson/gxl/gxl_scpi.c
/**
 * Upload a FW to SCP.
 *
 * @param addr: firmware data address
 * @param size: size of firmware
 * @param send: If set, actually copy the firmware in SCP memory otherwise only
 *  send the firmware address.
 */
Upload a FW to SCP.
@param addr: firmware data address
@param size: size of firmware
@param send: If set, actually copy the firmware in SCP memory otherwise only
send the firmware address.
Upload a FW to SCP . @param addr : firmware data address @param size : size of firmware @param send : If set actually copy the firmware in SCP memory otherwise only send the firmware address .
void scpi_upload_scp_fw(uintptr_t addr, size_t size, int send)
{
	struct asd_ctx ctx;
	asd_sha_init(&ctx, ASM_SHA256);
	asd_sha_update(&ctx, (void *)addr, size);
	asd_sha_finalize(&ctx);
	mhu_secure_message_start();
	if (send == 0)
		scpi_set_scp_addr(addr, size);
	else
		scpi_copy_scp_data((void *)addr, size);
	scpi_send_fw_hash(ctx.digest, sizeof(ctx.digest));
}
void scpi_upload_scp_fw ( uintptr_t addr , size_t size , int send ) { struct asd_ctx ctx ; asd_sha_init ( & ctx , ASM_SHA256 ) ; asd_sha_update ( & ctx , ( void * ) addr , size ) ; asd_sha_finalize ( & ctx ) ; mhu_secure_message_start ( ) ; if ( send == 0 ) scpi_set_scp_addr ( addr , size ) ; else scpi_copy_scp_data ( ( void * ) addr , size ) ; scpi_send_fw_hash ( ctx . digest , sizeof ( ctx . digest ) ) ; }
Upload a FW to SCP.
Upload a FW to SCP .