blob: 4a0bcfeb10dc7ef6a368133dadebaff767ddf91c [file] [log] [blame]
Andrew Scull11a4a0c2018-12-29 11:38:31 +00001/*
Andrew Walbran692b3252019-03-07 15:51:31 +00002 * Copyright 2018 The Hafnium Authors.
Andrew Scull11a4a0c2018-12-29 11:38:31 +00003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Andrew Scull9a6384b2019-01-02 12:08:40 +000017#include "hf/arch/cpu.h"
Andrew Scull11a4a0c2018-12-29 11:38:31 +000018
Fuad Tabba5c738432019-12-02 11:02:42 +000019#include "hf/cpu.h"
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010020#include "hf/ffa.h"
Andrew Walbrand4d2fa12019-10-01 16:47:25 +010021
Andrew Scull11a4a0c2018-12-29 11:38:31 +000022void arch_irq_disable(void)
23{
24 /* TODO */
25}
26
27void arch_irq_enable(void)
28{
29 /* TODO */
30}
31
Fuad Tabba5c738432019-12-02 11:02:42 +000032void arch_regs_reset(struct vcpu *vcpu)
Andrew Scull11a4a0c2018-12-29 11:38:31 +000033{
34 /* TODO */
Fuad Tabba5c738432019-12-02 11:02:42 +000035 (void)vcpu;
Andrew Scull11a4a0c2018-12-29 11:38:31 +000036}
37
38void arch_regs_set_pc_arg(struct arch_regs *r, ipaddr_t pc, uintreg_t arg)
39{
40 (void)pc;
Andrew Walbranf65cfa22019-12-05 11:38:18 +000041 r->arg[0] = arg;
Andrew Scull11a4a0c2018-12-29 11:38:31 +000042}
43
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010044void arch_regs_set_retval(struct arch_regs *r, struct ffa_value v)
Andrew Scull11a4a0c2018-12-29 11:38:31 +000045{
Andrew Walbranf65cfa22019-12-05 11:38:18 +000046 r->arg[0] = v.func;
47 r->arg[1] = v.arg1;
48 r->arg[2] = v.arg2;
49 r->arg[3] = v.arg3;
50 r->arg[4] = v.arg4;
51 r->arg[5] = v.arg5;
52 r->arg[6] = v.arg6;
53 r->arg[7] = v.arg7;
Andrew Scull11a4a0c2018-12-29 11:38:31 +000054}