[coreboot] rfc - gcc builtins and memset memcpy memmove memcmp

Arne Georg Gleditsch arne.gleditsch at numascale.com
Sat Sep 11 13:00:32 CEST 2010

"Scott Duplichan" <scott at notabs.org> writes:
> In this report:
> http://article.gmane.org/gmane.linux.bios/57707,
> Arne may have been encountering the ClLinesToNbDis issue
> (assuming the memset code was running from flash). Switching
> to rep movs would greatly improve performance because unlike
> a byte loop, rep movs loops in microcode which does not cause
> continuous flash memory accesses.

This was my assumption as well.  After fixing the ClLinesToNbDis
setting, I have removed the rep stosb code from my tree, and so far I've
not observed the pathological memset behaviour that caused me to put it
in in the first place.  (As mentioned earlier this was never altogether
deterministic, I'm assuming some critical part of the original memset
loop needed to straddle cache lines or something for it to manifest.)


More information about the coreboot mailing list