Flushing writes in buffer of Memory Controller to DDR device

Posted by Rohit on Stack Overflow See other posts from Stack Overflow or by Rohit
Published on 2014-05-30T20:48:06Z Indexed on 2014/05/30 21:26 UTC
Read the original article Hit count: 221

Filed under:
|
|
|
|

At some point in my code, I need to push the writes in my code all the way to the DIMM or DDR device. My requirement is to ensure the write reaches the row,ban,column of the DDR device on the DIMM. I need to read what I've written to the main memory. I do not want caching to get me the value. Instead after writing I want to fetch this value from main memory(DIMM's).

So far I've been using Intel's x86 instruction wbinvd(write back and invalidate cache). However this means the caches and TLB are flushed. Write-back requests go to the main memory. However, there is a reasonable amount of time this data might reside in the write buffer of the Memory Controller( Intel calls it integrated memory controller or IMC). The Memory Controller might take some more time depending on the algorithm that runs in the Memory Controller to handle writes.

Is there a way I force all existing or pending writes in the write buffer of the memory controller to the DRAM devices ??

What I am looking for is something more direct and more low-level than wbinvd. If you could point me to right documents or specs that describe this I would be grateful.

Generally, the IMC has a several registers which can be written or read from. From looking at the specs for that for the chipset I could not find anything useful.

Thanks for taking the time to read this.

© Stack Overflow or respective owner

Related posts about c

    Related posts about memory