Dual PII-S

BIOS Update for Dual PIII-S on the Asus P2B-DS


Our project to build a Dual PIII-S 1.4Ghz system on the Asus P2B-DS mainboard initially used BIOS version 1014 Beta 3, available here. This BIOS allows Tualatin processors to boot on the P2B-DS, but only contains microcode updates for early-stepping (CPUID 06B1) Tualatin processors. Since our PIII-S processors are the later tB1 stepping (CPUID 06B4), the BIOS complained about missing CPU microcode on every boot. We could have configured the BIOS to ignore the error, but decided the more elegant solution was to add the 06B4 microcode to the BIOS.

When the BIOS boots up, it queries the CPU(s) to determine their CPUID string(s), then decompresses and copies the appropriate microcode from the BIOS into one of two microcode storage 'slots' in CMOS memory - if neccessary Copying is only required if the CPU has been swapped and the CPUID has changed, or if CMOS memory has been cleared.

As a result, there are two possible approaches to solving the problem:

Both microcode update methods are described below.

Tools

First we needed a copy of the 06B4 microcode. Searching Google Groups turned up a post indicating the latest Asus TUSI-C BIOS contained it.

Then we needed software to extract the microcode. Further research indicated CBROM and CTMC could do the job.

We would also need a copy of the Asus BIOS flash utility, Aflash, however we used the older version found on the CD which came with our mainboard.

If we plan to modify the BIOS to make the microcode update permanent, we will also need a hex editor - we used UltraEdit-32.

Microcode Extraction

We started by unzipping the "donor" BIOS, CBROM, and CTMC into a working directory, then used CBROM to extract the microcode update file from the "donor" BIOS:

C:\workdir>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017

 Directory of C:\workdir

05/11/03  06:09p        <DIR>          .
05/11/03  06:09p        <DIR>          ..
10/15/01  08:26p                78,946 CBROM215.EXE
04/11/03  01:39p               262,144 1018tc.004
02/23/01  03:31p                57,568 CTMC.EXE
               5 File(s)        398,658 bytes
                            282,525,696 bytes free

C:\workdir>cbrom215 1018tc.004 /cpucode extract
CBROM V2.15 (C)Award Software 2001 All Rights Reserved.
Enter an extract file Name :(cpucode.exe)
[CPUCODE] ROM is extracted to cpucode.exe
C:\workdir>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017

 Directory of C:\workdir

05/11/03  06:09p        <DIR>          .
05/11/03  06:09p        <DIR>          ..
10/15/01  08:26p                78,946 CBROM215.EXE
04/11/03  01:39p               262,144 1018tc.004
02/23/01  03:31p                57,568 CTMC.EXE
05/11/03  06:34p                24,686 CPUCODE.EXE
               6 File(s)        423,344 bytes
                            282,492,928 bytes free

C:\workdir>


Then we used CTMC to extract the individual microcode updates from CPUCODE.EXE:

C:\workdir>ctmc cpucode.exe /store

 Microcode utility ctmc V1.0, c't/Andreas Stiller 02/2001
 Filename     Version  UpdateID Date       CPUID    Checksum  LoadVers Platform
 CPUCODE.EXE  00000001 0000000A 05.05.1999 00000660 05B795F4☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000003 05.05.1999 00000665 2B9733F1☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000014 10.06.1999 00000680 2B6C7F13☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000011 21.09.1999 00000681 FC16538D☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000014 06.02.2001 00000683 0976FD98☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000008 05.05.2000 00000686 EA2B7B61☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000001 02.11.2000 0000068A 80FC9E3B☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000004 15.11.2000 000006B0 65611EB6☻ 00000001 00000010
 CPUCODE.EXE  00000001 0000001C 15.02.2001 000006B1 6506E1CF☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000001 10.01.2002 000006B4 58213E6A☻ 00000001 00000010

C:\workdir>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017

 Directory of C:\workdir

05/11/03  06:09p        <DIR>          .
05/11/03  06:09p        <DIR>          ..
10/15/01  08:26p                78,946 CBROM215.EXE
04/11/03  01:39p               262,144 1018tc.004
02/23/01  03:31p                57,568 CTMC.EXE
05/11/03  06:34p                24,686 CPUCODE.EXE
05/05/99  12:00a                 2,048 0660010A.BIN
05/05/99  12:00a                 2,048 06651003.BIN
06/10/99  12:00a                 2,048 06800114.BIN
09/21/99  12:00a                 2,048 06811011.BIN
02/06/01  12:00a                 2,048 06831014.BIN
05/05/00  12:00a                 2,048 06861008.BIN
11/02/00  12:00a                 2,048 068A1001.BIN
11/15/00  12:00a                 2,048 06B01004.BIN
02/15/01  12:00a                 2,048 06B1101C.BIN
01/10/02  12:00a                 2,048 06B41001.BIN
              16 File(s)        443,824 bytes
                            282,329,088 bytes free

