]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c
Initial import.
[mirror_edk2.git] / MdePkg / Library / BaseCacheMaintenanceLib / IpfCache.c
CommitLineData
878ddf1f 1/** @file\r
2 Cache Maintenance Functions.\r
3\r
4 Copyright (c) 2006, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15typedef struct {\r
16 UINT64 Status;\r
17 UINT64 r9;\r
18 UINT64 r10;\r
19 UINT64 r11;\r
20} PAL_PROC_RETURN;\r
21\r
22PAL_PROC_RETURN\r
23CallPalProcStatic (\r
24 IN UINT64 Arg1,\r
25 IN UINT64 Arg2,\r
26 IN UINT64 Arg3,\r
27 IN UINT64 Arg4\r
28 );\r
29\r
30VOID\r
31EFIAPI\r
32InvalidateInstructionCache (\r
33 VOID\r
34 )\r
35{\r
36 CallPalProcStatic (1, 1, 1, 0);\r
37}\r
38\r
39VOID\r
40EFIAPI\r
41WriteBackInvalidateDataCache (\r
42 VOID\r
43 )\r
44{\r
45 CallPalProcStatic (1, 2, 1, 0);\r
46}\r
47\r
48VOID *\r
49EFIAPI\r
50WriteBackInvalidateDataCacheRange (\r
51 IN VOID *Address,\r
52 IN UINTN Length\r
53 )\r
54{\r
55 WriteBackInvalidateDataCache ();\r
56 return Address;\r
57}\r
58\r
59VOID\r
60EFIAPI\r
61WriteBackDataCache (\r
62 VOID\r
63 )\r
64{\r
65 CallPalProcStatic (1, 2, 0, 0);\r
66}\r
67\r
68VOID *\r
69EFIAPI\r
70WriteBackDataCacheRange (\r
71 IN VOID *Address,\r
72 IN UINTN Length\r
73 )\r
74{\r
75 WriteBackDataCache ();\r
76 return Address;\r
77}\r
78\r
79VOID\r
80EFIAPI\r
81InvalidateDataCache (\r
82 VOID\r
83 )\r
84{\r
85}\r
86\r
87VOID *\r
88EFIAPI\r
89InvalidateDataCacheRange (\r
90 IN VOID *Address,\r
91 IN UINTN Length\r
92 )\r
93{\r
94 return Address;\r
95}\r