[Xorg-driver-geode] switching consoles with GeodeLX

Bart Trojanowski bart at jukie.net
Fri Feb 1 12:48:55 PST 2008


* Bart Trojanowski <bart at jukie.net> [080131 22:38]:
> Interestingly enough, the ILLEGAL OPCODE message is only displayed on
> the first exit from X...

A bit on why the opcode message only shows up the first time.
The code in LXLeaveGraphics() looks like this:

    if (pGeode->useVGA && pGeode->VGAActive) {
        pGeode->vesa->pInt->num = 0x10;
        pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode;
        pGeode->vesa->pInt->bx = 0;
        xf86ExecX86int10(pGeode->vesa->pInt);
        vg_delay_milliseconds(3);
    }                     

... this is supposed to reset the mode back to whatever it was before X.
It so happens that while useVGA is always on, VGAActive is on the first
time, and off any subsequent time.

Forcing the if statement to always execute generates the ILLEGAL
OPCODE message each time.

    c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE!

... and that's probably why the mode is not restored.  FBBIOSMode is set
to 0 (40x25 CGA mode) and other times 3.  I'll try to play with the
FBBIOSMode settings.  

The FBBIOSMode comes from LXEnterGraphics()

    if (pGeode->useVGA && pGeode->VGAActive) {
        vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
        pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040);
    }

There is a bit of magic there, so I will have to trace it back to X and
see what readCrtc() actually returns.

Martin-Eric has mentioned to me that this had worked with vm86.  If I
don't get anywhere with x86emu, I will try to build with vm86 and see
what happens.

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/


More information about the Xorg-driver-geode mailing list