BIOS: cpucode.bin structure for AMD64's

M

Mogens V.

Sorry for writing about this in the Asus ng, it's for a Soltek Qbic, but
Paul (and I'm sure others here) knows alot about the topic ;)

I'm having a real pain creating support for a AMD Athlon 64 Mobile
3000+/35W, AMD3000BKX4LB, on a Soltek Qbic EQ3801 (nforce3-250gb).

The cpucode.bin module is laid out with only 4K, leaving support for
only two cpuID's, in this case A64's and Semprons, whatever else may be
supported is a dunno..

From a thread elsewhere I know MSI K8 Neo Platinum has support for
exactly my mobile cpu (+ they list support for 90nm's).

The MSI cpucode.bin is 8K, i.e. with four ID's.
Only, the 8K module obviously won't work in a 4K-based BIOS.
I could try replaceing one of the two entries in the Soltek module with
the mobile-matching entry from the MSI ditto; a matter of a few tries..

However, since the actual cpucode seems to be a mere 959bytes, I had the
idea that perhaps a 4K module might house four entries.

To make sure the bios would even work, I did a number of tries, like:

.. swapped the two original Soltek 2K-entries around: Works.
.. cut the two original entries down to 1K (incl.65bytes zero-padding),
and padded 2K zero's to create a 4K cpucode.bin: Works.
.. same again, but swapped those two 1K-entries around: Works.
.. used the same 1K-entries twice to have a four-entry 4K module: Works.

But whenever I use the MSI entries, either mixed with the original
Soltek entries, or 'standalone': Screen of Black Death.
Naturally, I've tried editing those MSI entries to create a four-entry
1K-per-entry module, like that tried with the original Soltek module.

Soltek and MSI entries looks somewhat alike in the beginning:

Soltek:
1: 02 20 27 06 05 00 00 00 00 80 20 00 A8 22 51 7C 00 00 00 00...
2: 02 20 27 06 15 00 00 00 00 80 20 00 DC F1 E4 19 00 00 00 00...
^^
As can be seen, they start identical, except for that '05' vs '15'.
I simply dunno if that is a header of some sort, or part of the cpuID.


MSI is a bit different, but not that much:
1: 04 20 06 02 39 00 00 00 00 80 20 00 FD 1C 33 3E 00 00 00 00...
2: 04 20 06 02 3A 00 00 00 00 80 20 00 FD C6 88 3E 00 00 00 00...
3: 04 20 25 02 41 00 00 00 00 80 20 00 FD 6A 5A 3E 00 00 00 00...
4: 05 20 28 04 4D 00 00 00 00 80 20 01 6B 59 94 C2 00 00 00 00...


All entries ends with FF EF 01 80 00 00 00 00 00 00 00 00...

Not knowing if each entry starts with a header (02 20 vs 04 20), I tried
editing the four MSI entries from '04 20' to '02 20'; the Soltek bios
-might- expect to see specific headers. No luck. Black Screen.


I'm pretty much stuck here - and on a borrowed time-limited Sempron :)
Anyone? Private mailings? (del NOSPAM)
 
P

Paul

Sorry for writing about this in the Asus ng, it's for a Soltek Qbic, but
Paul (and I'm sure others here) knows alot about the topic ;)

I'm having a real pain creating support for a AMD Athlon 64 Mobile
3000+/35W, AMD3000BKX4LB, on a Soltek Qbic EQ3801 (nforce3-250gb).

The cpucode.bin module is laid out with only 4K, leaving support for
only two cpuID's, in this case A64's and Semprons, whatever else may be
supported is a dunno..

From a thread elsewhere I know MSI K8 Neo Platinum has support for
exactly my mobile cpu (+ they list support for 90nm's).

The MSI cpucode.bin is 8K, i.e. with four ID's.
Only, the 8K module obviously won't work in a 4K-based BIOS.
I could try replaceing one of the two entries in the Soltek module with
the mobile-matching entry from the MSI ditto; a matter of a few tries..

However, since the actual cpucode seems to be a mere 959bytes, I had the
idea that perhaps a 4K module might house four entries.

To make sure the bios would even work, I did a number of tries, like:

. swapped the two original Soltek 2K-entries around: Works.
. cut the two original entries down to 1K (incl.65bytes zero-padding),
and padded 2K zero's to create a 4K cpucode.bin: Works.
. same again, but swapped those two 1K-entries around: Works.
. used the same 1K-entries twice to have a four-entry 4K module: Works.

But whenever I use the MSI entries, either mixed with the original
Soltek entries, or 'standalone': Screen of Black Death.
Naturally, I've tried editing those MSI entries to create a four-entry
1K-per-entry module, like that tried with the original Soltek module.

Soltek and MSI entries looks somewhat alike in the beginning:

Soltek:
1: 02 20 27 06 05 00 00 00 00 80 20 00 A8 22 51 7C 00 00 00 00...
2: 02 20 27 06 15 00 00 00 00 80 20 00 DC F1 E4 19 00 00 00 00...
^^
As can be seen, they start identical, except for that '05' vs '15'.
I simply dunno if that is a header of some sort, or part of the cpuID.


MSI is a bit different, but not that much:
1: 04 20 06 02 39 00 00 00 00 80 20 00 FD 1C 33 3E 00 00 00 00...
2: 04 20 06 02 3A 00 00 00 00 80 20 00 FD C6 88 3E 00 00 00 00...
3: 04 20 25 02 41 00 00 00 00 80 20 00 FD 6A 5A 3E 00 00 00 00...
4: 05 20 28 04 4D 00 00 00 00 80 20 01 6B 59 94 C2 00 00 00 00...


All entries ends with FF EF 01 80 00 00 00 00 00 00 00 00...

Not knowing if each entry starts with a header (02 20 vs 04 20), I tried
editing the four MSI entries from '04 20' to '02 20'; the Soltek bios
-might- expect to see specific headers. No luck. Black Screen.


I'm pretty much stuck here - and on a borrowed time-limited Sempron :)
Anyone? Private mailings? (del NOSPAM)

My last attempt at decoding a CPUCODE was a flop. Intel has
made some changes to the format, and now the microcode size can
be larger than 2KB. Try PDF page 400 here, and see if you can
parse the header section. For example, I can see the A8 22 51 7C
part is some kind of checksum.

http://download.intel.com/design/Pentium4/manuals/25366817.pdf

An earlier version, when a microcode update was always 2KB in size,
is here. See PDF page 303.

http://www.intel.com/design/pentiumii/manuals/24319202.pdf

Since you are using an AMD processor, the family code part will be
different than Intel's. I think it is the lower three nibbles of
the values shown on page 7 of this document. I don't know if
AMD microcode patching is done the same way as Intel, or if
AMD uses exactly the same format. The AMD site is being
no help to me.

http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25759.pdf

I see there are other efforts on the web to figure it out.
Maybe this came from the Linux world ?

http://www.securiteam.com/securityreviews/5FP0M1PDFO.html
http://www.a42.com/node/443

The "envelope" that Asus used to put around the code is
documented here. This will likely have changed as well.

http://www.mrufer.ch/pc/asus_microcode.pdf

Good luck in your search,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top