Is entering VBE modes is real without interrupts or VM86?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Is entering VBE modes is real without interrupts or VM86

Post by Ready4Dis »

Octocontrabass wrote:
Ready4Dis wrote:Actually, for an x86 system, the video bios is at a 'known' location at boot. It is always located at 0x000C0000.
Not all x86 systems are PC-compatible. :roll:

It doesn't really matter where you get the video BIOS, as long as you're getting the right thing. (I wonder what would happen if you tried to use VBE for multiple video cards...)
Ok, you may find a non-standard x86 system, but if that's the case, you still need to know exactly where the video bios for real mode is located... my response was because someone said to scan the PCI bus. I am not sure if you can get the correct rom bios location from scanning the PCI bus, because it's hard mapped (shadowed) into a known location on bootup. If you find a non pc-compatible x86 system, then you obviously can't expect pc-compatible memory layout and you'd have to find out where it is mapped (if it even is, or just relies on having a proper driver).
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Is entering VBE modes is real without interrupts or VM86

Post by Combuster »

The PC bios copies it from the rom image on the PCI card. If you don't have a PC bios, what you do is scan the PCI bus for a graphics card with an option ROM, and copy that option rom somewhere into memory - it doesn't really matter where it ends up because you're emulating that as well.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
embryo2
Member
Member
Posts: 397
Joined: Wed Jun 03, 2015 5:03 am

Re: Is entering VBE modes is real without interrupts or VM86

Post by embryo2 »

Octocontrabass wrote:The emulator receives a copy of the video BIOS from the video card's ROM, which means it doesn't have to do anything special to handle a new video card.
Do you mean the OS provides the video BIOS? For emulator to receive anything it should know the exact location of "anything".
Octocontrabass wrote:For example, locating the video BIOS will most likely be a responsibility of the PCI driver, assuming a PCI video card.
Ok, PCI driver locates the video BIOS, but what are the entry points of the video BIOS? Usually it doesn't matter because the system's BIOS knows everything and we just fire an interrupt without any information about video BIOS internals (and even without knowledge about any other BIOS except the system's one).

And a bit more general question - what other kinds of BIOSes can be present on a machine? One kind is system BIOS, second is video BIOS, are there more kinds? Essentially the system BIOS responsibility can be very limited in case every device have it's personal BIOS. But may be it's a question about the preinstalled software architecture. OSDev wiki seems describes just the system BIOS and misses other kinds.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)
embryo2
Member
Member
Posts: 397
Joined: Wed Jun 03, 2015 5:03 am

Re: Is entering VBE modes is real without interrupts or VM86

Post by embryo2 »

Ready4Dis wrote:No, it bypasses the switch completely by setting up a full x86 environment (using the existing bios/video rom)
May be "by emulating a full x86 environment"? And providing the emulator with BIOS(es) location(s) and a chunk of free memory.
Ready4Dis wrote:So yes, it is a third way, and it alleviates the problems associated with vm86 and/or dropping back into real mode.
Yes, now I see it.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Is entering VBE modes is real without interrupts or VM86

Post by Ready4Dis »

Yes sir, now you have it. You basically give it a full emulated environment, but when it does things like use IN and OUT, you ACTUALLY pass those along and do them, so the emulator process will need certain access rights if you have protection setup.
User avatar
abcdef4bfd
Member
Member
Posts: 492
Joined: Fri Apr 03, 2015 9:41 am

Re: Is entering VBE modes is real without interrupts or VM86

Post by abcdef4bfd »

I'm tried gfxpayload GRUB2 option, but nothing is happened.
Post Reply