DisableCacheAsRamNull.c 551 B

1234567891011121314151617181920212223242526272829303132333435
  1. /** @file
  2. Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. **/
  5. #include <Uefi.h>
  6. #include <Library/BaseLib.h>
  7. #include <Library/CacheAsRamLib.h>
  8. /**
  9. This function disable CAR.
  10. @param[in] DisableCar TRUE means use INVD, FALSE means use WBINVD
  11. **/
  12. VOID
  13. EFIAPI
  14. DisableCacheAsRam (
  15. IN BOOLEAN DisableCar
  16. )
  17. {
  18. //
  19. // Disable CAR
  20. //
  21. if (DisableCar) {
  22. AsmInvd ();
  23. } else {
  24. AsmWbinvd();
  25. }
  26. return ;
  27. }