Re: Theoretical: Why the original 386 design was bad
Posted: Thu Jan 27, 2011 3:54 am
No need to eliminate any of them. They are superior design features.tom9876543 wrote:That eliminates the following:
GDT/LDT, Segments (in protected mode), Limits, CPL0-3, TSS, IO Permission Map, Call Gates, Instructions like ARPL, eflags I/O privilege level and NT, address / operand size overrides
No way.tom9876543 wrote: OS/2 - IBM would have been forced to write a pure 32 bit version of OS/2, and I believe it would have been able to run 16 bit OS/2 applications by using v8086 mode.
My OS uses them a lot. Even flat C compilers uses them for TLS storage.tom9876543 wrote: Yes a lot of these things you never see such as segment overrides.
They are not. The protection features of the x86 is the key to writing stable, bug-free OSes in assembly. If used properly.tom9876543 wrote: But, a benefit of simplifying the 386 is it allows you to reallocate the opcodes to more useful purposes. For example segment overrides + address/op overrides are 7 single byte opcodes that have been wasted.
Also the protection checks are a complete waste of time, how many transistors are wasted checking the CS limit?
Portable OSes are ****. They will never be able to take advantage of a particular CPU. They will perform poorly on all CPUs instead of decently on one.tom9876543 wrote: Another reason is there is no equivalent on other architectures such as ARM or PowerPC, so any portable operating system simply won't use them.
The IOPL was a major feature to be able to virtualize IO-ports used in old DOS programs that tended to use hardware directly. It is not very useful today, but it was essential at the time of the 386.tom9876543 wrote: I guess your microkernel is NOT portable. Does ARM or PowerPC support IOPL???? If the IOPL / IO Bitmap was never implemented you would not be here today complaining about something that never existed.
There is no need for an Unreal Mode with a 386+ processor. BIOS can simply switch to protected mode, create a flat environment and achieve the same thing, and then switch back to real mode.tom9876543 wrote: A 386 has a 32 bit physical address space. BIOSes today have to use the Unreal Mode "feature" to access all the address space while in real mode. I would say there needs to be a replacement for Unreal Mode since its not possible under this proposed design.
The resulting model with an ability to mix 8, 16 and 32 bit operands (as well as 16 and 32 bit segments) is superior and a major design feat.tom9876543 wrote: Intel kept 286 compatibility even though any true 32 bit operating system does not really need the 286 protection model.
Call gates are superior to switch from user to kernel space. First, it defines trusted entry-points, and secondly, it goes directly to the destination without any intervening code. Clearly superior to anything currently used (SYS ENTER/SYS EXIT). When used with registers only, it is possible to define common entry-points for both 16 and 32 bit applications with almost no overhead.tom9876543 wrote: How many transistors are wasted to implement call gates, task gates etc?????