]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S
Fixed issues compiling for Apple gcc on IA-32
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / RuntimeDxe / EfiRuntimeLib / Ia32 / CpuFlushCache.S
1 #/*++
2 #
3 #Copyright (c) 2008, Intel Corporation
4 #All rights reserved. This program and the accompanying materials
5 #are licensed and made available under the terms and conditions of the BSD License
6 #which accompanies this distribution. The full text of the license may be found at
7 #http://opensource.org/licenses/bsd-license.php
8 #
9 #THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 #WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 #
12 #Module Name:
13 #
14 #CpuFlushCache.c
15 #
16 #Abstract:
17 #
18 #Cpu Flush Cache Function.
19 #
20 #--*/
21 #---------------------------------------------------------------------------
22 #include <EfiBind.h>
23
24 .586p:
25 #.MODEL flat,C
26 .code:
27
28 #---------------------------------------------------------------------------
29 .globl ASM_PFX(EfiCpuFlushCache)
30
31 #
32 #//
33 #// Cache Flush Routine.
34 #//
35 #EFI_STATUS
36 #EfiCpuFlushCache (
37 #IN EFI_PHYSICAL_ADDRESS Start,
38 # IN UINT64 Length
39 #)
40 #/*++
41 #
42 #Routine Description:
43 #
44 #Flush cache with specified range.
45 #
46 #Arguments:
47 #
48 #Start - Start address
49 # Length - Length in bytes
50 #
51 #Returns:
52 #
53 #Status code
54 #
55 #EFI_SUCCESS - success
56 #
57 #--*/
58 ASM_PFX(EfiCpuFlushCache):
59 wbinvd
60 xorl %eax, %eax
61 ret