• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2 
3   Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
4   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 **/
13 
14 #include <Uefi.h>
15 #include <Library/BaseLib.h>
16 #include <Library/CacheAsRamLib.h>
17 
18 /**
19   This function disable CAR.
20 
21   @param[in] DisableCar       TRUE means use INVD, FALSE means use WBINVD
22 
23 **/
24 VOID
25 EFIAPI
DisableCacheAsRam(IN BOOLEAN DisableCar)26 DisableCacheAsRam (
27   IN BOOLEAN                   DisableCar
28   )
29 {
30   //
31   // Disable CAR
32   //
33 
34   if (DisableCar) {
35     AsmInvd ();
36   } else {
37     AsmWbinvd();
38   }
39 
40   return ;
41 }
42