X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FIa32%2FFlushCacheLine.asm;h=a64f96bf7e5b75fdcd7f7b58009b39049241231b;hp=124d7610609da78c88ab02a1a2654b2cf2970d7b;hb=881813d7a93d9009c873515b043c41c4554779e4;hpb=d2660fe32d000765cc5d370bdc4452fec9389b2a;ds=inline diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm index 124d761060..a64f96bf7e 100644 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
+; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at @@ -34,9 +34,20 @@ ; ); ;------------------------------------------------------------------------------ AsmFlushCacheLine PROC + ; + ; If the CPU does not support CLFLUSH instruction, + ; then promote flush range to flush entire cache. + ; + mov eax, 1 + cpuid mov eax, [esp + 4] + test edx, BIT19 + jz @F clflush [eax] ret +@@: + wbinvd + ret AsmFlushCacheLine ENDP END