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