]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / FlushCacheLine.c
1 /** @file
2 AsmFlushCacheLine function
3
4 Copyright (c) 2006 - 2008, 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
17
18 /**
19 Flushes a cache line from all the instruction and data caches within the
20 coherency domain of the CPU.
21
22 Flushed the cache line specified by LinearAddress, and returns LinearAddress.
23 This function is only available on IA-32 and x64.
24
25 @param LinearAddress The address of the cache line to flush. If the CPU is
26 in a physical addressing mode, then LinearAddress is a
27 physical address. If the CPU is in a virtual
28 addressing mode, then LinearAddress is a virtual
29 address.
30
31 @return LinearAddress
32 **/
33 VOID *
34 EFIAPI
35 AsmFlushCacheLine (
36 IN VOID *LinearAddress
37 )
38 {
39 _asm {
40 mov eax, LinearAddress
41 clflush [eax]
42 }
43 }
44