^^Previous post is a short/summarized version. For the long version, I just quote what asscut told me. I'm not understand some part of it yet but for now I can disassembled the BIOS using IDA & analyzed the instruction.
I have been told all BIOS have the same entry point which is F000:FFF0. I already tested this on two different BIOS, Dell BIOS & Phoenix BIOS. They have the same entry point. Next, just follow the jump instruction to find the rest of the instruction code.
BTW, don't forced IDA when analyzed the instruction. When dialog box popup asking whether you want to forced it or not, just click NO or CANCEL. I don't know the best approached for this but for now I don't want to forced it.
(Regarding the .ROM file.) Usually there are two files; 1) .ROM/.BIN & 2) .WPH; in the BIOS package. .WPH is a BIOS image + platform data/signature at the end of the file. .ROM only contain BIOS image. The .ROM file is the one we want to disassembled. In case there is only one file in the BIOS package, to get the .ROM (BIOS image) from it is easy. If the length of the content is 0x20XXXX, then the .ROM is from offset 0x000000 to 0x200000. If the length of the content is 0x10XXXX, then the .ROM is from offset 0x000000 to 0x100000. (and so on.)
Quote:Hi!
IDA is working with segment address, BIOS (firmware) is working with linear address and processor is
working with physical address. Our purpose is calculate a physical address in order to understand the
code. At the same time, in real mode, the linear address coincides with the physical. In protected mode
is not the same and is calculated using a special algorithm.
The first phase of work with IDA is getting the segment address from linear BIOS address, this will give
an example (D4700A10.rom) how:
Theory
The entry point to all the BIOS is the address FFFFFFF0 (linear). He is an alias address 000FFFF0 (in 1Mbit
BIOS chip ), or 0007FFF0 (in 512 Mbit). Last 64 kB is 000F0000-000FFFFF (linear) or F000:0000-F000:FFFF
(segment). For 512 kB chip: 00070000-0007FFFF(linear) or 7000:0000-7000:FFFF(segment).
Where in the segment address F000 is BASE, 0000-FFFF is OFFSET; or 7000 is BASE and 0000-FFFF is
OFFSET into segment. Linear address=Segment BASE shifted left on 4 bits+OFFSET. Ex: base F000, offset
1000, linear address=
shifted base F0000+1000=F1000.
The challenge for understanding. Сomputational linear address: base 0040, offset 0067.Answer 467.
Practiсe.
Load file.rom into IDA. We look forward to. Create a segment in the last 64 kilobytes of code.To do this
click EDIT->SEGMENTs->Create segment->
A pop-up window select the settings:
NAME- I always select the name of F000, you can specify any.
Start address: 0x00070000
End adress: 0x00080000
Base: 0x7000
Class: Code
put a point on a 16-bit-> push OK.
Result: we made 64 kB segment into file.rom named "F000".
go to F000:FFF0 to start
I have been told all BIOS have the same entry point which is F000:FFF0. I already tested this on two different BIOS, Dell BIOS & Phoenix BIOS. They have the same entry point. Next, just follow the jump instruction to find the rest of the instruction code.
BTW, don't forced IDA when analyzed the instruction. When dialog box popup asking whether you want to forced it or not, just click NO or CANCEL. I don't know the best approached for this but for now I don't want to forced it.
(Regarding the .ROM file.) Usually there are two files; 1) .ROM/.BIN & 2) .WPH; in the BIOS package. .WPH is a BIOS image + platform data/signature at the end of the file. .ROM only contain BIOS image. The .ROM file is the one we want to disassembled. In case there is only one file in the BIOS package, to get the .ROM (BIOS image) from it is easy. If the length of the content is 0x20XXXX, then the .ROM is from offset 0x000000 to 0x200000. If the length of the content is 0x10XXXX, then the .ROM is from offset 0x000000 to 0x100000. (and so on.)
If you use my modified BIOS image & you like it, please consider making a donation. Thank you very much.
Donate Here
Donate Here