Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do BIOS extensions (option ROMs) work? I understand that an installed device may have it's own BIOS that adds features to the system but I'm not sure of how they are set up.

I keep reading the following address range 0x0C0000 to 0x0F0000 is used but I don't understand what this is used for. It's as if the ROMs are stored at these address but I don't see how that works. What if you installed 2 devices that both expected to be at 0x0C0000?

Then the BIOS jumps to the option ROM and starts running from there, my next question is that when the ROM writes into the Interrupt Vector Table and hooks an interrupt to point to itself, what address does this point to?

For example on a VGA card what address would it hook INT 10h to?

Or is it that the entire option ROM gets mapped into an area between 0x0C0000 to 0x0F0000 and the IVT would point to somewhere in this range?

I know this is regarding older technologies that aren't used any more (e.g. using interrupts) but I'm interested as to how they worked.

If anyone can help answer the above questions or just give a brief overview it would be greatly appreciated,

Thanks

share|improve this question
    
Where are you reading this? The only way to add features to a BIOS is to apply a different firmware. –  Ramhound Apr 27 '14 at 22:41
    
@Ramhound just google Option ROMs or BIOS extensions –  RJSmith92 Apr 27 '14 at 22:49
    
I did. I want to know what you read exactly. –  Ramhound Apr 28 '14 at 0:34

1 Answer 1

up vote 3 down vote accepted

In the IBM PC days, with the ISA bus, each device simply had to use a different address. Often times they had hardware jumpers or dip switches you could configure to change the address to avoid conflicts. With the advent of the PCI bus, hardware addresses are configured automatically by the system bios to assign each device a unique address.

If the oprom hooks an interrupt, it points to an address within the assigned address that the oprom lives at. In the case of VGA bios, that normally was within the 0xC0000 block. Using the msdos debugger, you could inspect the interrupt vector table to see the entry point, and start disassembling the instructions there to see what they did.

share|improve this answer
    
Thanks. So with the ISA cards you would manually set an address between 0x0C0000 to 0x0F0000 so they don't conflict. With PCI cards that are PnP the BIOS would automatically assign an address range for the device BIOS between 0x0C0000 to 0x0F0000? So a device would have 2 or more address ranges, it would map it's ROM BIOS into a range between 0x0C0000 to 0x0F0000 for interrupts and it would also have addresses assigned to it for MMIO that could be accessed via a driver? –  RJSmith92 Apr 28 '14 at 10:41
    
So for example a modern GPU, would it still map it's video BIOS between 0x0C0000 to 0x0F0000 and then still have addresses such as 0xE0000000 - 0xEFFFFFFF assigned to it that the driver will use to access the card? –  RJSmith92 Apr 28 '14 at 21:53
1  
@RJSmith92, yes, generally devices only request addresses in the old 0xC0000 to 0xF0000 range for bios oproms, and use addresses in the 3-4 GB range for MMIO. –  psusi Apr 29 '14 at 3:02
1  
@RJSmith92, pretty much, yea. VGA bios hooks int 10h, which provides an api for basic text output, and disk controllers hook int 13h, which provides basic disk read/write interfaces. You might google for Ralph Brown's interrupt list for the nitty gritty details. –  psusi Apr 29 '14 at 13:40
1  
@RJSmith92, yes, if you use the base vga driver then it should remain enabled, but it is only used for setting the resolution, not drawing to the screen. –  psusi May 1 '14 at 13:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.