Need to patch PCI configuration table in Award BIOS 4.51PG

Only for programmers and BIOS gurus with technical questions.
Post Reply
oalexandre
New visitors - please read the rules.
Posts: 12
Joined: Sat Sep 21, 2002 6:32 pm

Sun Sep 22, 2002 3:23 pm

I've got a M577 mainboard with an Award BIOS 4.51PG and wanted to fia a PnP problem with a SCSI adapter card. After much searching and posting on forums I found another BIOS form a similar motherboard what fixed that problem, but the new BIOS has another map for PCI devices and MODBIN doesn't let you change those settings.

Does anybody know the way to change the PCI Configuration table?
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Sun Sep 22, 2002 3:47 pm

I did that a couple of times. You need to decompress the main block (usually called original.tmp). Then search for the numbers using hex editor (e.g. if the numbers in MODBIN are 0D, 0E and 0F, search for byte sequence 0Dh, 0Eh, 0Fh) and change them to new values.
You also need to edit PCI IRQ routing table so IRQ routing will work in Windows 98 and up. Search for $PIR in main block. After this signature, there will be some 16b long entries for PCI slots. Each entry begins with 00h, then the slot number shl 3, then another bytes and ends with 00h. In the 0Dh 0Eh 0Fh case, the numbers should be 68h (0Dh shl 3), 70h (0Eh shl 3) and 78h (0Fh shl 3). Usually there's one more entry with number 39h - that's for onboard peripherals.
After editing, you need to compress the BIOS again - I posted a guide somewhere in the forum (regarding HDD size detection).
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
oalexandre
New visitors - please read the rules.
Posts: 12
Joined: Sat Sep 21, 2002 6:32 pm

Sun Sep 22, 2002 5:44 pm

Ok, I find those values and changed them in the decompressed BIOS image, but after that i tried to load it into modbin and got a checksum error!!! :( So, after modify the BIOS image, I have to recalculate and change the checksum, how?????
NickS
BIOS Bodhisattva
Posts: 3145
Joined: Fri May 03, 2002 10:34 am
Location: Thames Valley, UK

Sun Sep 22, 2002 5:51 pm

Tested patched BIOSes. Untested patched BIOSes.
Emails *will* be ignored unless the subject line starts "Wim's BIOS forum"
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Sun Sep 22, 2002 7:12 pm

Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
oalexandre
New visitors - please read the rules.
Posts: 12
Joined: Sat Sep 21, 2002 6:32 pm

Mon Sep 23, 2002 11:26 pm

M577 BIOS patching: the whole story

I've got a PC-Chips M577 mainboard with the 990306S BIOS and a Symbios 53C815 SCSI adapter with SDMS BIOS. No problems until I decided to upgrade the Symbios BIOS to the 4.12 version, which supports booting from CD-ROMs. After several EPROMs wasted (because at first I didn't know where to put the 32K BIOS code on the 64K chip), I managed it to install, but my mainboard didn't recognized the new BIOS and loaded the old NCR 3.07 version instead (removing this code with CBROM didn't solve this problem).

