The BIOS code is stored in reprogrammable ROM, so it's not 100% immune, but the code and the method of reprogramming it is specific to each particular make of computer motherboard, so it's very unlikely a virus would try to reprogram it unless if it was trying to attack a specific piece of computer hardware (as in Stuxnet).
The BIOS code can get corrupted by other means, e.g. power supply problems. That has happened to me with a desktop system. In my case the computer was apparently working OK, but it was impossible to get into the BIOS setup. The fix was to reprogram the BIOS memory, using software from the motherboard maker's website. The hardware to reprogam the chip is already built into the motherboard.
But you need a system that will run stably to reprogram the BIOS, because a crash half way through would be terminally fatal. You could pull the chip and use a standalone programmer, or buy a replacement chip already programmed - but best leave that sort of thing to a repair shop, especially since we don't know if this is actually the OP's problem.
The easiest way to troubleshoot this type of problem is just swap components till it goes away, but that's not possible unless you have an identical spare system available. It could be the power supply, memory, battery, motherboard, graphics hardware, ... pretty much anything.