df's direct probe RAM function: wbinvd?
df's direct probe RAM function: wbinvd?
I was looking at the methods for counting memory on the OS Faq here and reading the function DF wrote for direct probing the RAM for size. I followed it throughout most of the goings on, but I don't see why it's necessary to dump the CPU and external caches to count RAM...what's happening?
Re:df's direct probe RAM function: wbinvd?
you shouldnt use that function probing ram is bad.
as for the wbinvd, you dont want the caches ghosting any addresses that dont physically exist.
as for the wbinvd, you dont want the caches ghosting any addresses that dont physically exist.
-- Stu --
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:df's direct probe RAM function: wbinvd?
the cache does not know about valid/invalid addresses.wangpeng wrote: I don't see why it's necessary to dump the CPU and external caches to count RAM...what's happening?
Code: Select all
CPU: write "0x55AA55AA" to 0x12345600
Cache: read line from memory,
-- as no memory chip will respond, a "0xFFFFFFFF" word will be read from the data bus.
Cache: combine with cpu-written word:
[0x12345600]->[55AA55AA-FFFFFFFF-FFFFFFFF-FFFFFFFF]
Cache: write back
-- no memory chip will get that line, as 0x12345600 is out of the physical available memory
By invalidating the cache, it will lead to
Code: Select all
CPU : read 0x12345600
Cache : no entry for 0x12345600, ask memory
-- no memory chip respond : a "ffff" line is read out of the data bus
Cache : [0x12345600] --> [FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF]
Reply to CPU with 0xFFFFFFFF.
Re:df's direct probe RAM function: wbinvd?
Ah, okay. That makes a lot of sense. As for not memory probing...I guess I'll just have to use the BIOS info . At least now I know another opcode