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