4 ms·
For the modern server/desktop and even laptop, that's also no bad thing. It is somewhat ridiculous that UEFI bioses, internally, still boot in 16-bit real mode
by zahllos 3y ago
For the modern server/desktop and even laptop, that's also no bad thing. It is somewhat ridiculous that UEFI bioses, internally, still boot in 16-bit real mode and have to do all the steps your bios bootloader used to do to set up a 64-bit environment ready to go: https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a2f911d2fb8b3d2f5768/UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a..., https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a2f911d2fb8b3d2f5768/UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a..., https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a2f911d2fb8b3d2f5768/UefiCpuPkg/ResetVector/Vtf0/Ia32/Flat32ToFlat64.asm https://github.com/tianocore/edk2/blob/edc6681206c1a8791981a...
Why not just start the CPU in "long mode", which is what everyone is using it for, in the first place?
These newer ARM processors support 32-bit code at EL0 only (userspace). That seems like a reasonable approach for x86 as well and the freebsd announcement has this to say:
> There is currently no plan to remove support for 32-bit binaries on 64-bit kernels.
So for the moment, you can run 32-bit applications just fine.
- jsheard 3y ago> These newer ARM processors support 32-bit code at EL0 only (userspace). Even that is being phased out, starting from 2021 ARMs reference cores mostly dropped 32-bit support, with the Cortex-X2 big cores and Cortex-A510 small cores being 64-bit only, and only the medium Cortex-A710 cores retaining the ability to run 32-bit code in userspace. With the next generation the medium cores lost 32-bit support, but the small cores gained 32-bit support again, so the chips can barely still run 32-bit code but it's relegated to only running on the least performant cores. I'm sure they'll drop it altogether as soon as they think the market will accept it.
- ksec 3y agoI think we need to be more specific, since on x86 64bit instructions are a superset of 32bit. On ARM they are different with AArch32 and AArch64 being two separate set of instructions. It is AArch32 that is being dropped and no longer required.
- legulere 3y agoThey’re mostly a superset, but also some instructions were dropped like the bcd opcodes. https://en.m.wikipedia.org/wiki/Intel_BCD_opcodes https://en.m.wikipedia.org/wiki/Intel_BCD_opcodes
- arp242 3y ago> Why not just start the CPU in "long mode", which is what everyone is using it for, in the first place? Are you sure it's "everyone"? No doubt it's "overwhelming majority", but that's not the same, and "everyone" is a lot of people. As I understand how this works, the compatibility is perhaps slightly inconvenient to a small group of developers, but not that inconvenient and generally relatively cheap. So why not have and keep it? ARM has a lot less history than x86. Yes, it goes back to 1985 in the BBC Micro, but didn't really see serious usage as a "generic platform" until the late 90s/early 2000s.
- zahllos 3y agoDo you ever boot your machine only into 32-bit mode? Most UEFI firmware I've seen is launching /EFI/BOOT/BOOTX64.EFI, which means your bootloader is in long mode even if you then switch back to 32-bit mode (and UEFI is likely already there). I don't know if emulating a traditional bios avoids this or not, never thought about it. But I'd take a guess that the vast majority of people are passing through long mode and then back again if they installed a 32-bit OS. I'm not saying remove the possibility of 32-bit userspace and nor are, it seems, freebsd. I am saying don't bother with a 32-bit kernel. Otherwise you're limited to a 4GB address space and hacks like PAE. No harm in running 32-bit binaries if you want and, I think Solaris actually left userspace as 32-bit only even on their 64-bit OS, unless the application really benefited from a 64-bit setup. Not sure what they do now, been a while since I used it. It's arguable ASLR only works well in a 64-bit mode, as well.
- arp242 3y ago> Do you ever boot your machine only into 32-bit mode? No, but I'm not everyone. Or let me put it this way: I don't know the motivation for why the things work like they do. It's entirely possible there is no good reason at all. Or maybe there is? Either way, I wouldn't assume anything so quickly.
- plorkyeran 3y agoIntel is currently trying to find out if it's everyone. The whole point of announcing the idea of dropping the old modes years before you plan to actually do so is to give a chance for people to speak up if it's a problem.
- zokier 3y ago> Why not just start the CPU in "long mode", which is what everyone is using it for, in the first place? Why not indeed? https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html https://www.intel.com/content/www/us/en/developer/articles/t...
- rwmj 3y agoNot even a new idea! https://en.wikipedia.org/wiki/Intel_80376 https://en.wikipedia.org/wiki/Intel_80376 > It differed from the 80386 in not supporting real mode (the processor booted directly into 32-bit protected mode) ... although it didn't support paging.