<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 10, 2016 at 3:34 AM Zoran Stojsavljevic <<a href="mailto:zoran.stojsavljevic@gmail.com">zoran.stojsavljevic@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><div style="font-size:12.8px">> Basically, in the classic car we got in 2005, the steps on x86 are:</div><div style="font-size:12.8px">> enable cache</div><div style="font-size:12.8px"><b><i><u><font color="#ff0000">> do references to set tags</font></u></i></b></div><div style="font-size:12.8px">> disable cache (really!)</div><div style="font-size:12.8px">> then cache as ram works.</div></div><div style="font-size:12.8px"><br></div></div><div dir="ltr"><div style="font-size:12.8px">I am interested how this is implemented, in <u><i><b><font color="#ff0000">RED</font></b></i></u> (if you can point to some Coreboot implementation)?</div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></div></div></blockquote><div><br></div><div>It varies with CPU. In most cases, it involves enabling the cache, sometimes messing around with an MSR, then reading/writing memory which is not functional, but the write sets the tags, so later when you set CD you can use cache and it won't try to load lines/writeback lines. Some chipsets need to be told not to wedge or reset or go crazy when that happens, but it works one way or another.</div><div><br></div><div>It's all very weird and not nearly as clean as the power pc. Power PC is where we first used CAR for linuxbios, ca. 2001. It took us another 4 years to learn how to do it on x86, and the vendors keep changing it on us :-)</div><div><br></div><div>I like the ARM SRAM approach. I asked the RISCV vendors to do the same thing. As can be seen with the various x86 CPUs, CAR just gets messy over time. </div><div><br></div><div>oh, and, that paper? <a href="https://www.coreboot.org/images/6/6c/LBCar.pdf">https://www.coreboot.org/images/6/6c/LBCar.pdf</a></div><div>It's a great writeup. See page 21. Note how simple that code is. Compare it to the newer chipsets. </div><div><br></div><div>Note that CD really means "no fill". At the same I commented that the words "Cache Disable" were, to many, evocative of "disabling the cache". My bet is CD used to mean cache disable, and the alternative meaning came later when CAR was implemented.</div><div><br></div><div>ron </div></div></div>