Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 1 | /* |
Andrew Walbran | 692b325 | 2019-03-07 15:51:31 +0000 | [diff] [blame] | 2 | * Copyright 2018 The Hafnium Authors. |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 3 | * |
| 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 Scull | 9a6384b | 2019-01-02 12:08:40 +0000 | [diff] [blame] | 17 | #include "hf/arch/cpu.h" |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 18 | |
Fuad Tabba | 5c73843 | 2019-12-02 11:02:42 +0000 | [diff] [blame] | 19 | #include "hf/cpu.h" |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame^] | 20 | #include "hf/ffa.h" |
Andrew Walbran | d4d2fa1 | 2019-10-01 16:47:25 +0100 | [diff] [blame] | 21 | |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 22 | void arch_irq_disable(void) |
| 23 | { |
| 24 | /* TODO */ |
| 25 | } |
| 26 | |
| 27 | void arch_irq_enable(void) |
| 28 | { |
| 29 | /* TODO */ |
| 30 | } |
| 31 | |
Fuad Tabba | 5c73843 | 2019-12-02 11:02:42 +0000 | [diff] [blame] | 32 | void arch_regs_reset(struct vcpu *vcpu) |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 33 | { |
| 34 | /* TODO */ |
Fuad Tabba | 5c73843 | 2019-12-02 11:02:42 +0000 | [diff] [blame] | 35 | (void)vcpu; |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | void arch_regs_set_pc_arg(struct arch_regs *r, ipaddr_t pc, uintreg_t arg) |
| 39 | { |
| 40 | (void)pc; |
Andrew Walbran | f65cfa2 | 2019-12-05 11:38:18 +0000 | [diff] [blame] | 41 | r->arg[0] = arg; |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 42 | } |
| 43 | |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame^] | 44 | void arch_regs_set_retval(struct arch_regs *r, struct ffa_value v) |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 45 | { |
Andrew Walbran | f65cfa2 | 2019-12-05 11:38:18 +0000 | [diff] [blame] | 46 | 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 Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 54 | } |