blob: 8c0d9907c6103db696ee766f3768019157cd2302 [file] [log] [blame]
Karl Meakin8e58ddc2024-11-08 23:19:34 +00001/*
2 * Copyright 2024 The Hafnium Authors.
3 *
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
7 */
8
9#pragma once
10
11#include "hf/vm.h"
12
13/**
14 * Deactivate interrupt.
15 */
16int64_t plat_ffa_interrupt_deactivate(uint32_t pint_id, uint32_t vint_id,
17 struct vcpu *current);
18
19void plat_ffa_handle_secure_interrupt(struct vcpu *current, struct vcpu **next);
20bool plat_ffa_inject_notification_pending_interrupt(
21 struct vcpu_locked next_locked, struct vcpu_locked current_locked,
22 struct vm_locked receiver_locked);
23
24bool plat_ffa_intercept_call(struct vcpu_locked current_locked,
25 struct vcpu_locked next_locked,
26 struct ffa_value *signal_interrupt);
27
28struct vcpu *plat_ffa_unwind_nwd_call_chain_interrupt(struct vcpu *current);
29
30void plat_ffa_enable_virtual_interrupts(struct vcpu_locked current_locked,
31 struct vm_locked vm_locked);
32
33/**
34 * Reconfigure the interrupt belonging to the current partition at runtime.
35 */
36int64_t plat_ffa_interrupt_reconfigure(uint32_t int_id, uint32_t command,
37 uint32_t value, struct vcpu *current);
38
39uint32_t plat_ffa_interrupt_get(struct vcpu_locked current_locked);