Video BIOS shadowing

Bfavre444

Senior member
Mar 6, 2001
351
0
0
What is Video BIOS shadow in BIOS? I had a crash and read up that disabling any bio caching may prevent some crashes and data corruption. Is video BIOS shadow something different? It says Video BIOS shadow improves performance but what about data corruption during a crash or stability? Is it a big performance hit?
 

onelin

Senior member
Dec 11, 2001
874
0
0
I'm by no means an expert on the setting, but what I was taught (back when I was first learning these things) was that it's a bad thing. I'd love to hear an in-depth explaination of it tho :)


What I will say is it shouldn't be a big performance hit to have it disabled... I always keep it disabled because of a similar line of thought to "prevents crashes/possible corruption/whatever" ... I'm not really sure why manuals/defaults are usually set to enabled.

hopefully someone else has something to say on it
 

Sukhoi

Elite Member
Dec 5, 1999
15,342
104
106
I'm also interested in this. I usually turn all the shadowing off, but should I have any of it on?
 

Bozo Galora

Diamond Member
Oct 28, 1999
7,271
0
0

"And the last thing we'll cover here is Video BIOS Shadowing, which is generally found under the Advanced BIOS Features tab. This parameter turns on BIOS shadowing for the block of memory normally used for standard VGA video ROM code. Shadowing, in short, copies the video BIOS code from slower ROM to system RAM. This, again, is an older tweak that means little in today's world - so leave this DISABLED."

shadowing is placing memory data in system ram instead of some peripheral device memory - at same time - thus "shadowing"

In other words, the 2.8ns RAM on your Ti4600 that MAY load the STANDARD VGA bios rom code when you fire up your computer under certain conditions, is way faster than your system RAM, and shadowing harkens back to old-old video cards, and is never even useable except in safe mode or when you change drivers, but not even then.

The setting has no reason to exist at all.
 

Bozo Galora

Diamond Member
Oct 28, 1999
7,271
0
0

and heres the short quick answer from rojakpot:

Video BIOS Shadowing

Options : Enabled, Disabled

When this feature is enabled, the Video BIOS is copied to the system RAM for quicker access. Shadowing improves the BIOS' performance because the BIOS can now be read by the CPU through the 64-bit DRAM bus as opposed to the 8-bit XT bus. This seems quite attractive since that's at least a 100x increase in transfer rate and the only price is the loss of some system RAM which is used to mirror the ROM contents.

However, modern operating systems bypass the BIOS completely and access the graphics card's hardware directly. So, no BIOS calls are made and no benefit from BIOS shadowing is realized. In light of this, there's no use in wasting RAM just to shadow the Video BIOS when it's not used at all.

Ryu Connor confirmed this by sending me a link to a Microsoft article about Shadowing BIOS under WinNT 4.0. According to this article, shadowing the BIOS (irrespective of what BIOS it is) does not bring about any performance enhancements because it's not used by WinNT. It will only waste memory. Although the article did not say anything about Win9x, it's the same for Win9x as it's based on the same Win32 architecture.

Not only that, some manuals also allude to the possibility of system instability when certain games access the RAM region that has already been used to shadow the Video BIOS. However, this is no longer an issue as the shadowed RAM region has been moved far from the reach of programs.

What could be an issue is if only 32KB of the video BIOS is shadowed. Newer video BIOSes are larger than 32KB in size but if only 32KB is shadowed and the rest is left in their original locations, then stability issues may arise when the BIOS is accessed. So, if you intend to shadow the video BIOS, you'll need to ensure that the entire video BIOS is shadowed. In many cases, only the C000-C7FF region is shadowed by default. To correct that, you'll need to :-

* enable video BIOS shadowing (for the C000-C7FF region) and
* enable the shadowing of the remaining portions, i.e. C800-CBFF, until the entire video BIOS is shadowed.

That tip was generously contributed by X.

Finally, most graphics cards now come with Flash ROM (EEPROM) which is much faster than the old ROM and even faster than DRAM. Thus, there's no longer a need for video BIOS shadowing and there may even be a performance advantage in not shadowing! In addition, you shouldn't shadow the video BIOS if your graphics card comes with a Flash ROM because you wouldn't be able to update its contents if shadowing is enabled.

On the other hand, there may still be a use for this feature. Some DOS games still make use of the video BIOS because they don't directly access the graphics processor (although more graphical ones do). So, if you play lots of old DOS games, you can try enabling Video BIOS Shadowing for better performance. This tip is courtesy of Ivan Warren.

For an excellent overview of video BIOSes and their shadowing, check out William Patrick McNamara's explanation :-

