    MSI MS-5158 motherboard BIOS V2.1 040898
    with patch J.2 for AMD K6-2, K6-III, K6-2+/III+, IDT WinChip 2(A)(B),
    Intel Tillamook, and Cyrix MII x4 multiplier support,
    and for IDE HDDs up to 128GB (32GB bugfix).
    01/23/2026
    by Jan Steunebrink

The latest BIOS upgrade from MSI for the MS-5158 is V2.1 040898.
This BIOS does not support the (mobile) K6-2+/III+ CPUs.
Also the original K6-2 and K6-III are not fully supported.

To overcome these problems, I have patched the V2.1 BIOS to include proper
recognition and handling of the K6-2, K6-III, and K6-2+/III+.
I've made the following changes:
- Added detection of the K6-2+, and K6-III+ CPUs
- Expanded the K6 Write Allocation feature to work also on all K6-2/III CPUs
  with the CXT core and enabled this feature for the K6-2+ and K6-III+ as well
- Corrected the AMD K6 3D display to AMD K6(tm)-2
- Expanded the CPU Type display routine for correct display of the AMD-
  K6(tm)-III, K6(tm)-2+, and K6(tm)-III+ strings
- Added 6.0x83 (500MHz) and 6.0x75 (450MHz) support for the K6-2CXT, K6-III,
  K6-2+ and K6-III+
- Added IDT WinChip 2(A)(B) and mobile Pentium-MMX (Tillamook) support
- Added detection of the Cyrix MII when set to x4 multiplier mode.

In addition I have made a patch to remove the 32GB IDE harddisk limit bug,
and made another patch to remove two additional 64GB limit bugs.
This patched BIOS supports now IDE drives upto 128GB and allows drives upto
640GB to be attached, although the BIOS will then only 'see' the first 128GB.
After booting to a suitable OS (WinXP+SP1 or later, Linux+kernel 2.4.19 or
later) the whole drive upto 640GB can be used, provided all the bootup code
is present in partition(s) below the 128GB boundary.

I also fixed the UDMA mode bug when using ATA/66 and faster IDE drives.
The BIOS now limits the reported transfer speed to UDMA mode 2 on these faster
drives, the maximum for this chipset.
This allows Win98 to enable DMA mode correctly.

For all other functions, the patched BIOS is identical to the original V2.1,
so you don't have to clear the CMOS if you upgrade from this BIOS.

The filename of the patched BIOS is MS5158J2.BIN and you can flash it with
the flash program you normally use to flash an MS-5158 BIOS upgrade.
Please take the usual precautions when flashing your BIOS.

Although the V2.1 BIOS was meant for the MS-5158 Rev 1.1 board only, this
patched BIOS can be used on any MS-5158 board revision. However if you use
this BIOS on a Rev 1. or Rev 1.A board with LM78 Hardware monitor, you may
notice that the CPU Fan and Chassis Fan monitor function is interchanged.

Note that, although this patched BIOS has been tested on an MS-5158
system without any problems, it is provided "as is" and you use it
at your own risk.

I like to thank everybody who participated in testing this BIOS.
Jan.

Homepage: http://www.steunebrink.info/
E-mail  : J.Steunebrink@net.HCC.nl
