Hi everyone!
I'd like to know if there's any risk of corrupting the bios by writing in it's memory directly, for example, by writing in C0000 - C7FFF or F0000 - FFFFF.
The Osdev Wiki says that that spaces are ROM, but in most bios the firmware can be upgraded (sort of an EEPROM or Flash).
Is there any risk by writing there?
Cheers,
Gonzalo
Bios code overwrite risk?
- gzaloprgm
- Member
- Posts: 141
- Joined: Sun Sep 23, 2007 4:53 pm
- Location: Buenos Aires, Argentina
- Contact:
Bios code overwrite risk?
Visit https://gzalo.com : my web site with electronic circuits, articles, schematics, pcb, calculators, and other things related to electronics.
Re: Bios code overwrite risk?
VGA routiue and some BIOS ISR is in C0000h - FFFFFh.
you can not change it after int 19h.
but you can put some your codes in C0000h-DFFFFh(for example: Option ROM or firmware) before int 19h.
you can not change it after int 19h.
but you can put some your codes in C0000h-DFFFFh(for example: Option ROM or firmware) before int 19h.
Just For Fun
Re: Bios code overwrite risk?
Hi,
Secondly, you can't modify the real ROM (just below 4 GiB) by writing directly to it. There's special hardware (and a special sequence of events to unlock the hardware) that needs to happen before flash memory can be changed. AFAIK this is done using a special serial bus (and not using writes to the physical addresses).
Cheers,
Brendan
First, on modern computers this area is actually RAM and the memory controller is configured to forward writes to this area to the PCI bus (where reads come from RAM), so that it's impossible for normal software to modify this RAM. If you mess with the memory controller it's usually possible to enable writes to this area and overwrite everything (but doing this may trash the BIOS's SMI handling and crash the computer); however even in this case the real ROM (just below 4 GiB) and the ROMs built into some PCI devices won't be effected and everything will work the same after a reboot.gzaloprgm wrote:I'd like to know if there's any risk of corrupting the bios by writing in it's memory directly, for example, by writing in C0000 - C7FFF or F0000 - FFFFF.
The Osdev Wiki says that that spaces are ROM, but in most bios the firmware can be upgraded (sort of an EEPROM or Flash).
Is there any risk by writing there?
Secondly, you can't modify the real ROM (just below 4 GiB) by writing directly to it. There's special hardware (and a special sequence of events to unlock the hardware) that needs to happen before flash memory can be changed. AFAIK this is done using a special serial bus (and not using writes to the physical addresses).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.