The whole issue is historical in nature. Way back when having a VGA video card was a big thing, graphics cards were pretty dumb and fairly simple as well. They amounted to a chunk of memory that represented the pixels on the screen. To change a pixel, you changed the memory representing it. Things like changing color palettes, screen resolutions, etc were done by writing to a set of registers on the video card. However, everything was done by the processor. Since interfacing with hardware varies with the hardware, talking to the video card depended on the card you had installed. To help solve the problem, the video card included a BIOS chip on it. Quite simply the video BIOS was
an extension to the system BIOS. It was simply a documented set of function calls a programmer could use to interface with the video chipset.

So why did BIOS shadowing come about? The memory used to store the BIOS on a video card is usually some sort of EPROM (Electrically Programmable Read Only Memory). A very fast EPROM has an access time of 130-150ns, which is about the same as the memory in an 8086 based computer. Also, the bus width is 8bits. As computers got faster (x386, x486, etc) and games got more graphical, calling the BIOS got to be more of a bottleneck. To help alleviate the problem, the video BIOS was moved to the faster 16bit system memory to speed things up. Actually most graphical DOS games rarely call the BIOS anyway. Most interact with the chipset directly if possible.

A quick summary: In the "old days", video BIOS didn't really have much to do with running the video card. It simply provided a set of function calls to make a developers life easier.

"And now for something completely different....."

New video cards, ones that have accelerated functions, fall into a different category. They actually have a processor built on the card. In the same way that the system BIOS tells you processor how to start your computer, your video BIOS tells you video processor how to display images. The reason, new card have flash ROMs on them, is so that the manufacturers can fix any bugs that exist in the code. Any operating system that uses the accelerated features of a video card, communicates directly with the processor on the card, giving it a set of commands. This is the job of the video driver. The idea is, the driver presents the operating system with a document set of function calls. When on of these calls is made, the driver sends the appropriate command to the video processor. The video processor the carries out the commands as it programming (video BIOS) dictates.

As far as shadowing the video BIOS goes, it doesn't matter. Windows, Linux, or any other OS that uses the accelerated functions never directly communicates with the video BIOS. Good 'ole DOS however still does, and the same functions that existed in the original VGA cards exist in the new 3D cards. Depending on how the video interface on DOS programs is written, they may benefit from having the video BIOS shadowed.

Quick Summary #2: In today's accelerated video cards, the main job of the video BIOS is to provide a program for the video processor (RIVA TNT2, Voodoo3, etc) to run so that it can do its job. Interface between the video card and software is done through a command set provided by the driver and really has nothing to do with the video BIOS. The original BIOS function are still available to maintain backwards VGA compatibility.

More on this can be found from his e-mail (Comment #91). Check it out for more information.

For a final confirmation on why you should not shadow the video BIOS, check out Steve Hauser's account of his bad experience with video BIOS shadowing :-

A few years back (probably '96 or so) I had a Matrox Millenium card and the BIOS I had at the time defaulted to shadowing enabled for the VGA BIOS... *WELL* the Millenium had a larger than 32KB BIOS. So, when I ran a BIOS flash, the first bit just copied into the shadow in system RAM, while the rest hit the video card itself.

Needless to say, with the first 32KB block missing, the BIOS of the card was completely corrupted and no longer functioned. Already you can see how shadowing *CAN* get you in real trouble with carelessly written flash software (that doesn't check for it first). Now, I can't attest to any speed increases/decreases it may have caused but here's the really pertinent part, what happened with the card after it no longer had a BIOS....

It still worked! (mostly)... ALL 'DOS' video modes were gone - total blank screen. But you can hear the computer beep and then boot normally. Once the Windows GUI (with proper drivers) loaded, it operated 100% normally. All video acceleration modes worked fine... *EXCEPT* anything related to DOS (even a DOS window within Windows itself) was 100% devoid of text. This includes the 'built-in' VGA (640x480x16 colours) safe mode which also didn't work at all (since it doesn't use drivers).

So, apparently you are 100% correct in assuming that modern video cards do not use the 'DOS addressable' BIOS for anything except driverless VGA/EGA/text modes... Now, that's not to say 'BIOS updates' are useless, as the actual BIOS of the card includes far more than the little table DOS can see. It can include micro-code with patches for problems (just like how motherboard BIOS updates can fix certain processor problems).

I've given you at least one case now where enabling BIOS shadowing can cause SERIOUS and permanent harm to the video card itself... After the failed 'shadowed' flash, the card was never again able to render DOS video modes or text; and further BIOS updates would not work since they 'failed to detect current BIOS revision'.

If you are wondering why you should still update the video BIOS even though it appears to be useless, the video BIOS doesn't only contain the DOS video functions. The video BIOS on cards these days also contain code for 2D, 3D and video acceleration. Thus, using the latest video BIOS is likely to boost performance and cut down on bugs. In addition, the latest drivers may not work with older versions of the video BIOS. So, it's advisable to keep updating the video BIOS whether you use real-mode DOS or not. Tip thanks to Adam Nellemann! :)
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
It's really fun when people who don't really know what's going on are cooking up lengthy technical explanations. It's nothing to do with "intelligent" or "dumb" graphics cards. The VGA compatible part is always CPU driven, no matter how expensive the card is.

Point being that with ROMs on AGP and PCI cards, shadowing is ALWAYS BEING DONE regardless of BIOS setting. Unlike ISA card ROMs, PCI and AGP ROMs don't appear in the standard ROM area all by themselves - the BIOS has to enable some shadow RAM where they belong, copy the ROM contents in there, and then invoke it. Later that part of shadow RAM gets write protected to look like a ROM to the operating system. It doesn't matter how large it is, VGA ROM shadowing is not limited to 32 KBytes at all.

It has to be that way, it doesn't work the other way round, and it's part of the PCI BIOS specification. You always get VGA BIOS shadowing. The setup switch does nothing for a PCI or AGP card. End of discussion., I hope.

Regarding the flashing, that doesn't even address the area where the shadowed copy of the VGA BIOS code lies. The flasher utility has to use a method proprietary to the given graphics chip to reach the actual, physical FlashROM chip, which is completely elsewhere in the CPU's view, not at all in the legacy ROM area where the runtime copy of VGA BIOS lies.

regards, Peter (an x86 BIOS engineer)
 

Sukhoi

Elite Member
Dec 5, 1999
15,342
104
106
Thanks Peter! Can you confirm that it's also a good idea to turn off the rest of the shadowing options (I can't remember the exact names) in the BIOS?
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
Mem, did you even read the above? No you didn't, else you'd noticed that the Shadowing switches in BIOS have a placebo effect at most. Unless you still use ISA gear that is.

