4 static inline unsigned long read_cr0(void)
7 asm volatile ("movl %%cr0, %0" : "=r" (cr0));
11 static inline void write_cr0(unsigned long cr0)
13 asm volatile ("movl %0, %%cr0" : : "r" (cr0));
16 static inline void invd(void)
18 asm volatile("invd" ::: "memory");
20 static inline void wbinvd(void)
22 asm volatile ("wbinvd");
25 static inline void enable_cache(void)
33 static inline void disable_cache(void)
35 /* Disable and write back the cache */
44 #if !defined( __ROMCC__) && !defined(__PRE_RAM__) && defined (__GNUC__)
45 void x86_enable_cache(void);
46 #endif /* !__ROMCC__ */
48 #endif /* CPU_X86_CACHE */