Fuad Tabba | 77a4b01 | 2019-11-15 12:13:08 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 The Hafnium Authors. |
| 3 | * |
Andrew Walbran | e959ec1 | 2020-06-17 15:01:09 +0100 | [diff] [blame] | 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. |
Fuad Tabba | 77a4b01 | 2019-11-15 12:13:08 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "hf/vm.h" |
| 12 | |
| 13 | /** |
| 14 | * Set architecture-specific features for the specified VM. |
| 15 | */ |
| 16 | void arch_vm_features_set(struct vm *vm); |
Olivier Deprez | d9d409f | 2023-03-17 11:47:57 +0100 | [diff] [blame] | 17 | bool arch_vm_init_mm(struct vm *vm, struct mpool *ppool); |
Madhukar Pappireddy | 070f49e | 2024-01-12 13:02:27 -0600 | [diff] [blame] | 18 | bool arch_vm_iommu_init_mm(struct vm *vm, struct mpool *ppool); |
Olivier Deprez | d9d409f | 2023-03-17 11:47:57 +0100 | [diff] [blame] | 19 | bool arch_vm_identity_prepare(struct vm_locked vm_locked, paddr_t begin, |
| 20 | paddr_t end, uint32_t mode, struct mpool *ppool); |
| 21 | void arch_vm_identity_commit(struct vm_locked vm_locked, paddr_t begin, |
| 22 | paddr_t end, uint32_t mode, struct mpool *ppool, |
| 23 | ipaddr_t *ipa); |
| 24 | bool arch_vm_unmap(struct vm_locked vm_locked, paddr_t begin, paddr_t end, |
| 25 | struct mpool *ppool); |
| 26 | void arch_vm_ptable_defrag(struct vm_locked vm_locked, struct mpool *ppool); |
| 27 | bool arch_vm_mem_get_mode(struct vm_locked vm_locked, ipaddr_t begin, |
| 28 | ipaddr_t end, uint32_t *mode); |
Madhukar Pappireddy | 0e57d3d | 2023-10-11 15:49:05 -0500 | [diff] [blame] | 29 | bool arch_vm_iommu_mm_identity_map(struct vm_locked vm_locked, paddr_t begin, |
| 30 | paddr_t end, uint32_t mode, |
| 31 | struct mpool *ppool, ipaddr_t *ipa, |
| 32 | uint8_t dma_device_id); |