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