Attention is currently required from: Nico Huber, Angel Pons.
5 comments:
File src/cpu/x86/cache/cache.c:
bool?
Done
Patch Set #12, Line 21: ENV_POSTCAR || ENV_RAMSTAGE
`!ENV_CACHE_AS_RAM` might be a good choice, it also covers the […]
Done
Patch Set #12, Line 24: CONFIG(X86_CLFLUSH_CAR)
I'm not sure if the compiler can infer that cpuid_edx has no side-effect, so it may not be able to optimize out the code as-is.
In any case, I'd write this function as follows:
bool clflush_supported(void)
{
/* CLFLUSH while operating in CAR might not be supported by platforms */
if (ENV_CACHE_AS_RAM && !CONFIG(X86_CLFLUSH_CAR))
return false;
return !!(cpuid_edx(1) >> CPUID_FEATURE_CLFLUSH_BIT);
}
I sort of rewrote it.
Patch Set #12, Line 29: uintptr_t
types. […]
Done
RAM
Done
To view, visit change 37196. To unsubscribe, or for help writing mail filters, visit settings.