C:\workdir>


The file we need is 06b41001.bin

CMOS Update Method

If we want to simply copy the microcode update into one of the CMOS 'slots', we can use CTMC to install the 06B4 microcode file extracted above. First we create a bootable DOS floppy (we used MS-DOS v6.22), and copy ctmc.exe, and 06b41001.bin onto the floppy.

We installed the PIII-S 06B4 processors on the mainboard (apparently this is required), made sure BIOS updates were enabled in the BIOS, booted from the floppy, and executed:

A:\> ctmc.exe 06B41001.bin /write

CTMC then wrote the new microcode into the BIOS, after asking for permission.

Finally, we rebooted the system to confirm the BIOS no longer complained about missing microcode.

Modified BIOS Method

If our objective is to build a modified BIOS which includes the 06B4 microcode, several additional steps are required. First we use CBROM to extract the current microcode update file (cpucode.exe) from the version 1014 Beta 3 BIOS:

C:\workdir>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017


 Directory of
C:\workdir

11/26/03  09:06p        <DIR>          .
11/26/03  09:06p        <DIR>          ..
01/10/02  12:00a                 2,048 06B41001.BIN
08/02/02  11:20a               262,144 1014ds.003
10/15/01  07:26p                78,946 CBROM215.EXE
               5 File(s)        343,138 bytes
                          2,485,424,128 bytes free

C:\workdir>cbrom215 1014ds.003 /cpucode extract
CBROM V2.15 (C)Award Software 2001 All Rights Reserved.
Enter an extract file Name :(cpucode.exe)
[CPUCODE] ROM is extracted to cpucode.exe
C:\workdir>dir
 
Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017


 Directory of
C:\workdir

11/26/03  09:07p        <DIR>          .
11/26/03  09:07p        <DIR>          ..
01/10/02  12:00a                 2,048 06B41001.BIN
11/26/03  09:07p               262,144 1014ds.003
10/15/01  07:26p                78,946 CBROM215.EXE
11/26/03  09:07p                49,250 CPUCODE.EXE
               6 File(s)        392,388 bytes
                          2,485,366,784 bytes free

C:\workdir>

Now we need to append the 06B4 microcode file. We'll call the result cpucode.tmp:

C:\workdir>copy cpucode.exe/b + 06b41001.bin/b cpucode.tmp
CPUCODE.EXE
06B41001.BIN
        1 file(s) copied.

C:\workdir>dir
 
Volume in drive C is SYSTEM
 Volume Serial Number is 3ADE-1017


 Directory of
C:\workdir

11/26/03  09:17p        <DIR>          .
11/26/03  09:17p        <DIR>          ..
01/10/02  12:00a                 2,048 06B41001.BIN
11/26/03  09:07p               262,144 1014ds.003
10/15/01  07:26p                78,946 CBROM215.EXE
11/26/03  09:07p                49,250 CPUCODE.EXE
11/26/03  09:17p                51,298 cpucode.tmp
               7 File(s)        443,686 bytes
                          2,485,313,536 bytes free

C:\workdir>

Now cpucode.tmp contains all the original microcode updates, and has the 06B4 update added to the end of the file. The next step is to edit the file's header section and add a pointer to the 06B4 update. Documentation of the file format is available here. We open the file in a hex editor, and see the header contains pointers to 24 microcode updates, followed by the terminator FF FF:

Cpucode file header - before editing

Using the formula from the file format documentation, we calculate the offset for the 25th microcode update and insert it just before the terminator. This increases the header length (and total file size) by four bytes, so we must add four to all the original pointers. The resulting file header is shown below:

Cpucode file header - after editing

We can verify no editing mistakes were made using CTMC:

