blob: 7bc13a267c838a9c5d603e46ce5d923158b7f5a8 [file] [log] [blame]
Fuad Tabba77a4b012019-11-15 12:13:08 +00001/*
2 * Copyright 2019 The Hafnium Authors.
3 *
Andrew Walbrane959ec12020-06-17 15:01:09 +01004 * 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 Tabba77a4b012019-11-15 12:13:08 +00007 */
8
9#pragma once
10
11#include "hf/vm.h"
12
13/**
14 * Set architecture-specific features for the specified VM.
15 */
16void arch_vm_features_set(struct vm *vm);
Olivier Deprezd9d409f2023-03-17 11:47:57 +010017bool arch_vm_init_mm(struct vm *vm, struct mpool *ppool);
18bool arch_vm_identity_prepare(struct vm_locked vm_locked, paddr_t begin,
19 paddr_t end, uint32_t mode, struct mpool *ppool);
20void arch_vm_identity_commit(struct vm_locked vm_locked, paddr_t begin,
21 paddr_t end, uint32_t mode, struct mpool *ppool,
22 ipaddr_t *ipa);
23bool arch_vm_unmap(struct vm_locked vm_locked, paddr_t begin, paddr_t end,
24 struct mpool *ppool);
25void arch_vm_ptable_defrag(struct vm_locked vm_locked, struct mpool *ppool);
26bool arch_vm_mem_get_mode(struct vm_locked vm_locked, ipaddr_t begin,
27 ipaddr_t end, uint32_t *mode);