Small fixes, lots of code changes (again...)
-Code fits Coding Specifications. Some inconsistancies like timing names are corrected, for example, horizontal active is hActive for all structures, not hDisp, or usH_Active, etc.
-I use a chain (or list) to manage tables. This allowed the removal of nVidia specific stuff in vBiosMap structure. It's also easier to implement new types of card (I don't know what else is there, but if Intel decides to use two tables in the future, we are prepared). Plus, all cards can be treated the same way in patchVbios(). Last but not least, for ATI and nVidia, we can backup only the VESA tables, and not the entire VBIOS.
-there is output for closeVbios, mainly to check it is called and if all structs are freed.
-FIX: mode switching was broken (nobody noticed ?), it should work properly (also for nVidia btw)
-FIX: there were typos in atiSetMode_2 function. Probably harmless, but still.
-FIX: in a 'normal' use (no change of resolution, no patch cancel), the closeVbios function was never called, and the structures never freed. Now should be OK.
@Azimutz, I haven't took a look at your diff yet, making the code fit the Code Spec took some time, but I will. Also, I was thinking about a way to turn autoResolution off if there is no entry for GMA in DSDT. But I'm wondering if this is really the reason why it doesn't work for you. Without patch the mode is set through VBE calls without problems, so...
@BuildSmart, I'm not sure but I think there is a misunderstanding. Patching the VESA table do not require VRAM detection at all. I think the guys were talking about the system RAM detection feature in RC5pre which have been temporarily disabled.
@CEOS, there is some change in the nVidia part. I tested it as much as could with my means but there still are chances it stopped working. I'm particularly concerned about the closeVbios function. I don't expect the graphic bug to be gone, I'm still trying to figure it out. I'd really like to know if you can see the boot prompt though. And even if no changes, output is much appreciated.