coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cache.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
3 #ifndef ARCH_CACHE_H
4 #define ARCH_CACHE_H
5 
6 #include <cpu/x86/cache.h>
7 
8 /* Executing WBINVD when running out of CAR would not be good, prevent that. */
9 static inline void dcache_clean_invalidate_all(void)
10 {
11  if (!ENV_CACHE_AS_RAM)
12  wbinvd();
13 }
14 static inline void dcache_clean_all(void)
15 {
16  /* x86 doesn't have a "clean without invalidate", fall back to both. */
18 }
19 static inline void dcache_invalidate_all(void)
20 {
21  if (!ENV_CACHE_AS_RAM)
22  invd();
23 }
24 
25 #endif /* ARCH_CACHE_H */
void dcache_invalidate_all(void)
Definition: cache.c:22
void dcache_clean_all(void)
Definition: cache.c:14
void dcache_clean_invalidate_all(void)
Definition: cache.c:18
static void wbinvd(void)
Definition: cache.h:15
static void invd(void)
Definition: cache.h:20
#define ENV_CACHE_AS_RAM
Definition: rules.h:275