Neptune OS: a WinNT customization of the seL4 microkernel

The publication of the first experimental version of the Neptune OS project, which differs from the project of the Debian-based Linux distribution with the same name.

This system that we will talk about today is characterized by developing a plugin for the seL4 microkernel with the implementation of Windows NT kernel components, with the goal of providing support for running Windows applications. 

About Neptune OS

the project iimplements the "NT Executive", one of the layers of the Windows NT kernel (NTOSKRNL.EXE), responsible for providing the NT Native system call API and interface for drivers to work.

On Neptune OS, the component NT Executive and all drivers do not run at kernel level, but as user processes in an environment based on the seL4 microkernel. The interaction of the NT Executive component with the drivers is carried out through the seL4 IPC standard. The provided system calls make it possible for the NTDLL.DLL library to work with an implementation of the Win32 API used in applications.

 NT Executive is also responsible for the Windows kernel driver interface (known as the Windows driver model), which includes features such as IoConnectInterruptIoCallDriver

On Windows, these are loaded in kernel mode and linked with theNTOSKRNL.EXEimage. In the Neptune OS, we run all Windows kernel drivers in user mode and they communicate with the NT Executive process through the standard seL4 IPC primitives.

The end goal from the Neptune OS project is to implement enough NT semantics so that the ReactOS user environment can be ported under Neptune OS, as well as most ReactOS kernel drivers.

In theory, the developers mentions that they should be able to achieve binary compatibility with native Windows executables as long as the offered implementation of the native NT API is faithful enough.

We should also be able to achieve a high degree of source code compatibility with Windows kernel drivers. The main obstacle to achieving binary compatibility of kernel drivers is that many Windows kernel drivers do not follow the standard Windows driver communication protocol (i.e. they pass IRPs when they need to call another driver) and instead , they just pass pointers and call other controllers directly. On Neptune OS, unless it's a driver-minidriver pair, we always run "kernel".

About Neptune OS 0.1.0001

The state of the project at this time is a preliminary version, since we have so far been able to implement enough NT primitives to load a basic stack of keyboard drivers, which includes the kbdclass.sys keyboard class driver and the port driver. PS/2 i8042prt.sys, as well as a basic command prompt ntcmd.exe, taken from the ReactOS project.

Hardly any of the shell commands actually work, but the keyboard stack is stable. Debug builds can be a bit slow as too many debug logs are being generated.

But it is mentioned that these can be disabled in the code (you should point to private/ntos/inc). It is also mentioned that a "beep.sys" driver was included (which doesn't make sense, but only the developer will know why) that makes an annoying sound in the PC speaker and that in order to hear it, you must unmute ( especially if you use pulseaudio).

All controllers run in user space! The entire system fits on one floppy disk and can be downloaded from version v0.1.0001. You can also build it yourself, the procedure for which is described in the next section.

Finally, for those who are interested in knowing a little more about the project, you can consult the details In the following link.

The size of the boot image is 1,4 MB and the code is released under the GPLv3 license.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.