Hi Valery,
Valery V. Sedletski wrote:
So, the questions are:
- There is L4Linux. It is mostly 32-bit. But as I know, the Linux kernel also contains some 16-bit parts, such as setup code (it
works with BIOS routines and probes hardware), and also (as I heard) acpi suspend/wakeup code. So, it contains 16-bit segments. But doesn't it interfere with L4? How did the people porting Linux to the L4 microkernel solve the problem of 16-bit code? And doesn't it interfere with ELF format capabilities (it is pure 32/64-bit, as I understand)?
The parts of 16-bit code in the Linux kernel are primarily to bootstrap the system and to bring it up again from deep sleep modes. In L4Linux, the microkernel does most of this job. So there is no need to run these parts in L4Linux anymore and they have thus been removed during the porting.
- Must all the segment registers be CS == DS == ES == FS == GS == SS == FLAT in L4 usermode programs (in Intel
architecture implementation)? Or, there exist a possibility to use segments other than FLAT?
Fiasco preserves some of these segments (e.g., GS to support thread local storage). However, unless OS/2 makes use of these segments in 32-bit mode there is no need to change these from a flat setting.
- Is it possible to cause the L4 kernel to create 16-bit segment descriptor on Intel architecture?
What you are looking for is microkernel support for the virtual x86 mode. Unfortunately, only the old L4 assembler kernels supported this processor mode and these are no longer supported. If you really want to run the 16-bit code on bare metal (and not in something like qemu) you probably need to add support for VM86 into the kernel (e.g., by adding an architecture specific systemcall which executes some code in VM86 mode and which returns with any abnormalities to a 32-bit exception handler).
Best regards
Marcus