mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-06 10:44:41 +00:00
hv: prevent WBINVD after psram is initialized
Prevent WBINVD to be called after psram is initialized, otherwise the content of pSRAM will be destroyed. Tracked-On: #5330 Signed-off-by: Qian Wang <qian1.wang@intel.com>
This commit is contained in:
parent
928bc38bf6
commit
af62d57567
@ -150,9 +150,11 @@ void flush_address_space(void *addr, uint64_t size);
|
||||
*/
|
||||
void invept(const void *eptp);
|
||||
|
||||
extern volatile bool psram_is_initialized;
|
||||
static inline void cache_flush_invalidate_all(void)
|
||||
{
|
||||
asm volatile (" wbinvd\n" : : : "memory");
|
||||
if (psram_is_initialized == false)
|
||||
asm volatile (" wbinvd\n" : : : "memory");
|
||||
}
|
||||
|
||||
static inline void clflush(const volatile void *p)
|
||||
|
Loading…
Reference in New Issue
Block a user