View Full Version : BIOS and I/O addresses
Neil_MO
06-01-2001, 10:12 PM
There is one thing that remains unclear to me after reading over some of the sections in the PC Guide. Specifically when the computer boots up and looks for certion BIOSs in particular memory locations. Are the BIOSs such as the video BIOS loaded into RAM first and then read or are they read from the chip itself? If they are read from the chip itself then how does the system BIOS know how to get to these BIOSs. And if they are loaded into memory then isn't this just shadowing (which makes it seem that turning on shadowing is redundant)?
I have the same basic question in regard to I/O addresses. Do the I/O devices communicate information through RAM or is it done directly from the I/O device to the CPU?
Hopefully I made my questions clear enough. I know what I mean but it is hard to put it into the proper words. Thanks
tjaymadison
06-01-2001, 11:30 PM
During the POST, the system/motherboard BIOS checks a specific default
location in memory for the presence of the video card's BIOS. If it is
found, the instructions are executed, and the video card is initialized.
Operating systems like Windows bypass the BIOS completely and access the
graphics card directly. After the first read, no additional BIOS calls are
necessary and there is no real benefit to be gained from shadowing the
video BIOS. For these same reasons, caching the video BIOS is essentially
a waste of RAM. However, you may need to enable these options in specific
circumstances, for DOS games or other software that is not 'well-behaved'.
One of the functions of the chipset is to handle input and output requests
from the USB, parallel and serial ports, and the floppy and hard disk
controllers. Depending on the implementation, these are usually routed
directly to the CPU via the IRQ lines.
------------------
"I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
-- Charles Babbage, mathematician, computer pioneer, analytical engine designer (1791-1871)
-- (Question: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?')
"Just because I don't care, doesn't mean I don't understand."
-- Homer Simpson
Neil_MO
06-02-2001, 12:04 AM
If the video BIOS is already in RAM when the BIOS looks for it then what does turning shadowing on do? It seems to me it is already being shadowed since it was loaded into memory for the system BIOS to find.
And with the I/O devices.. What about the data sent/received? Is it sent to memory first(in their I/O space) or is the data sent directly to the processor?
Thanks.
Originally posted by tjaymadison:
During the POST, the system/motherboard BIOS checks a specific default
location in memory for the presence of the video card's BIOS. If it is
found, the instructions are executed, and the video card is initialized.
Operating systems like Windows bypass the BIOS completely and access the
graphics card directly. After the first read, no additional BIOS calls are
necessary and there is no real benefit to be gained from shadowing the
video BIOS. For these same reasons, caching the video BIOS is essentially
a waste of RAM. However, you may need to enable these options in specific
circumstances, for DOS games or other software that is not 'well-behaved'.
One of the functions of the chipset is to handle input and output requests
from the USB, parallel and serial ports, and the floppy and hard disk
controllers. Depending on the implementation, these are usually routed
directly to the CPU via the IRQ lines.
tjaymadison
06-02-2001, 04:18 AM
Without shadowing, the video BIOS has no 'claim' on the memory segment(s)
for the rest of that boot session. It becomes available as part of the
total resource pool, and can be overwritten in the course of normal operation.
I'd suggest a Google search on 'bus mastering', 'interrupt request'
and 'DMA transfer' for more in-depth info on the other.
------------------
"I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
-- Charles Babbage, mathematician, computer pioneer, analytical engine designer (1791-1871)
-- (Question: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?')
"Just because I don't care, doesn't mean I don't understand."
-- Homer Simpson
Paleo Pete
06-02-2001, 08:28 AM
When you turn on the computer nothing is in RAM. Nothing there for BIOS to read, so it looks for a video card. The video BIOS is loaded into RAM so you can get a picture. Later, other things are loaded into RAM that could take the place of the video info, and it would have to be read from the card's BIOS again, which is slower, so it's shadowed. That way it's always there and available when needed, at the fastest speed available.
Just getting the video info is not the reason for shadowing, speed is the reason. ROM is a much slower type of memory than RAM is. The computer could just as easily get the video info from the card's BIOS at any time, but it would take much longer than getting it from RAM.
------------------
So many idiots, and only six bullets...
Note: Please post your questions on the forums, not in my email.
Computer Information Links (http://www.geocities.com/paleopete/)
tjaymadison
06-02-2001, 10:21 AM
Pete -- Have to disagree with parts of what you say.
Video card's BIOS, or at least a pointer to it, is loaded in RAM at a
default location during the boot, regardless of the shadowing setting.
All shadowing does is to keep that info in that location for that session.
Once Windows is loaded, BIOS calls are not used or needed for screen writes
or much of anything else. All that is handled internally by protected-mode drivers.
There are exceptions to this, as I referred to above.
------------------
"I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
-- Charles Babbage, mathematician, computer pioneer, analytical engine designer (1791-1871)
-- (Question: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?')
"Just because I don't care, doesn't mean I don't understand."
-- Homer Simpson
[This message has been edited by tjaymadison (edited 06-02-2001).]
Neil_MO
06-02-2001, 03:41 PM
Once the initial boot process is complete can the video BIOS be accessed directly by the processor or must the part that is needed be loaded into RAM first (assuming it isn't being shadowed)?
It can be accessed directly, but if it is an older card with a ROM chip to hold it then it is going to be very slow, newer cards with Flash ROM are as fast as it being shadowed, which was the point of shadowing the vide BIOS (well one of them at least)
------------------
mjc
Links list:Computer Links (http://www.fortunecity.com/skyscraper/highrise/11/index.htm)
Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.
[This message has been edited by mjc (edited 06-02-2001).]
pjungwirth
06-06-2001, 10:05 PM
This is a question I've wondered about also. So at the beginning of a session, BIOS info gets loaded into RAM. Shadowing makes that area of RAM read-only, so you don't have to reload BIOS info. My question is, How *would* you reload BIOS info, anyway? You can't do it by specifying a memory location anymore, right? So how does an assembly instruction "find" BIOS info?
Thanks,
Paul
~{:-)
Neil_MO
06-08-2001, 04:59 AM
That is partly my question as well. It is my understanding that the BIOS ROM is assigned regular RAM addresses. But how does the CPU know that it is pointing to the BIOS and not RAM locations? The same with I/O addresses.
I was trying to post an excerpt frome this article, the board wouldn't let me so here (http://www.google.com/search?q=cache:Dkha_hnEta8:www.computerbooksonline .com/repair/chapter5.htm+rom+shadowing+address+access+direct+a ssembly&hl=en) is the entire article.
I hope it helps.
------------------
mjc
Links list:Computer Links (http://www.fortunecity.com/skyscraper/highrise/11/index.htm)
Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.
[This message has been edited by mjc (edited 06-08-2001).]
pjungwirth
06-09-2001, 05:15 PM
Thanks for the great article! It clarified a lot of things for me. Somewhere I thought I had read that *not* shadowing ROM lets you use that memory space for something else, and I couldn't figure out how that could be the case, since the ROM and RAM share the same address. But I guess that's wrong. If you've got an address space mapped to ROM and you don't shadow it, you're just wasting that area of RAM, right?
Here's another question, then. Some areas of UMA you can map to either ROM or RAM. For instance, the PCGuide (http://www.pcguide.com/ref/ram/umaMap-c.html) says the space CC000 to DFFFF can be used for either one. So, how does your system know whether an address space is mapped to ROM or RAM? I mean, it's a question of which wires it looks for the information on, right? Do you do this with jumpers, or is there a software way?
Thanks!
--Paul
~{:-)
The memory managemant software that is part of your OS handles it. And you can free up some RAM by not shadowing certain things if you force the memory manager to include those normally excluded addresses. So basically it boils down to trying to do something manually for you specific configuration that the software has been setup to do automatically for all configurations...the ultimate tweaking experiance.
------------------
mjc
Links list:Computer Links (http://www.fortunecity.com/skyscraper/highrise/11/index.htm)
Celts are the men that heaven made mad, For all their battles are merry and their songs are all sad.
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.