nullplan wrote:Nobody is stopping you from building a UEFI boot loader that calls ExitBootServices() and drops to 32-bit mode.
The "well, actually..." here is that Intel are almost certainly dropping support for both real mode and 32-bit protected mode in the near future.
And why not? There is no good reason for anyone to continue using those (outside of emulation), since most current software isn't 32-bit specific at all - even the majority of Windows software is written in a way that the developers can easily recompile for either 32-bit or 64-bit, or even ignore the issue entirely and not depend on x86 directly at all (which is why MS has pushed .Net so heavily for so long, after all). Hell, the majority if current application software is interpreted - often badly, admittedly as the translators for Javascript and PHP (the
real disaster, sorry I meant dominant, languages of the past two decades), are generally implemented in an idiotic fashion - and thus it doesn't matter if it is on x86, x86-64, ARM, a 6502 with tons of bank-switched memory, or even Geri's OISC pipedream. And trust me, more software has been written in the past ten years than in the previous fifty.
It is also against Intel's interests to continue supporting 16 and 32 bit code, because it wastes chip real estate they could be use for more superscalar instruction manipulations (not a lot, admittedly, or they would have been more aggressive about it long before now, but enough to want to eliminate them).
I mean, really,
all of the 'x86' and x86-64' code is already basically emulated (via dynamic translation of the same sort QEMU uses, just in firmware) on some internal register-window RISC system rather than run in hardware anyway; there's no point in having that
in hardware when software emulation makes for a more flexible method of running that code, and removing it fixes a lot of lingering headaches for them.
Getting rid of x86 entirely would be even better for them, and frankly, I am quite sure they are champing at the bit to do that. But as I have said many times before, that would present its own set of problems, which is why they didn't do it yet.
Of course, that says nothing about systems software, nor about retro fans who want to run older programs with no modern equivalent (though many of those would have had to be emulated even when BIOS was dominant, if only for timing issues and/or because they used privileged operations). Octocone is right, the standards do not take minor, hobbyist OSes into account.
And you know what? They never did. The fact that we've been able to do this
at all, the fact that Linux and FreeBSD and several other non-Microsoft - or rather, non-Digital Research - operating systems are even possible, came out of a
mistake IBM made - one I am glad for, one which sent Big Blue's
genuine monopoly to the trash bin of history where it belonged, but a mistake nonetheless. Had they been thinking, they would have locked the PC down into using CP/M-86, and none of this would be a question because either there would only be CP/M, or more likely, the PC would have faded into obscurity and some
other company - Apple, perhaps - would have the market and have
actually locked out alternative OSes.
The point I am making is that there is no incentive, fiscally, for them to cater to us, and every incentive to try and squash up like bugs. I am not talking about Microsoft here; MS is the friend nobody likes, and if Intel could push them off a cliff, they would. But it is against
Intel and AMD's's financial interests to support any and all comers - that cannot do anything but make their products ans support services unprofitable, which would end the game outright for the PC market.
Finally: Zaval and DiggDug were talking about different things. What DiggDugg was referring to as 'where UEFI is' would have been more clearly stated as 'where the partition-specific start-up data resides', not 'where the UEFI firmware binary resides'.
Zaval read that far too literally. I suspect this was deliberatel, for the sake of provocation, but I can't be certain if this is the case or not.
So we are talking about the UEFI system partition - that is to say, in the
dedicated, single-purpose system partition meant to contain
only the
\EFI\ directory - a partition that should be used
only for that purpose, which is why it is only 100MiB in the first place. My understanding is that the only programs that should
ever touch that partition at all are the UEFI firmware itself, and the OS installer and updater tools, and the only things that should be in it are the
*.efi definition files, and possibly one or more rump file system drivers (not in the hardware sense, of course, but you get what I mean, I hope) for the UEFI loader to use.
This is important, because both DiggDug and Octocone seem to have missed this, so to reiterate:
putting your OS on the UEFI system partition is Doing It Wrong™.
As best as I can determine, DiggDugg and Octocone also missed another important detail about the UEFi system partition - the UEFI docs as quoted earlier state that the system partition is in
a unique file format derived from FAT. My impression from that wording is that, while is
similar to FAT32, it isn't actually FAT-compatible. This was probably intentional, to discourage people from, you know, using that partition for something other than what it is there for.
It doesn't matter, however, since as I just noted, this partition is
only used by UEFI itself (and the OS installer program), and only to hold information about the booting process for the
other partitions. The standard says
nothing about the other partitions' formats, only that (IIUC) there must be
at least one partition other than the system partition (there is also the GPT, but that, like the older MBR, is separate from
all of the partitions) I am not sure if it says this outright, but AFAICT, that is the intention.
Oh, and that the x86-64 UEFI firmware must have direct support for FAT, because at the time the standard process began, that was the lowest common denominator. They can add different file-system specific drivers as well, and (again, IIUC) the UEFI firmware can be interrogated by the OS installer to see what drivers it has, so that the installer doesn't need to use their own - but they can always use their own anyway.
I am pretty sure that if MS themselves has chosen things, they would have said NTFS - after all, Windows has defaulted to that since XP... Indeed, my understanding is that most x86-64 UEFI firmware implementations support NTFS
and ext4 out of the box. Because as long as they also support FAT, there is nothing to stop them from supporting any others that they find it useful to support, and both Intel and AMD find ext4 and NTFS useful. And all of that is just a sop to the system implementors - it is always possible to write your own drivers for the *.efi file to use.
At least, this is my reading of it. Comments and corrections welcome.