At 07:45 PM 7/5/2004 -0700, Brian wrote:

> "Fix time, effort, and turnaround? Probably moderately easy if the driver
> isn't depending on an advanced feature which FreeDOS EMM386 doesn't support
> (e.g. re-mapping the interrupt vectors or VDUs usage)".


Thank You! I have every confidence that you can fix this problem. I know you guys spend a lot of time working on FreeDos apps and the last thing you want to hear from is some guy like me with problems, but I just want to let you know that I'm very appreciative for all of your efforts and hard work! Thanks again for your time.

So, it took a big chunk of two days, but I think I found and fixed the problem. At least SBLOAD runs until initialization here, where it used to hard crash.


If you're interested in the gory details, they are as follows:

EMM386 erroneously specified the length of the global descriptor table when setting up its GDT instead of using the limit (basically size relative 0) so the GDT limit was +1 byte from reality. Since there are a few unused entries at the end of the GDT anyway, this typically never created a problem. However, SoundBlaster drivers are particularly sneaky and seek out and jam several of their own entries into EMM386's GDT. SB uses the stored GDT limit value to figure out how to walk EMM386's GDT entries starting from the end and find three blank entries in a row it can use. Since the GDT limit value was actually the size value, the location of the entry values SB was stuffing in EMM386's GDT were off by one byte in an 8-byte entry. Ultimately, this meant woefully incorrect and invalid values were being placed in the GDT, and when control was returned to EMM386 by the SB driver after the GDT changes, the CPU became quite distressed by the now invalid nature of the GDT and crashed.

And if you read to the end of that last paragraph, give yourself a treat.

I'll make a bugfixed EMM386 available soon.




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to