Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 Google LLC |
| 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 | |
| 19 | void arch_irq_disable(void) |
| 20 | { |
| 21 | /* TODO */ |
| 22 | } |
| 23 | |
| 24 | void arch_irq_enable(void) |
| 25 | { |
| 26 | /* TODO */ |
| 27 | } |
| 28 | |
Andrew Scull | bb3ab6c | 2018-11-26 20:38:49 +0000 | [diff] [blame] | 29 | void arch_regs_reset(struct arch_regs *r, bool is_primary, uint64_t vm_id, |
| 30 | uint64_t vcpu_id, paddr_t table) |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 31 | { |
| 32 | /* TODO */ |
| 33 | (void)is_primary; |
Andrew Scull | bb3ab6c | 2018-11-26 20:38:49 +0000 | [diff] [blame] | 34 | (void)vm_id; |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 35 | (void)table; |
Andrew Scull | bb3ab6c | 2018-11-26 20:38:49 +0000 | [diff] [blame] | 36 | r->vcpu_id = vcpu_id; |
Andrew Scull | 11a4a0c | 2018-12-29 11:38:31 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | void arch_regs_set_pc_arg(struct arch_regs *r, ipaddr_t pc, uintreg_t arg) |
| 40 | { |
| 41 | (void)pc; |
| 42 | r->r[0] = arg; |
| 43 | } |
| 44 | |
| 45 | void arch_regs_set_retval(struct arch_regs *r, uintreg_t v) |
| 46 | { |
| 47 | r->r[0] = v; |
| 48 | } |