Intel propose simplified X86-S
-
- Member
- Posts: 71
- Joined: Fri Jun 28, 2013 1:48 am
- Contact:
Intel propose simplified X86-S
link here: https://www.intel.com/content/www/us/en ... cture.html
Intel thinking about removing deprecated features like real mode, ring 1&2, leaving only 64-bit mode. (32-bit application still works under compatibility mode)
What do you think of it, will it make osdev easier?
Intel thinking about removing deprecated features like real mode, ring 1&2, leaving only 64-bit mode. (32-bit application still works under compatibility mode)
What do you think of it, will it make osdev easier?
Reinventing the Wheel, code: https://github.com/songziming/wheel
- AndrewAPrice
- Member
- Posts: 2300
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Intel propose simplified X86-S
Dropping real mode and protected mode support will likely make processors simpler, which means they'll be faster and cheaper.
I load my 64-bit microkernel with GRUB. This is my code that runs first and sets up the bare minimum to enter long mode. Once in long mode, I never touch 16-bit or 32-bit code again.songziming wrote:What do you think of it, will it make osdev easier?
My OS is Perception.
Re: Intel propose simplified X86-S
A really bad proposal. For one, it will break everything that runs today, perhaps excluded 64-bit EFI OSes that only use a single processor core.songziming wrote:link here: https://www.intel.com/content/www/us/en ... cture.html
Intel thinking about removing deprecated features like real mode, ring 1&2, leaving only 64-bit mode. (32-bit application still works under compatibility mode)
What do you think of it, will it make osdev easier?
Most of the proposed removals will have no or little effect on processor complexity. For instance, if the processor still needs to support loading FS & GS in compability mode, then the full segmentation support is needed. There is no logic in why CS, DS, ES and SS cannot handle segment loads (when FS and GS still must). This probably leads to more complexity not less.
There is also no logic why protected mode (compability mode) cannot work in kernel space, and there is additionally no logic why only two rings would be supported. This doesn't lead to a less complex processor, rather to the contrary since these cases must be detected and caused to fault.
I cannot see this being implemented in a real CPU anytime soon. First, all OSes that want to operate on it will need to handle how to start additional cores, and the new method described doesn't work on today's CPUs. Forget about GRUB and legacy booting, which many modern BIOSes still support.
Hopefully, AMD will not break protected mode like this, and then I can still run my OS on AMD. I'm not going to waste any time on a 64-bit OS.
Re: Intel propose simplified X86-S
Not really. Since they don't want to drop compatibility mode, and the ability to load FS and GS from the GDT/LDT, then they need to retain the segmentation code. They would need to drop compatibility code to be able to reduce the complexity significantly, but that would make all 32-bit applications impossible to run without an emulator. Dropping compatibility mode will probably happen at some point, but I think it is still too early for such a drastical step.AndrewAPrice wrote:Dropping real mode and protected mode support will likely make processors simpler, which means they'll be faster and cheaper.
Besides, most of the segmentation support probably is not in hardware, but in microcode, particularly in Intel processors that have very poor segmentation performance already.
You will need to load your OS using a 64-bit EFI loader. Legacy boot no longer will work.AndrewAPrice wrote:I load my 64-bit microkernel with GRUB. This is my code that runs first and sets up the bare minimum to enter long mode. Once in long mode, I never touch 16-bit or 32-bit code again.songziming wrote:What do you think of it, will it make osdev easier?
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Intel propose simplified X86-S
That's fine, there's still plenty of time for current OSes to be updated.rdos wrote:For one, it will break everything that runs today, perhaps excluded 64-bit EFI OSes that only use a single processor core.
CS, DS, ES, and SS are all implicitly used by various instruction addressing modes. All of that logic - which can't be entirely in microcode because it's so fundamental to x86 - can be simplified because the implicit segment no longer matters; only explicit FS and GS prefixes can impact the effective address.rdos wrote:There is no logic in why CS, DS, ES and SS cannot handle segment loads (when FS and GS still must). This probably leads to more complexity not less.
You're either underestimating the complexity of all those rarely-used modes or overestimating the complexity of faulting on attempts to switch to them.rdos wrote:There is also no logic why protected mode (compability mode) cannot work in kernel space, and there is additionally no logic why only two rings would be supported. This doesn't lead to a less complex processor, rather to the contrary since these cases must be detected and caused to fault.
It won't be. This kind of change takes a while to make it to hardware.rdos wrote:I cannot see this being implemented in a real CPU anytime soon.
That's fine, ACPI provides a method that does work on today's CPUs. The only part that has to change is the switch between 4-level and 5-level paging.rdos wrote:First, all OSes that want to operate on it will need to handle how to start additional cores, and the new method described doesn't work on today's CPUs.
You know GRUB supports UEFI, right? And many modern PCs no longer include a CSM (or it doesn't work because some component doesn't have a legacy option ROM). Multiboot won't work, but Multiboot was never very good in the first place.rdos wrote:Forget about GRUB and legacy booting, which many modern BIOSes still support.
AMD is definitely going to follow Intel's lead here.rdos wrote:Hopefully, AMD will not break protected mode like this, and then I can still run my OS on AMD.
- AndrewAPrice
- Member
- Posts: 2300
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Intel propose simplified X86-S
Not sure if this is a true concern for Intel. Windows and Linux will have support by the time the first commercial x86-S CPUs go on sale. For most users, this is good enough.rdos wrote:For one, it will break everything that runs today, perhaps excluded 64-bit EFI OSes that only use a single processor core.
It sucks for some users, but perhaps someone will just make a minimal Linux distro that starts a full-screen QEMU so you can run your real mode OS.
Yes. Sorry, my point was my non long-mode code was isolated to a single file, demostrating how insignificant (compared to the rest of the OS in terms of volume of code) that first bootstrap is. EFI will be different, but basically efi_main's job will be to get the system in the same state as my multiboot entry point before calling kmain.rdos wrote: You will need to load your OS using a 64-bit EFI loader. Legacy boot no longer will work.
My OS is Perception.
Re: Intel propose simplified X86-S
There is nothing to update to. The flat memory model of long mode is a nightmare for creating a stable OS. x86-64 largely is a 32-bit environment with 64-bit addons.Octocontrabass wrote:That's fine, there's still plenty of time for current OSes to be updated.rdos wrote:For one, it will break everything that runs today, perhaps excluded 64-bit EFI OSes that only use a single processor core.
ACPI is software, not hardware, and so it doesn't matter. Besides, do any major OS use ACPI for starting cores?Octocontrabass wrote:That's fine, ACPI provides a method that does work on today's CPUs. The only part that has to change is the switch between 4-level and 5-level paging.rdos wrote:First, all OSes that want to operate on it will need to handle how to start additional cores, and the new method described doesn't work on today's CPUs.
I'm not convinced. AMD didn't follow Intel when they launched a completely new CPU for the 64-bit market, rather took the lead to extend x86 to 64-bit. AMD also have reasonably fast segmentation support on modern CPUs, and so probably have less microcode in the area.Octocontrabass wrote:AMD is definitely going to follow Intel's lead here.rdos wrote:Hopefully, AMD will not break protected mode like this, and then I can still run my OS on AMD.
Re: Intel propose simplified X86-S
My OS is 32-bit protected mode, and no emulator can run it AFAIK. Mostly because emulators have faulty segmentation support.AndrewAPrice wrote:Not sure if this is a true concern for Intel. Windows and Linux will have support by the time the first commercial x86-S CPUs go on sale. For most users, this is good enough.rdos wrote:For one, it will break everything that runs today, perhaps excluded 64-bit EFI OSes that only use a single processor core.
It sucks for some users, but perhaps someone will just make a minimal Linux distro that starts a full-screen QEMU so you can run your real mode OS.
However, I'm not concerned about that. It will take decade or two before these CPUs are mainstream, and I can buy the hardware I need well before that happens. I will retire from professional software development within a decade, and I'm sure I have more interesting stuff to do than to waste my time on poor CPU designs.
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Intel propose simplified X86-S
That doesn't seem to stop anyone on non-x86 CPUs.rdos wrote:The flat memory model of long mode is a nightmare for creating a stable OS.
Linux does.rdos wrote:Besides, do any major OS use ACPI for starting cores?
Re: Intel propose simplified X86-S
Octocontrabass, I appreciate all you contribute, so can you please clarify what you think "many modern PCs no longer include a CSM" entails? Like, which products are you seeing?Octocontrabass wrote:You know GRUB supports UEFI, right? And many modern PCs no longer include a CSM (or it doesn't work because some component doesn't have a legacy option ROM). Multiboot won't work, but Multiboot was never very good in the first place.rdos wrote:Forget about GRUB and legacy booting, which many modern BIOSes still support.
nvidia still relies on Boot Mode = Legacy/CSM: https://www.guru3d.com/news-story/nvidi ... ues,3.html
MSI shipped with Boot Mode = Legacy/CSM as the default in 2021 -- a later update changed that, causing tons of support issues: https://www.reddit.com/r/MSI_Gaming/com ... t/jh0doyj/
Should I go on?
Re: Intel propose simplified X86-S
Not to be pedantic, but that source code kind of contradicts what you're saying:Octocontrabass wrote:Linux does.
Code: Select all
* The CPU being woken up is essentially in a spin loop waiting to be
* woken up. It should not take long for it wake up and acknowledge by
* zeroing out ->command.
What if it's a chromebook and doesn't support the ACPI wakeup mailbox?
etc.
Re: Intel propose simplified X86-S
Kind of my experience too. I support both legacy/CSM boot and EFI boot (32-bit & 64-bit), but on a lot of PCs Legacy/CSM works while EFI doesn't, and so I boot several PCs using Legacy/CSM even if they are fairly new and support EFI booting. Part of the problem with EFI is that it is only tested with Windows, and some manufacturers try to lock down the machine to only Windows.sounds wrote:Octocontrabass, I appreciate all you contribute, so can you please clarify what you think "many modern PCs no longer include a CSM" entails? Like, which products are you seeing?Octocontrabass wrote:You know GRUB supports UEFI, right? And many modern PCs no longer include a CSM (or it doesn't work because some component doesn't have a legacy option ROM). Multiboot won't work, but Multiboot was never very good in the first place.rdos wrote:Forget about GRUB and legacy booting, which many modern BIOSes still support.
nvidia still relies on Boot Mode = Legacy/CSM: https://www.guru3d.com/news-story/nvidi ... ues,3.html
MSI shipped with Boot Mode = Legacy/CSM as the default in 2021 -- a later update changed that, causing tons of support issues: https://www.reddit.com/r/MSI_Gaming/com ... t/jh0doyj/
Should I go on?
Re: Intel propose simplified X86-S
Intel is pretty good at open standards, so it's safe to expect x86-S to work with other OS's. It might not work very well though.rdos wrote:Part of the problem with EFI is that it is only tested with Windows, and some manufacturers try to lock down the machine to only Windows.
Re: Intel propose simplified X86-S
I don't think that logic is very complex, and it's only valid in protected mode / compatibility mode. The effective address will need to consider segment register bases (since FS & GS still can have non-zero bases), and so this cannot be removed. Hard-coding CS, DS, ES and SS with a zero base will not simplify anything, and might break code. The logic to load segment registers from GDT/LDT must be retained since FS and GS must operate with non-zero bases.Octocontrabass wrote:CS, DS, ES, and SS are all implicitly used by various instruction addressing modes. All of that logic - which can't be entirely in microcode because it's so fundamental to x86 - can be simplified because the implicit segment no longer matters; only explicit FS and GS prefixes can impact the effective address.
In the addressing area, all protected mode addressing modes must be retained for full compatibilty. It's possible that 16-bit addressing could be removed, but OTOH, there might be compilers that use 16-bit addressing with FS & GS, and so this could break things.
Re: Intel propose simplified X86-S
Intel has really poor display support for both EFI and VBE. They only support a small set of 4:3 resolutions even when there is a 16:9 display. AMD has a functional VBE and EFI that supports the relevant resolutions. Intel's linear frame buffer implementation generally sucks big time, and borders on unusable for resolutions higher than 800x600. AMDs linear frame buffer generally works well. In essence, you cannot use the native resolution (and speed might be severaly degraded) on a wide-screen Intel PC without a graphics driver in your OS. They also don't support the ACPI objects for controlling processor speeds, and so you need to install their processor driver for that. I wouldn't call that "good at open standards".sounds wrote:Intel is pretty good at open standards, so it's safe to expect x86-S to work with other OS's. It might not work very well though.rdos wrote:Part of the problem with EFI is that it is only tested with Windows, and some manufacturers try to lock down the machine to only Windows.