C:\workdir>ctmc cpucode.tmp

  Microcode utility ctmc V1.0, c't/Andreas Stiller 02/2001
 Filename     Version  UpdateID Date       CPUID    Checksum  LoadVers Platform
 CPUCODE.EXE  00000001 00000020 03.09.1996 00000632 EBC16165☻ 00000001 00000000
 CPUCODE.EXE  00000001 00000034 08.05.1998 00000633 278BE7DC☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000035 08.05.1998 00000634 3AC2FB53☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000040 25.05.1999 00000650 B6A8B9B9☻ 00000001 00000001
 CPUCODE.EXE  00000001 0000000A 05.05.1999 00000660 05B795F4☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000006 28.05.1998 00000670 0CE041AD☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000003 05.05.1999 00000665 2B9733F1☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000010 28.06.1999 00000653 4B6DFC5E☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000010 22.09.1999 00000672 0FC53099☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000003 11.08.1998 00000671 F6CF7B0B☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000002 10.06.1998 00001632 6AAE5598☻ 00000001 00000000
 CPUCODE.EXE  00000001 0000000E 10.09.1999 00000673 F64116D1☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000014 10.06.1999 00000680 2B6C7F13☻ 00000001 00000001
 CPUCODE.EXE  00000001 0000000D 21.09.1999 00000681 31708166☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000011 21.09.1999 00000681 FC16538D☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000013 06.02.2001 00000683 2F0DA1B0☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000014 06.02.2001 00000683 0976FD98☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000007 05.05.2000 00000686 87AA303F☻ 00000001 00000001
 CPUCODE.EXE  00000001 00000008 05.05.2000 00000686 EA2B7B61☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000001 02.11.2000 0000068A 80FC9E3B☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000004 15.11.2000 000006B0 65611EB6☻ 00000001 00000010
 CPUCODE.EXE  00000001 0000001C 15.02.2001 000006B1 6506E1CF☻ 00000001 00000010
 CPUCODE.EXE  00000001 00000001 10.01.2002 000006B4 58213E6A☻ 00000001 00000010


C:\workdir>dir

CTMC shows all the original microcode updates, plus our new 06B4 update at the end of the list. Now we can rename the edited file back to cpucode.exe (HINT: click the link to get the edited file), and use CBROM to install it in the BIOS - we'll use '6b4' as the file extension for the modified BIOS:

C:\workdir>del cpucode.exe

C:\workdir>ren cpucode.tmp cpucode.exe

C:\workdir>copy 1014ds.003 1014ds.6b4
        1 file(s) copied.

C:\workdir>cbrom215 1014ds.6b4 /cpucode cpucode.exe
CBROM V2.15 (C)Award Software 2001 All Rights Reserved.
Adding cpucode.exe ...... 50.2%

C:\workdir
>

As a final check, we can use CBROM again to display the contents of our updated BIOS:

C:\workdir>cbrom215 1014ds.6b4 /d
CBROM V2.15 (C)Award Software 2001 All Rights Reserved.

              ********   1014ds.6b4 BIOS component ********

 No. Item-Name         Original-Size   Compressed-Size Original-File-Name
================================================================================
  0. System BIOS       20000h(128.00K)15384h(84.88K)stn.bin
  1. Other(0800:0000)  08000h(32.00K)04FCAh(19.95K)pci32.rom
  2. VSA driver        0B000h(44.00K)0AA29h(42.54K)8bios901.csm
  3. EPA LOGO          00642h(1.56K)002A1h(0.66K)awardepa.epa
  4. ACPI table        01F56h(7.83K)00B3Eh(2.81K)ACPITBL.BIN
  5. VRS ROM           02086h(8.13K)01351h(4.83K)cav_shdw.bin
  6. CPU micro code    0C866h(50.10K)064CAh(25.20K)cpucode.exe

  Total compress code space  = 35384h(212.88K)
  Total compressed code size = 2D371h(180.86K)
  Remain compress code space = 08013h(32.02K)

                          ** Micro Code Information **
Update ID  CPUID  |  Update ID  CPUID  |  Update ID  CPUID  |  Update ID  CPUID
------------------+--------------------+--------------------+-------------------
00000000 00000000      0000     0000|


C:\workdir>

Looks good! Note that CBROM does not understand the Asus microcode update file format, so it does not display the microcode information - that's why we checked the edited file earlier using CTMC.

Now we create a bootable DOS floppy (we used MS-DOS v6.22), copy aflash.exe, and 1014ds.6b4 onto the floppy, cross our fingers, and flash the updated BIOS! After flashing, we rebooted the system and confirmed the BIOS no longer complained about missing microcode.


Kudos to Paul and Erwin, both of whom frequent alt.comp.periphs.mainboard.asus to share their knowledge and expertise, for their invaluable assistance in developing the microcode update techniques described above.


Last updated November 26th, 2003 by p2b@sympatico.ca