kogan@novavax.UUCP (Michael S. Kogan) (10/08/87)
I am a studend at Nova University in Ft. Lauderdale ,FL, and have begun work on porting MINIX to protect mode for INTEL's 80286. I am using DOS as my development system, and the Microsoft 3.0 C Compiler and MASM 2.0 since these tools are capable of emitting protect mode code. I have already ported the base system to the new tools, and am coding the protect mode startup now. Initially the system will run in <1M of memory, with 1 TSS and all processes sharing the GDT (no LDT). The IDT is setup via the setvec() routine the kernel uses during initalization. After the loaded system is mapped into the GDT, calls to allow manage GDT descriptors for allocation requests (fork/exec) are all that is necessary to run the system. Initially one kernel stack will be used and the system is still entered via the Int SYSVEC instruction. Ultimately, I would like to allocate a TSS per process, use LDTs as aliases into the GDT to separate the processes and change the system call mechanism to use a Call FAR to a call gate. In order to use the full 16M of memory, I am planning future changes to the memory management scheme that will expand on the click-model without replacing it. As for swapping or memory overcommit, it is not worth the trouble to do this on a 286. A really interesting project would be to use a 32-bit C compiler for the 386 to build a flat-model minix where each process gets a 4G address space with small model programs ! I have also added support to the kernel for a kernel debugger that uses an external terminal hooked up to COM1 or COM2 as the debugging console. None of this is stable enough to post yet, and I really don't know how to post it as the source and tools required a large amount of changes in order to use the Microsoft tools (the C86 compiler is really hokey). I also have a personal gripe to air about systems code in C that does not use forward declarations and parameter type checking by the compiler. I have found many places in the 1.1 source where parameters are actually left out ! If anyone else is interested in building protect mode systems, the XENIX 2.0 from IBM/Microsoft contains a XENIX/DOS cross development system, and all of the work that I have done on DOS can be built there too. While I am not sure of the policies regarding MINIX work, I would like to attempt to publish the results on "Porting MINIX to Protect Mode" some time in the future. What are the guidelines (AST) ? Mike Kogan (kogan@novavax) (305)-241-6884