0

I've wondered about how to make a software to write to BIOS chip.

I've seen some examples like flashrom, but I don't know exactly how it works.

How can I address the chip? How can I write to that addresses?

Antonio Sanchez
  • 381
  • 1
  • 3
  • 11
  • 5
    It depends of your hardware. You might need special hardware to burn a new boot loader, firmware, etc. – Wallace Feb 26 '21 at 14:26
  • Have you tried to read the code of the flashrom tool? It looks like it has dozens of different drivers for different mainboards. – fuz Feb 26 '21 at 14:56
  • Do you have the schematics for your board? What do you see? Are there components other than the processor and flash in the programming path? (cpld, etc)? – old_timer Feb 26 '21 at 15:18
  • did you look up the datasheet for the flash part? – old_timer Feb 26 '21 at 15:19
  • 2
    The PCH has an interface for sending commands to the SPI/LPC flash ROM but: 1) It respects the flash descriptor, so you are not allowed to write or read anywhere; 2) Writing is usually locked by the BIOS at startup, unless in SMM. The BIOS usually only allows flashing using its interface (before booting the OS). You can find the PCH datasheet online. If you want to use external hardware, an Arduino nano and a SOIC/SOP8 clip will do the job and allow you to reflash completely. In this case, you need to check the flash datasheet/standard but it's very easy. – Margaret Bloom Feb 26 '21 at 17:27

1 Answers1

0

For some hardware, you could take inspiration from the LinuxBoot project.

Unfortunately, it does not support many motherboards, and you could brick your hardware if you do something wrong.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547