Recently, I'm frustrated to find a flash rom chip for my new realtek RTL8139 NIC to continue my "OS_in_PCI_Expansion-ROM" project, being unable to find such a chip that would work with my new card, I came across the idea of really hacking a different kind of PCI card that initially have flash rom chip from it's manufacturer to ease the continuation of my project. PCI spec 2.1 and 2.2 also the PnP Bios Boot spec says that the motherboard BIOS boot from LAN feature "only" (read--not so sure until I try it) checks the feature from the expansion ROM of the "NIC" (he..he.. :cool: or a "hacked into NIC" PCI expansion card) and proceeds accordingly, through int 19h interface (please correct me if I'm wrong). Then the hypothetical conclusion is this: "ANY PCI expansion card can boot just like a typical bootable LAN Card provided we have the 'right' PCI expansion ROM BIOS". So, I give it a try, since I don't have another cheap solution to this problem. And voila', it works very nicely, the mainboard BIOS is fooled to boot from my hacked PCI expansion rom card, here's the detail: Adaptec AHA-2940U SCSI controller card (VendorID = 9004, DeviceID = 8178), with soldered PLCC SST29C512 flashrom (64KByte). The binary flashed using innoficial flash program (flash4.exe). The result is awesome and a bit weird, no matter how I changed the BIOS setup, the PCI initialization routine always get called during POST, I think this is due to the controller's chip Subclass Code and Interface Code, which is a SCSI controller/boot device in the Adaptec controller chip (AICXXX), hence it's always called by the mainboard BIOS at boot. The hacked BIOS
make it behave as if it's a real PCI NIC except for the peculiarity mentioned above, my system boot from the card (through it's BEV routine) if I select boot from LAN in the BIOS setup of my mainboard. One thing to notice is I've changed the PCI vendor ID and device ID to match the ID's in the adaptec controller chip from my previous OS source code (for the Realtek based NIC), otherwise it won't boot (I think this what would happen, I haven't try this :confused: ).
Posted on 2004-03-12 03:54:49 by Pinczakko
Heh, this sounds like a lot of fun :)
I have a rtl8139 boot rom lying around btw, I had to remove it from the card because it was rather annoying, and I couldn't disable LAN boot in bios (old old old machine). I assume I would need some EPROM flasher to flash it, cards don't have builtin rom flashers?
Posted on 2004-03-12 05:51:23 by f0dder
no you don't need any hardware flasher, all you need is downloading rtflash.exe from realtek's website here: www.realtek.com.tw , it's flasher for RTL8139X chip, also you need to download rset8139.exe to set the address "window size" before flashing, to match the size of the flash rom you are using.
Posted on 2004-03-13 02:07:50 by Pinczakko
As for the Adaptec controller that I'm using, I think the "window" size for the BIOS chip is already hardcoded to 64KByte in the controller chip (AICXXX) since the flasher program, won't flash a binary file other than 64 KByte, and they don't have any program similar to rset8139.exe.
Posted on 2004-03-13 02:58:25 by Pinczakko

no you don't need any hardware flasher, all you need is downloading rtflash.exe from realtek's website here: www.realtek.com.tw , it's flasher for RTL8139X chip, also you need to download rset8139.exe to set the address "window size" before flashing, to match the size of the flash rom you are using.

Would you happen to know which type of RAM the RTL8139 board takes ? I have a couple of these lying around, could be quite cool to try and network boot just to see how it is like :D
Posted on 2004-03-14 22:10:57 by x86asm
based on the documentation of the downloaded tools from Realtek's website (i.e. the rtflash.exe and rset8139.exe packages), they mention the following ROMs:
M27C128 (16K bytes/128K bits EPROM) ---> set to 16K
M27C256 (32K bytes/256K bits EPROM) ---> set to 32K
M27C512 (64K bytes/512K bits EPROM) ---> set to 64K
AT29C512 (64K bytes/512K bits FLASH) ---> set to 64K
AT29C010 (128K bytes/1M bits FLASH) ---> set to 128K
AT49F001 (128K bytes/1M bits FLASH) ---> set to 128K
39SF512 (64K bytes/512K bits FLASH) ---> set to 64K
based on my experience, the chip that I guaranteed to work is Atmel AT29C512 (64K bytes/512K bits FLASH), this is the chip I'm currently using it in one of my computer. I'm using the 28 pins version, since my NIC only support this type of chip, currently, hard to find in my place, may be you're in a better place than me. Goodluck :grin:
Posted on 2004-03-15 04:28:54 by Pinczakko