You are here: Home » Operating Systems » How can I access my BIOS?

How can I access my BIOS?

0 votes

I am interested in developing a small operating system between 2-3 MB and put it in my BIOS.I want to develop a text based operating system that is very fast. Please tell me how to push my program into the BIOS?

Asked by fahad on October 19, 2010. Last Edited on October 19, 2010.

We may be users that are super, but you may want to consider a different site... Perhaps http://programmers.stackexchange.com/ ? - Aeo on October 19, 2010

Or directly speaking to motherboard vendor ... because you'll need the BIOS + your operating system - Warnaud on October 19, 2010

Although this may be off topic for SU, this is a very good question. - KronoS on October 19, 2010

@Aeo:I was more concerned about force-feeding it into the BIOS rather than making such a program,so I posted it here. - fahad on October 19, 2010

This question is 100% on topic for Super User since the user is not asking about programming, but about actually flashing the BIOS. The answers are also extremely useful. - Diago on October 19, 2010

Accepted Answer5 votes

Operating systems do not live in the bios, as they are generally way too large to fit on the chip. 2-3 MB is way too large. They live on hard disks, floppy disks, cdroms, etc. Each of these disks has what is called a Master Boot Record. This is the first 512 bytes of the drive. Here you place the assembly code that then loads all of the remaining data that is required for the operating system to boot. Since most modern bootloaders are bigger than 512 bytes, they usually have just enough in that area to find the rest of the loader on the hard drive, load it into memory, and proceed with the boot process.

Answered by Wade Tandy on October 19, 2010. Last Edited on October 19, 2010.

I read somewhere that the bios size was about 5-6 MB. - fahad on October 19, 2010

@fahad Some chips are that large. You're still barking up the wrong tree here...the answer here varies depending on the motherboard because YOU'LL STILL NEED THE ORIGINAL BIOS STUFF IN THERE. - Shinrai on October 19, 2010

@Shinrai:I was thinking of having no original BIOS.Who needs original BIOS if each time your computer is starting up directly by the OS? - fahad on October 19, 2010

@fahad So you're going to custom-build this OS for a specific motherboard? There's a reason you can't just slap any old BIOS on any old motherboard...when I say you need the original BIOS stuff, I mean the stuff that actually gets the machine initialized and performs POST! - Shinrai on October 19, 2010

@shinrai:for simplicity I would like to start this project for a particular motherboard.If everything goes fine than I shall try to make a motherboard for it - fahad on October 19, 2010

@fahad What is it that you are doing that requires something as an actual BIOS? Not only is this way of doing things motherboard specific, it will also make your development time an order of magnitude longer, in my opinion. This should only be done if absolutely necessary. - Wade Tandy on October 20, 2010

@wade: size of the BIOS memory is small and a minimum of 5-6 MB is needed for the smallest OS.If the ROM is previously filled with BIOS there wont be any place for the OS,or rather I should try it on a processor having larger ROM size - fahad on October 20, 2010

@fahad That's exactly what I was asking. I'm wondering what your actual application for this custom OS will be, because I can't think of a situation that would require the extra speed offered by a BIOS resident operating system. It certainly doesn't seem like it is worth the trade off for the extra time required to develop this very complicated solution. - Wade Tandy on October 20, 2010

@wade:OS loads very slowly,to reduce this boot time ,I am thinking of diffrent ways.This idea of core-booting is one of them. - fahad on October 20, 2010

@fahad My slow-as-hell work machine loads Windows 7 in about 6 seconds flat off a solid state drive. I wouldn't call that 'very slowly'. ;) - Shinrai on October 20, 2010

@fahad and I can get a minimum install of something like puppy linux in even less than that. It seems like you are trying to spend a lot of time optimizing the wrong thing. - Wade Tandy on October 20, 2010

@wade:Any better idea ?Whats the better thing to optimize? - fahad on October 21, 2010

Since you are building your own operating system, I think the first thing you should do is get that system running as fast as absolutely possible outside of the BIOS. If for some reason you decide you still need more speed, maybe then consider moving it into BIOS territory. This will be MUCH faster to develop and test, and might save you a lot of effort you don't need. Even if you do find that you need more, figure out if a computer upgrade will get you to where you need to be. The time saved will be worth the little bit of money. - Wade Tandy on October 21, 2010

1 votes

BIOS is one of the thing that if you have to ask, you're probably in WAY over your head. Difficulty with programming BIOS is that if you screw up, you have no easy way to update it since most require a working BIOS in order to update. Some motherboard have a backup method of programming it via SPI, but that depends on the vendor.

If you are still seriously consider programming the BIOS, you might want to look into getting a eeprom emulator.

Answered by fseto on October 19, 2010.

the eeprom emulator was extremely useful - fahad on October 19, 2010

0 votes

If I'm understanding this correctly, you might be interested in coreboot. It's a project geared toward replacing the BIOS and allowing "payloads" to boot, which can include small operating systems or bootloaders actually stored in the ROM chip. Hypothetically, you could make your own payload for use with coreboot, but I'm not entirely sure how that would be done.

Answered by clpo13 on October 19, 2010.

Coreboot appears to be a replacement for the BIOS. However it may give insight to what the user is asking. Do you have personal experience in using this? - KronoS on October 19, 2010

@clpo13:Thats was exactly what I was looking for. - fahad on October 19, 2010

Content from Superuser of Stack Exchange. Original article at Superuser.


Related Tags

Operating Systems 277
Bios 254