Sukhoi, you didn't get it either. The switches do nothing for PCI and AGP.

regards, Peter
 

Sukhoi

Elite Member
Dec 5, 1999
15,342
104
106
Sukhoi, you didn't get it either. The switches do nothing for PCI and AGP.

I know that. IMHO it's a better idea to have something turned off rather than on even if it isn't doing anything.
 

Mem

Lifer
Apr 23, 2000
21,476
13
81
Peter ,

Yes I did,I only mentioned it`s good to have it disabled because I`ve been round to my friends that have had some problems with some games and saw in bios they had it on, turning off the video shadowing in bios helped .Anyway I was not saying anything negative or even mentioned your post
rolleye.gif
. As a hardcore gamer I always have all video shadowing off to improve gaming stability.

:)
 

DaveF

Member
Jun 8, 2001
120
0
0
Is this the same thing as 'video ram cacheable'?

edit: what about 'system bios cacheable'? Recommendations on its setting?
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
Mem, read my lips: IT DOES NOTHING. DEFINITELY NOT. If you saw it "help", then you either mixed things up or suffer from placebo effect.

"Video RAM cacheable" actually does something, and may screw up if the graphics chip doesn't separate its cacheable and non-cacheable memory resources (frame buffer RAM vs. register set) properly.

BIOS cacheability, again with ISA-free systems, should be left enabled for best boot speed and performance in ACPI-enabled operating systems. Having it enabled in non-ACPI OS doesn't harm either, since things that aren't used don't appear in the caches either.

regards, Peter
 

Mem

Lifer
Apr 23, 2000
21,476
13
81
Mem, read my lips: IT DOES NOTHING. DEFINITELY NOT. If you saw it "help", then you either mixed things up or suffer from placebo effect.

"Video RAM cacheable" actually does something, and may screw up if the graphics chip doesn't separate its cacheable and non-cacheable memory resources (frame buffer RAM vs. register set) properly.

Peter, first calm down and have another beer ;),this taken from Leadtek website,

General Settings

Please use the following recommended settings in your system.
Again, in motherboard BIOS, disable the following items (if applicable):
Video BIOS shadowing
Video BIOS cacheable
VGA Pallet Snooping
System BIOS cacheable
Video RAM BIOS Cacheable
Primary/system frame buffer
VGA frame buffer
Peer concurrency (if your system is full of many peripheral cards, enable it)
Power management (if this is an important feature for you, after the problem is fixed, try to enable it back if it does not effect the graphics performance)
Write Cache pipelining
For "AGP Aperture Size" we recommend setting to the same size as your system memory; but if you see any problems, set it to 1/2 or 1/4 size of your system

I always have both video shadowing and video bios cacheable along with system bios cacheable disabled like Leadtek recommends which works great for me in gaming.

:)
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
I can't believe how ignorant people can be sometimes.

