blob: c53c35cd075b04a85d060dc11d1ad802ccccb9fb [file] [log] [blame]
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef __BACKEND_H__
#define __BACKEND_H__
#include <stdint.h>
#include "psa/error.h"
#include "spm_ipc.h"
#include "load/spm_load_api.h"
/* BASIC TYPE DEFINITIONS */
struct backend_ops_t {
/*
* Runtime model-specific component initialization routine. This
* is an `assuredly` function, would panic if any error occurred.
*/
void (*comp_init_assuredly)(struct partition_t *p_pt,
uint32_t service_setting);
/*
* Runtime model-specific kick-off method for the whole system.
* Returns a hardware-specific control value, which is transparent
* to SPM common logic.
*/
uint32_t (*system_run)(void);
/* Runtime model-specific message handling mechanism. */
psa_status_t (*messaging)(struct service_t *p_serv,
struct tfm_msg_body_t *p_msg);
};
/* RUNTIME MODEL BACKENDS DECLARATION */
/* IPC backend */
extern const struct backend_ops_t backend_instance;
/* The component list, and a MACRO indicate this is not a common global. */
extern struct partition_head_t partition_listhead;
#define PARTITION_LIST_ADDR (&partition_listhead)
#endif /* __BACKEND_H__ */