Re: Generic bootloader
Posted: Thu Dec 06, 2012 5:59 am
Still, without macros, you would need to copy-paste entire loading and jumping code into every filesystem's bootsector...
While I know this is part of UEFI, I don't think the boot-loader should mess with VBE modes. That task should be left to the device-driver that handles VBE. For instance, I'll refuse to accept the idea that video mode should be setup at boot time, and I will keep my functionality to dynamically change video mode as much as possible, and letting the VBE driver emulate video-mode changes (particulary text mode) only if absolutely necessary.Shikhin wrote:Hi,
So that when a monitor doesn't accept some sort of a VBE mode (and the OS can't detect that), the user won't be able to change the configurations (or do so via something more tough than just changing a file)?rdos wrote:That information is put in the image itself. It knows that it wants to be loaded in protected mode with paging disabled, or that it wants to be loaded in long mode with paging enabled. It is better to let the OS image supply this data rather than a configuration file, which eventually would be edited by an user that might not know the details of the OS image.
64-bit Windows no longer supports running the command shell in text-mode because it cannot use V86 mode to call the video-BIOS to change modes. And when the protected mode VBE interface is buggy (and thus unusable), they have no other choice.Griwes wrote:As far as I was observing what Windows (8 at least) does at boot, it first changes mode into something lower than my max resolution (probably 1024x768), and I think that's because it wants to have ANY video mode before loading device drivers. And STAYS in it if there is none. I'm fairly sure it doesn't use crazy magic of 8086 emulation to do just that. In theory, that's why you have VBE/UEFI video protocols - to set up something temporary in easy way, and fall back to using it longer if you have no drivers for present hardware.
So, rdos, you just went full of retard.
rdos wrote:64-bit Windows no longer supports running the command shell in text-mode because it cannot use V86 mode to call the video-BIOS to change modes. And when the protected mode VBE interface is buggy (and thus unusable), they have no other choice.Griwes wrote:As far as I was observing what Windows (8 at least) does at boot, it first changes mode into something lower than my max resolution (probably 1024x768), and I think that's because it wants to have ANY video mode before loading device drivers. And STAYS in it if there is none. I'm fairly sure it doesn't use crazy magic of 8086 emulation to do just that. In theory, that's why you have VBE/UEFI video protocols - to set up something temporary in easy way, and fall back to using it longer if you have no drivers for present hardware.
So, rdos, you just went full of retard.
Thus, this idea that you cannot change video-mode dynamically is not a design-feature, rather a consequence of bad design-choices by hardware manufacturers and BIOS developpers.
Oh, so now you disagree with yourself.rdos wrote:While I know this is part of UEFI, I don't think the boot-loader should mess with VBE modes. That task should be left to the device-driver that handles VBE. For instance, I'll refuse to accept the idea that video mode should be setup at boot time, and I will keep my functionality to dynamically change video mode as much as possible, and letting the VBE driver emulate video-mode changes (particulary text mode) only if absolutely necessary.
Not at all. Windows cannot do it because they cannot switch to protected mode dynamically. However, I suppose we discuss boot-loaders that can load OSes that run in various modes, and it is only long mode OSes that cannot handle dynamically switching VBE mode.Griwes wrote:rdos wrote:64-bit Windows no longer supports running the command shell in text-mode because it cannot use V86 mode to call the video-BIOS to change modes. And when the protected mode VBE interface is buggy (and thus unusable), they have no other choice.Griwes wrote:As far as I was observing what Windows (8 at least) does at boot, it first changes mode into something lower than my max resolution (probably 1024x768), and I think that's because it wants to have ANY video mode before loading device drivers. And STAYS in it if there is none. I'm fairly sure it doesn't use crazy magic of 8086 emulation to do just that. In theory, that's why you have VBE/UEFI video protocols - to set up something temporary in easy way, and fall back to using it longer if you have no drivers for present hardware.
So, rdos, you just went full of retard.
Thus, this idea that you cannot change video-mode dynamically is not a design-feature, rather a consequence of bad design-choices by hardware manufacturers and BIOS developpers.Oh, so now you disagree with yourself.rdos wrote:While I know this is part of UEFI, I don't think the boot-loader should mess with VBE modes. That task should be left to the device-driver that handles VBE. For instance, I'll refuse to accept the idea that video mode should be setup at boot time, and I will keep my functionality to dynamically change video mode as much as possible, and letting the VBE driver emulate video-mode changes (particulary text mode) only if absolutely necessary.
The UEFI guys could have put video mode changes as a dynamic service that could be run at any time. The BIOS guys could have provided a bug-free protected mode VBE interface. AMD could have supported V86 mode in long mode. There is no need for a common MMIO interface, but rather a piece of software that the OS can use to switch modes.Griwes wrote:Also, it's rather natural that you cannot change the video mode dynamically if you don't have video drivers; both BIOS and UEFI need specific execution environments, that just cannot be kept endlessly. It's rather a technical impossibility to have a graphic-card agnostic way to change video mode dynamically... unless you make graphic card manufacturers to create common standard MMIO interface, which they won't for obvious reasons.
Add "dynamically switching VBE mode without stupid hacks" and you can extend "long mode OSes" to "pmode and lmode OSes".Not at all. Windows cannot do it because they cannot switch to protected mode dynamically. However, I suppose we discuss boot-loaders that can load OSes that run in various modes, and it is only long mode OSes that cannot handle dynamically switching VBE mode.
@UEFI: no, because you might've changed something card specific and it could not work. @BIOS, keep in mind that there was no point to do so, since you generally set VBE mode at boot and it's JUST A FALLBACK in case you don't have device drivers that are responsible for providing dynamic mode switching functionality. @AMD, bless them for dropping that silly hack.The UEFI guys could have put video mode changes as a dynamic service that could be run at any time. The BIOS guys could have provided a bug-free protected mode VBE interface. AMD could have supported V86 mode in long mode. There is no need for a common MMIO interface, but rather a piece of software that the OS can use to switch modes.