Hi Kevin,
2012/9/11 Kevin O'Connor kevin@koconnor.net:
On Mon, Sep 03, 2012 at 12:37:53PM -0400, Kevin O'Connor wrote:
Hi Christian,
It would be nice if the geode code could use the same style register access functions that the stdvga code uses. I put together a patch (totally untested) below. Is this okay?
FYI - I pushed this patch.
something is wrong with this patch... or even logical :/
If I extend the function static u64 geode_msr_read(u32 msrAddr) to print out the full 64 bit value and hi and lo 32 bit values I get some strange results.
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c index a5a577c..e4136cc 100644 --- a/vgasrc/geodevga.c +++ b/vgasrc/geodevga.c @@ -33,9 +33,30 @@ static u64 geode_msr_read(u32 msrAddr) : "c"(msrAddr) : "cc" ); + + dprintf(1, "full: 0x%llx\n", val.val); + dprintf(1, " hi: 0x%x\n", val.hi); + dprintf(1, " lo: 0x%x\n", val.lo); + return val.val; }
full: 0x7fffd0002127e0fd hi: 0x2127e0fd lo: 0x7fffd000 pmax: 0x212 pmin: 0x7e0fd 2131032 KB of video memory at 0xfd000000
Following problems: 1) 2131032 KB is wrong 2) hi and lo are swapped
If I revert your patch I get this:
pmax: 0xfd7ff pmin: 0xfd000 8192 KB of video memory at 0xfd000000
Any idea? --- Christian Gmeiner, MSc