]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ipf/FlushCacheRange.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / FlushCacheRange.c
1 /** @file
2 AsmFlushCacheRange() function for IPF.
3
4 Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
5 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
16 #include "BaseLibInternals.h"
17
18 /**
19 Flush a range of cache lines in the cache coherency domain of the calling
20 CPU.
21
22 Flushes the cache lines specified by Address and Length. If Address is not aligned
23 on a cache line boundary, then entire cache line containing Address is flushed.
24 If Address + Length is not aligned on a cache line boundary, then the entire cache
25 line containing Address + Length - 1 is flushed. This function may choose to flush
26 the entire cache if that is more efficient than flushing the specified range. If
27 Length is 0, the no cache lines are flushed. Address is returned.
28 This function is only available on IPF.
29
30 If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
31
32 @param Address The base address of the instruction lines to invalidate. If
33 the CPU is in a physical addressing mode, then Address is a
34 physical address. If the CPU is in a virtual addressing mode,
35 then Address is a virtual address.
36
37 @param Length The number of bytes to invalidate from the instruction cache.
38
39 @return Address.
40
41 **/
42 VOID *
43 EFIAPI
44 AsmFlushCacheRange (
45 IN VOID *Address,
46 IN UINTN Length
47 )
48 {
49 ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);
50 return InternalFlushCacheRange (Address, Length);
51 }