On 12.01.2008 01:18, Rudolf Marek wrote:
Imho you must copy the data from CAR, because when it is OFF, no writeback is done to memory: (from BKDG)
Temporary data stored in the cache during boot cannot be written back to DRAM after enabling the DRAM controller using a CLFLUSH or WBINVB instruction. The cache should be invalidated after the DRAM controller is initialized with an INVD instruction.
OK, then we simply copy the whole CAR area to some backup memory location, disable CAR, then INVD and copy everything back to the original location. That way, moving the stack with all of its nasty side effects will not happen.
The later is imho not done in LB I think. Maybe needs fix?
I have to reread the v2 code. Almost all BIOS code I write nowadays is either for code shared between v2 and v3 or for v3 only.
Btw please design it to be suspend-to-ram friendly ;)
Will do. Is there any specific part of the source that lists your requirements for suspend-to-RAM? IIRC resume-from-RAM enables CAR, gets RAM out of self-refresh, then jumps back to the OS. Writing to arbitrary RAM locations has to be avoided with suspend-to-RAM.
Regards, Carl-Daniel