]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ArmPkg / Library / ArmLib / Arm / ArmV7Lib.h
1 /** @file
2
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef ARM_V7_LIB_H_
10 #define ARM_V7_LIB_H_
11
12 #define ID_MMFR0_SHARELVL_SHIFT 12
13 #define ID_MMFR0_SHARELVL_MASK 0xf
14 #define ID_MMFR0_SHARELVL_ONE 0
15 #define ID_MMFR0_SHARELVL_TWO 1
16
17 #define ID_MMFR0_INNERSHR_SHIFT 28
18 #define ID_MMFR0_INNERSHR_MASK 0xf
19 #define ID_MMFR0_OUTERSHR_SHIFT 8
20 #define ID_MMFR0_OUTERSHR_MASK 0xf
21
22 #define ID_MMFR0_SHR_IMP_UNCACHED 0
23 #define ID_MMFR0_SHR_IMP_HW_COHERENT 1
24 #define ID_MMFR0_SHR_IGNORED 0xf
25
26 typedef VOID (*ARM_V7_CACHE_OPERATION)(
27 UINT32
28 );
29
30 VOID
31 ArmV7AllDataCachesOperation (
32 IN ARM_V7_CACHE_OPERATION DataCacheOperation
33 );
34
35 VOID
36 EFIAPI
37 ArmInvalidateDataCacheEntryBySetWay (
38 IN UINTN SetWayFormat
39 );
40
41 VOID
42 EFIAPI
43 ArmCleanDataCacheEntryBySetWay (
44 IN UINTN SetWayFormat
45 );
46
47 VOID
48 EFIAPI
49 ArmCleanInvalidateDataCacheEntryBySetWay (
50 IN UINTN SetWayFormat
51 );
52
53 /** Reads the ID_MMFR4 register.
54
55 @return The contents of the ID_MMFR4 register.
56 **/
57 UINT32
58 EFIAPI
59 ArmReadIdMmfr4 (
60 VOID
61 );
62
63 UINTN
64 EFIAPI
65 ArmReadIdPfr1 (
66 VOID
67 );
68
69 #endif // ARM_V7_LIB_H_