]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c
Add .S file for GCC tool-chain for EfiRuntimeLib.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / RuntimeDxe / EfiRuntimeLib / ia32 / CpuFlushCache.c
CommitLineData
4b79797e 1/*++\r
2\r
3Copyright (c) 2008, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 CpuFlushCache.c\r
15\r
16Abstract:\r
17\r
18 Cpu Flush Cache Function.\r
19\r
20--*/\r
21#include "Tiano.h"\r
22#include "EfiRuntimeLib.h"\r
23\r
24//\r
25// Cache Flush Routine.\r
26//\r
27EFI_STATUS\r
28EfiCpuFlushCache (\r
29 IN EFI_PHYSICAL_ADDRESS Start,\r
30 IN UINT64 Length\r
31 )\r
32/*++\r
33\r
34Routine Description:\r
35\r
36 Flush cache with specified range.\r
37\r
38Arguments:\r
39\r
40 Start - Start address\r
41 Length - Length in bytes\r
42\r
43Returns:\r
44\r
45 Status code\r
46 \r
47 EFI_SUCCESS - success\r
48\r
49--*/\r
50{\r
51 __asm {\r
52 wbinvd\r
53 }\r
54 return EFI_SUCCESS;\r
55}\r