Hammer this into your brain (if any):

* The Shadowing settings do nothing.

* The Cacheability settings are irrelevant once the operating system has booted, unless it's an ACPI OS which benefits from cached system BIOS.

VGA Palette Snoop is another dinosaur that is only relevant if you have an ISA TV card.

Beyond that, leaving frame buffer acceleration, peer concurrency, and write posting FIFOs disabled severely hampers performance. So does having too little an AGP aperture. If your system doesn't work when any of these is turned on, there is a problem in hardware setup that needs to be fixed, or a mainboard design problem. Leadtek's advice are nice for debugging, but laughable at best for a working configuration.

I won't extend this discussion any further. The facts are there (repeatedly), now go get your systems right or believe in whatever you want. Do the latter in church please, not in a place like this where facts should matter.

regards, Peter
 

Mem

Lifer
Apr 23, 2000
21,476
13
81
I can't believe how ignorant people can be sometimes.

Hammer this into your brain (if any):

Peter no need to get upset about it,just because I follow some of the things meationed by Leadtek ,first I meant no offence to you and we all have our gaming bios tweaks that we follow.

I thought this thread was an interesting topic and still do.
If you want to insult me,fine!...I`ve a thick skin I`ve seen too much flamming and am too old now(in age as well) in AT to take the bait.

I`m not saying you`re wrong just that I follow some of the gaming bios tweaks which happen to be like the ones that`re listed at Leadtek ,but not all of them.In the end we all have our on views and opinions and that`s why we have these forums,everybody is entitled to their opinion however small it may be.

Once again no offence was intended .


:)
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
fine for me, but there's simply no room for opinions or personal preference on something that has zero effect to begin with. Get the point please.
 

Danella

Member
Jan 2, 2002
46
0
0
Mem, I saw nothing offensive in any of your inquiries, so no need to appologize.

Not all of us are Bios Engineers, in fact, most of us are here to learn from others, and share in knowledge. Perhaps if one setting or another only exists as a placebo effect, then why not let the placebo work? Many doctors have used placebo's, and for some patients, they work fantastically. Peter, you are the bios engineer, and I believe what you have to say, it does come from knowledge, but I must question if sometimes we don't get too wrapped up in our own knowledge, and sometimes perhaps ignore, or put aside people skills in the quest of knowledge. in essence, why not let the man have his placebo, with a knowledgable answer as to why it doesn't matter, but lend the option for the, "if it makes you feel better, then do it", for those who feel better about it. After all, in your own words Peter, it has no affect anyway, right??

So, if you wish to disable video bios shadow, then do so, you have my permission, and from an engineers stand point, it won't hurt a thing.

Danella
 

Bozo Galora

Diamond Member
Oct 28, 1999
7,271
0
0

And Mem gets trashed again for nothing! :D

Peter:
O.K. Let me ask you a few, ol' buddy. (I consider you a buddy because I also give out gratuitous insults)

Lets say a person has a GF4Ti4600 with 128MB ddr ram. Since with this much onboard memory, there will be few if any calls to the system ram for textures, why is the AGP aperture supposed to be "large enough".

Along the same lines, when is an AGP gart table loaded into system memory (reserved contiguous pages). ........ at startup, or after a 3D acceleration program is initialized. Is it released after the program is closed?


Feel free to insult me - I love insults! Helps to build character. ;)
 

Peter

Elite Member
Oct 15, 1999
9,640
1
0
Danella,

everyone may believe in placebos for their own good. What makes me go through the roof here is that these people then go out and recommend their magic to others - wasting them at least a day, maybe more, while they fiddle with useless BIOS settings instead of working on what the problem really is.

Bozo, true, with local graphics RAM that large, you'll hardly ever get any DIME (Direct In-Memory Execution) texture fetches from system RAM. And regardless of graphics card RAM size, you NEVER want them to happen anyway - simply because the speed gap between graphics card's and system's RAM has become quite large, the speed loss being very impressive.
You still want a large aperture setting because there's lots of software out there that acts funny when it's set to a small size. As this is just the size of a viewing window into main RAM, not an actual amount stolen from there, just set it to whatever pleases your OS and 3D software best.
When, where and why GART tables are actually being loaded and used is entirely up to the 3D part of the operating system and applications. No generic answer to this. From the theory viewpoint, it shouldn't be active unless it's being used at the very moment, because else you would actually reduce the amount of available system memory for nothing.

regards, Peter
 

Mem

Lifer
Apr 23, 2000
21,476
13
81
And Mem gets trashed again for nothing!

Hehe yep,lucky I don`t take it personal ;) and I still have all my video shadowing off :D ,anyway as long as my gaming is rock solid I`m happy.

:)