Okay, I know I've been asking for a lot of help lately, and I'm really sorry. This should be the last time, for now ;-) The vga bios on the jetway j7f2we1g is causing errors any time I try to load it, sometimes boot continues anyways but vga never initializes. Attached are 2 patches (one for the vt8237r, the other for everything else, not ready for commit by any means) and a log file, for both vm86.c (hacked up from the epia-m) and x86emu. The VGA rom I've been using I extracted with awardeco and is available for now here: http://rapidshare.com/files/48880059/E14JTWAY.ROM.html (only for testing/inspection purposes, will be removed once this is running or upon request from Via or Jetway).
I've tried roms from the original and latest jetway bios (that is from the original), and also one from a via epia-cn, all give the same result. Any help would be greatly appreciated.
-Corey
* Corey Osgood corey.osgood@gmail.com [070814 10:18]:
Initiailizing VGA... INSTALL REAL-MODE IDT DO THE VGA BIOS found VGA: vid=1106, did=3344 rom base, size: fff80000 bus/devfn = 0x100 biosint: INT# 0x6 biosint: eax 0x9f98 ebx 0x1c380 ecx 0x29f98 edx 0x12 biosint: ebp 0x29f74 esp 0xff6 edi 0x3d esi 0x3b4 biosint: ip 0x3 cs 0xc000 flags 0x46 biosint: Oops, exception 6 Stack contents: 0x0003 0xc000 0x0046 0x97e7 0x0000 biosint: Bailing out Enable VGA console
<hang>
This is an "invalid opcode". Weird though, c0003 seems to be a normal jmp. Can you dump 0xc0000 to see if the copy worked?
PCI: 01:00.0 init Initiailizing VGA... Forcing rom load copying VGA ROM Image from 0xfff80000 to 0xc0000, 0x10000 bytes entering emulator halt_sys: file /home/amp/linuxbios/LinuxBIOSv2/src/devices/emulator/x86emu/ops.c, line 5100
<hang>
On Tue, Aug 14, 2007 at 04:18:12AM -0400, Corey Osgood wrote:
I've tried roms from the original and latest jetway bios (that is from the original), and also one from a via epia-cn, all give the same result. Any help would be greatly appreciated.
Please do dump say 1024 bytes at 0xc0000 before doing the BIOS init.
Oh, and please try to get it working without vgabios.c if you can, those files are just horrible. :\
//Peter
Peter Stuge wrote:
On Tue, Aug 14, 2007 at 04:18:12AM -0400, Corey Osgood wrote:
I've tried roms from the original and latest jetway bios (that is from the original), and also one from a via epia-cn, all give the same result. Any help would be greatly appreciated.
Please do dump say 1024 bytes at 0xc0000 before doing the BIOS init.
Oh, and please try to get it working without vgabios.c if you can, those files are just horrible. :\
//Peter
Alright, I'll give it a shot. I assume you mean after the bios is copied, but before it runs?
-Corey
Peter Stuge wrote:
On Tue, Aug 14, 2007 at 09:53:44PM -0400, Corey Osgood wrote:
Please do dump say 1024 bytes at 0xc0000 before doing the BIOS init.
Alright, I'll give it a shot. I assume you mean after the bios is copied, but before it runs?
Yep.
//Peter
Okay, did that, along with a ram_check of the entire region. ram_check failed, but the bios copy seems to have worked fine (???). So I figured out there was an error in auto.c, the pci_write_config8(ctrl->d0, 0x4f, 0x1) should have been before enable_shadow_ram(). I've fixed that, and the bios copy still works fine, x86emu still has an error at line 5100 fo ops.c, but vm86.c produces a different error now, posted below. Also, the screen now turns on and comes up completely green, only with vm86.c. Also, I've been looking at the msrs from linuxbios and the factory bios, the factory bios sets up a single msr to cover the entire 512mb range, then has another msr for the last 32mb (480-512mb), presumably the vga framebuffer area. A third msr covers 479-480, dunno why, and a fourth msr is off in deep space at the 4gb range, I assume this is acpi space. I'm wondering if I need to be simulating this, setting up an msr to cover the 480-512mb range, or if the vga bios handles this.
Thanks, Corey
PCI: 01:00.0 init Initiailizing VGA... INSTALL REAL-MODE IDT DO THE VGA BIOS found VGA: vid=1106, did=3344 rom base, size: fff80000 bus/devfn = 0x100 biosint: INT# 0x6 biosint: eax 0x5f0b ebx 0x10100 ecx 0x60 edx 0x110 biosint: ebp 0x29f74 esp 0xfbe edi 0x1 esi 0xb2d4 biosint: ip 0xf85e cs 0xf000 flags 0x13 biosint: Oops, exception 6 Stack contents: 0xf85e 0xf000 0x0013 0xd163 0xc000 0x0006 0x0342 0xd89b 0x0342 0x0060 0x0044 0xb2d4 0x9f74 0x0fe2 0x0100 0x0110 0x0060 0x0342 0xb18d 0x0044 0x03b4 0x9f74 0x0ff4 0x0200 0x03c2 0x0060 0x0000 0x014e 0x9f74 0x0040 0x0046 0x97e7 0x0000 biosint: Bailing out Enable VGA console biosint: INT# 0x6 biosint: eax 0x5f08 ebx 0x8001 ecx 0x1 edx 0x0 biosint: ebp 0x20fd0 esp 0xfa8 edi 0x1 esi 0x8f30 biosint: ip 0xf85e cs 0xf000 flags 0x213 biosint: Oops, exception 6 Stack contents: 0xf85e 0xf000 0x0213 0xd125 0xc000 0x0206 0x0000 0x8003 0x9824 0x898e 0x956d 0x898e 0x9dfb 0x898e 0xa60b 0x4f14 0x86ec 0x863a 0x8600 0x86a2 0x0000 0x0000 0x03b4 0x0000 0x9f90 0x0002 0x0ff0 0x0000 0x8003 0x0000 0x0000 0x0000 0x0001 0x0000 0x4f14 0x0000 0x0000 0x0000 0x87c9 0xc000 0x0006 0x966d 0x0000 0x0046 biosint: Bailing out Unexpected Exception: 6 @ 10:ffefbfff - Halting Code: 0 eflags: 00010006 eax: 0000ffff ebx: 000003b5 ecx: 04000000 edx: 5e000018 edi: 0000003d esi: 000003b4 ebp: 00029f7c esp: 00029f60
Corey Osgood wrote:
Also, I've been looking at the msrs from linuxbios and the factory bios, the factory bios sets up a single msr to cover the entire 512mb range, then has another msr for the last 32mb (480-512mb), presumably the vga framebuffer area.
Should have mentioned this range is marked as UC, the others are marked as WB, IIRC. And I really meant mtrr, not msr, been reading too many of the geodelx posts I guess.
-Corey
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Corey,
I cant tell more than this code:
To be distributed under GPL:
//WARNING NEED to copy some registers from NB to SB (D0F3 -> D0F7)
{
device_t devFUNNB3 = dev_find_device(PCI_VENDOR_ID_VIA, 0x3238, 0);
u8 regm, regm2;
//shadow CTRL
regm = pci_read_config8(devFUNNB3,0x88);
writeback(dev, 0x57, regm);
//shadow REGION 1
regm = pci_read_config8(devFUNNB3,0x80);
writeback(dev, 0x61, regm);
//shadow REGION 2
regm = pci_read_config8(devFUNNB3,0x81);
writeback(dev, 0x62, regm);
//shadow REGION 3
regm = pci_read_config8(devFUNNB3,0x86);
writeback(dev, 0xe6, regm);
regm = pci_read_config8(devFUNNB3,0x83);
regm2 = pci_read_config8(dev,0x63);
pci_write_config8(dev,0x63, (regm2 & 0xC0) | (regm & 0x3F));
}
Rudolf
* Corey Osgood corey.osgood@gmail.com [070816 06:05]:
biosint: ip 0xf85e cs 0xf000 flags 0x13
Does it try to jump to 0xf000:0xf85e at some point?
This seems to be a common "trick", it happened to their Epia ML5000 option rom as well: http://linuxbios.org/pipermail/linuxbios/2006-April/013899.html http://linuxbios.org/pipermail/linuxbios/2006-April/013907.html
Stefan
* Corey Osgood corey.osgood@gmail.com [070816 06:05]:
biosint: ip 0xf85e cs 0xf000 flags 0x13
LinuxBIOSv2/util/vgabios/helper_mem.c had some code that would set up parts of 0xf000:0xXXXX to look like a BIOS:
/* int 11 default location (Get Equipment Configuration) */ MEM_WW(0x11 << 2, 0xf84d); /* int 12 default location (Get Conventional Memory Size) */ MEM_WW(0x12 << 2, 0xf841); /* int 15 default location (I/O System Extensions) */ MEM_WW(0x15 << 2, 0xf859); /* int 1A default location (RTC, PCI and others) */ MEM_WW(0x1a << 2, 0xff6e); /* int 05 default location (Bound Exceeded) */ MEM_WW(0x05 << 2, 0xff54); /* int 08 default location (Double Fault) */ MEM_WW(0x08 << 2, 0xfea5); /* int 13 default location (Disk) */ MEM_WW(0x13 << 2, 0xec59); /* int 0E default location (Page Fault) */ MEM_WW(0x0e << 2, 0xef57); /* int 17 default location (Parallel Port) */ MEM_WW(0x17 << 2, 0xefd2); /* fdd table default location (int 1e) */ MEM_WW(0x1e << 2, 0xefc7);
Either this, or you could copy a bochs bios there?