BIOS Checksum Algorithm, anybody know? ( Peter where are you?)

RamonetB

Member
Jan 20, 2002
36
0
0
Ok Guys.
Here's what's up.

I've been working on modifying a BIOS for my laptop to support a new CPU. All is in nearly ready. Howeve,r I need to correct, or rather find a new, Checksum value.

How I understand it works at the moment is that there is within the BIOS a Checksum value, 32-bit. The first 4-bytes of the file are then summed together and then added to the checksum value. If the end result is 0, everything is dandy. Then the next 4-bytes are summed up and so on.
The trick is to find the checksum value taht will allow all the added 4-byte packets to equal zero.

Sounds simple, but some detals elude me. Is this summation in a binary or Hex? Decimal? (Is that even possibly mathematically?) Is the checksum value also inculded in this algorithm? (The checksum added up and then added to itself?).

Hey Peter, I know you work with BIOSes and if you're at liberty to disclouse information like this, the help would be greatly appreciated.

Thanks to all for any help!
 

Carceri

Member
Aug 7, 2001
119
0
0
I don't really understand the scheme you are describing, but here are some possibilities.

I have seem the following simple checksum values used:

- Sum all bytes in the file (except the checksum of cause) modulo 0x10000 and put the result in the last two bytes of the file.
- Same as above put place the following value in the last two bytes: (0x0 - (Sum of all bytes in file modulo 0x10000).

For better checksums the CRC16 and CRC32 algorithms are often used (generates 16 and 32 bit checksum values)

The idea (for CRC16) is to take a fixed 16 bit number such as 10100....1 and interpret it as the polynomial P(x) = x^16 + x^14 + x^1 + 1 (or any other polynomial you might choose). Now if you have a stream of N bytes you want to protect with a checksum append a block of 16 bits (K) to the N bits so that the N + K bits interpreted as a polynomial divided by P has a remainder of zero. The block K is the checksum.

This can be implemented in many different ways. There are some "standard" polynomials, but I can't remember them right now.

I don't know what kind of algorithm your BIOS uses, but you can try some of them. I have guessed the checksum of various formats by trying some of the simpler methods.
 

RamonetB

Member
Jan 20, 2002
36
0
0
I've seen those algorithms but I'm being told that the AMI BIOS doesn't follow them (by a guy who's worked on modding them before. He hasn't gotten back to me yet with details and I guess I'm just getting impatient).

So clarification.
(Again, from what I've reasoned from his brief explinations)

When checking the integrity of the ROM file, the first 4-bytes are added together.
This value is then added to a stored value we'll call Checksum.
If the summation yields zero everything is good.
The next 4-bytes are summed together.
This new value is added to the same Checksum value.
If the summation equals zero, everything is good.
The process continues until the entire ROM file is processed.

Something about it just doesn't sound right and I'm skeptical of the math involved.
Is such a value Checksum even possible? My gut instinct is no. But then I'm not the math nut I used to be and was never paticularly good at this sort of math anyway.
 

Carceri

Member
Aug 7, 2001
119
0
0
You are right in saying that such a checksum is not possible unless the BIOS file consists of four byte blocks such that the sum of the bytes in each block is the samen (which would severely limit the kind of data you could store in the bios file).

You are actually saying that there exist two values A and B (the sum of bytes 1-4 and 5-8) and a checksum value C such that A + C = 0 and B + C = 0.

Assume that this is true and assume that A and B are different. Then we have A + C = B + C => A = B which is a contradiction to A and B being different.

Are you sure that the scheme is not just: Add all bytes, add that number to the checksum value and see if you get 0. That would make more sense
 

RamonetB

Member
Jan 20, 2002
36
0
0
Yes, that would make much more sense.

But that's not what I was being told.

Obviously something isn't right. I'll sit down with a known good BIOS and see what works.

Thanks!
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |