]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Include/Library/ArmMmuLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ArmPkg / Include / Library / ArmMmuLib.h
1 /** @file
2
3 Copyright (c) 2015 - 2016, Linaro Ltd. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef ARM_MMU_LIB_H_
10 #define ARM_MMU_LIB_H_
11
12 #include <Uefi/UefiBaseType.h>
13
14 #include <Library/ArmLib.h>
15
16 EFI_STATUS
17 EFIAPI
18 ArmConfigureMmu (
19 IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable,
20 OUT VOID **TranslationTableBase OPTIONAL,
21 OUT UINTN *TranslationTableSize OPTIONAL
22 );
23
24 EFI_STATUS
25 EFIAPI
26 ArmSetMemoryRegionNoExec (
27 IN EFI_PHYSICAL_ADDRESS BaseAddress,
28 IN UINT64 Length
29 );
30
31 EFI_STATUS
32 EFIAPI
33 ArmClearMemoryRegionNoExec (
34 IN EFI_PHYSICAL_ADDRESS BaseAddress,
35 IN UINT64 Length
36 );
37
38 EFI_STATUS
39 EFIAPI
40 ArmSetMemoryRegionReadOnly (
41 IN EFI_PHYSICAL_ADDRESS BaseAddress,
42 IN UINT64 Length
43 );
44
45 EFI_STATUS
46 EFIAPI
47 ArmClearMemoryRegionReadOnly (
48 IN EFI_PHYSICAL_ADDRESS BaseAddress,
49 IN UINT64 Length
50 );
51
52 VOID
53 EFIAPI
54 ArmReplaceLiveTranslationEntry (
55 IN UINT64 *Entry,
56 IN UINT64 Value,
57 IN UINT64 RegionStart
58 );
59
60 EFI_STATUS
61 ArmSetMemoryAttributes (
62 IN EFI_PHYSICAL_ADDRESS BaseAddress,
63 IN UINT64 Length,
64 IN UINT64 Attributes
65 );
66
67 #endif // ARM_MMU_LIB_H_