I also tried the Jan Steunebrink's patched PC-Chips M577/Amptron PM9900 BIOS and got an INT 13h exception fault when booting Win98 (as I've got a 30 GB IDE HDD, I don't really need this one). After serching the Internet, I found an almost-twin brother of M577, the Chaintech 5AGM2 board, and downloaded its BIOS at http://www.chaintech.de/BIOS/586/5AGM2B02.EXE, flashed it and booted successfully, loading the Symbios BIOS, but unfortunately PCI device numbers were different from the M577 (0D, 0E and 0F instead of 08, 09 and 0A), so PCI cards won't be assigned IRQs :(

I tried twice to patch this BIOS following Rainbow's expertised instructions, but I failed both times and had to go to the EPROM programer service (the same people who burnt my SCSI BIOSes) .... Not only does the 5AGM2 BIOS solve my problem, but also Chaintech's web page claims it to be patched for the >32 GB bug, and furthermore, it has much more chipset features available than the M577.

With all these benefits, I think I would be a good idea if Rainbow could do the patching and then post the BIOS at his web site to made it available to community users.

What do you think of it, Rainbow?
Komponent
New visitors - please read the rules.
Posts: 3
Joined: Fri Jan 03, 2014 6:42 am

Fri Jan 03, 2014 6:56 am

Rainbow wrote:I did that a couple of times. You need to decompress the main block (usually called original.tmp). Then search for the numbers using hex editor (e.g. if the numbers in MODBIN are 0D, 0E and 0F, search for byte sequence 0Dh, 0Eh, 0Fh) and change them to new values.
You also need to edit PCI IRQ routing table so IRQ routing will work in Windows 98 and up. Search for $PIR in main block. After this signature, there will be some 16b long entries for PCI slots. Each entry begins with 00h, then the slot number shl 3, then another bytes and ends with 00h. In the 0Dh 0Eh 0Fh case, the numbers should be 68h (0Dh shl 3), 70h (0Eh shl 3) and 78h (0Fh shl 3). Usually there's one more entry with number 39h - that's for onboard peripherals.
After editing, you need to compress the BIOS again - I posted a guide somewhere in the forum (regarding HDD size detection).
I did exactly that and it didn't change the device number.
Here is my problem:
I have this motherboard:
http://www.ecsusa.com/ECSWebSite/Produc ... 24&LanID=0
The Device Number por the pci slots are:
PCI1 - DEV 8 (IDSEL=AD19)
PCI2 - DEV 9 (IDSEL=AD20)
PCI3 - DEV 10(IDSEL=AD21)
For my project I need to change the device number for one PCI slot, let's choose the second one, so IDSEL=AD16, so I will then have:
PCI2 - DEV 5 (28 HEX after shl 3)
I followed the exact instructions above, flashed the BIOS, yet if I plug a PCI card in the slot, it still reads a Device Number of 9, not 5 (modbin and awdbedit show 5).
Please, do you have any ideeas?
gandhig
New visitors - please read the rules.
Posts: 13
Joined: Fri Nov 15, 2013 7:48 am

Fri Jan 03, 2014 8:41 pm

Did you disassemble the original.tmp fully and replaced all the references to the old slot no. with the new no?
Komponent
New visitors - please read the rules.
Posts: 3
Joined: Fri Jan 03, 2014 6:42 am

Sat Jan 04, 2014 1:00 am

No, I only did as instructed above and made those 2 changes. If you know how to do it, can you have a look at it?
gandhig
New visitors - please read the rules.
Posts: 13
Joined: Fri Nov 15, 2013 7:48 am

Sat Jan 04, 2014 2:52 pm

I'm not an expert or something. but I can give it a try if it is not much different from mine that I recently disassembled. which bios version are you using? Can you send the disassembled bios so that I can continue from there?
Komponent
New visitors - please read the rules.
Posts: 3
Joined: Fri Jan 03, 2014 6:42 am

Fri Jan 10, 2014 5:06 pm

I'm not a programmer.
It's this BIOS:
http://eudownload.ecs.com.tw/dlfileecs/ ... m2_10d.exe

Anybody has an idea about how to change device number for a PCI slot?
gandhig
New visitors - please read the rules.
Posts: 13
Joined: Fri Nov 15, 2013 7:48 am

Tue Jan 21, 2014 11:16 am

hi, your mainboard's bios has lot of code-wise similarities to my motherboard's bios. but the platform and chipset are entirely different. i'm trying my best to understand the issue. will update if i find something.

meanwhile if you happen to come across the datasheet of this chipset (VT8378/VT8237), share it with us.
edwin
The Hardware Archivist
Posts: 6227
Joined: Wed Mar 20, 2002 7:11 pm
Location: Netherlands
Contact:

Tue Jan 21, 2014 2:29 pm

That datasheet is under NDA from VIA technologies. Only the large OEMs and developers are allowed to have it...
edwin/evasive

Do not assume anything

System error, strike any user to continue...
Post Reply