Lines Matching defs:sp

78 struct sp_exec_ctx *spmc_get_sp_ec(struct secure_partition_desc *sp)
80 return &(sp->ec[get_ec_index(sp)]);
267 struct secure_partition_desc *sp;
280 sp = spmc_get_sp_ctx(dst_id);
281 if (sp != NULL) {
337 struct secure_partition_desc *sp;
385 sp = spmc_get_sp_ctx(dst_id);
386 if (sp == NULL) {
397 idx = get_ec_index(sp);
398 if (sp->ec[idx].rt_state != RT_STATE_WAITING) {
400 idx, sp->ec[idx].rt_model);
408 sp->ec[idx].rt_state = RT_STATE_RUNNING;
409 sp->ec[idx].rt_model = RT_MODEL_DIR_REQ;
410 sp->ec[idx].dir_req_origin_id = src_id;
429 struct secure_partition_desc *sp;
457 sp = spmc_get_sp_ctx(ffa_endpoint_source(x1));
458 if (sp == NULL) {
466 idx = get_ec_index(sp);
467 assert(sp->ec[idx].rt_state == RT_STATE_RUNNING);
470 if (sp->ec[idx].rt_model != RT_MODEL_DIR_REQ) {
472 idx, sp->ec[idx].rt_model);
476 if (sp->ec[idx].dir_req_origin_id != dst_id) {
478 dst_id, sp->ec[idx].dir_req_origin_id, idx);
483 sp->ec[idx].rt_state = RT_STATE_WAITING;
486 sp->ec[idx].dir_req_origin_id = INV_SP_ID;
493 spmc_sp_synchronous_exit(&sp->ec[idx], x4);
516 struct secure_partition_desc *sp;
529 sp = spmc_get_current_sp_ctx();
530 if (sp == NULL) {
538 idx = get_ec_index(sp);
541 if (sp->ec[idx].rt_model == RT_MODEL_DIR_REQ) {
546 assert(sp->ec[idx].rt_state == RT_STATE_RUNNING);
552 if (sp->ec[idx].rt_model == RT_MODEL_INIT) {
553 spmc_sp_synchronous_exit(&sp->ec[idx], x4);
559 sp->ec[idx].rt_state = RT_STATE_WAITING;
562 if (sp->ec[idx].rt_model == RT_MODEL_INTR) {
588 struct secure_partition_desc *sp;
597 sp = spmc_get_current_sp_ctx();
598 if (sp == NULL) {
604 idx = get_ec_index(sp);
610 if (sp->ec[idx].rt_model == RT_MODEL_INIT) {
611 ERROR("SP 0x%x failed to initialize.\n", sp->sp_id);
612 spmc_sp_synchronous_exit(&sp->ec[idx], x2);
1130 struct secure_partition_desc *sp = spmc_get_current_sp_ctx();
1136 if (sp->ffa_version == MAKE_FFA_VERSION(1, 1)) {
1145 sp->ns_bit_requested = (input_properties &
1149 if (sp->ns_bit_requested) {
1316 struct secure_partition_desc *sp;
1338 sp = spmc_get_sp_ctx(target_id);
1340 if (sp == NULL) {
1345 idx = get_ec_index(sp);
1351 rt_state = &((sp->ec[idx]).rt_state);
1352 rt_model = &((sp->ec[idx]).rt_model);
1415 static int validate_secondary_ep(uintptr_t ep, struct secure_partition_desc *sp)
1424 mb = &sp->mailbox;
1457 struct secure_partition_desc *sp;
1467 sp = spmc_get_current_sp_ctx();
1468 if (sp == NULL) {
1475 if (sp->runtime_el != S_EL1) {
1481 sp_ctx = spmc_get_sp_ec(sp);
1489 if (validate_secondary_ep(x1, sp)) {
1501 sp->secondary_ep = x1;
1502 VERBOSE("%s: 0x%lx\n", __func__, sp->secondary_ep);
1513 struct secure_partition_desc *sp,
1531 ARRAY_SIZE(sp->uuid), sp->uuid);
1543 sp->runtime_el = config_32;
1551 sp->ffa_version = config_32;
1559 sp->execution_state = config_32;
1576 sp->properties = config_32;
1610 sp->sp_id = config_32;
1629 sp->pwr_mgmt_msgs = config_32;
1662 struct secure_partition_desc *sp;
1713 sp = spmc_get_current_sp_ctx();
1720 ret = sp_manifest_parse(sp_manifest, ret, sp, next_image_ep_info,
1728 if (sp->runtime_el != S_EL1) {
1729 ERROR("Unexpected runtime EL: %d\n", sp->runtime_el);
1734 spmc_sp_common_setup(sp, next_image_ep_info, boot_info_reg);
1737 spmc_el1_sp_setup(sp, next_image_ep_info);
1740 spmc_sp_common_ep_commit(sp, next_image_ep_info);
1812 struct secure_partition_desc *sp;
1815 sp = spmc_get_current_sp_ctx();
1816 ec = spmc_get_sp_ec(sp);
1820 INFO("Secure Partition (0x%x) init start.\n", sp->sp_id);
1826 sp->sp_id, rc);
1838 struct secure_partition_desc *sp;
1841 sp = &sp_desc[i];
1842 sp->sp_id = INV_SP_ID;
1843 sp->mailbox.rx_buffer = NULL;
1844 sp->mailbox.tx_buffer = NULL;
1845 sp->mailbox.state = MAILBOX_STATE_EMPTY;
1846 sp->secondary_ep = 0;
2071 struct secure_partition_desc *sp = spmc_get_current_sp_ctx();
2076 assert(sp != NULL);
2082 if (sp->runtime_el != S_EL1) {
2089 ec = spmc_get_sp_ec(sp);
2102 VERBOSE("SP (0x%x) interrupt start on core%u.\n", sp->sp_id, linear_id);