[comp.os.minix] Protected Mode Minix

martyl@rocksvax.UUCP (Marty Leisner) (07/31/87)

I've seen some news traffic on talk of implementing a protected mode Minix
system on PC ATs.  Anyone making any headway on this?

In order to do it, I need to resolve some issues.
1) Is there a way to differentiate between the different hard disk 
controllers for the different ATs?  I want to be able to boot a system
with one hard disk driver -- or at least a driver which gets configuration
information from someplace.  I've saved some messages about various controllers
I've seen on this news group -- is there any definitive answer about these
hard disk controller boards??  I'm only using genuine IBM ATs of various 
vintages.

2) I've spent a few days playing with the 80286 to get it to run in 
protected mode.  Seems I understand what's involved now.  I'm planning on
using Aztec C to recompile the kernel -- is what I'm using and I understand
its code generation.  I've seen some discussion about using MSC -- but the
major reason I don't like msc is no source code for the libraries.  At 
least with Aztec I can quickly compare the source between the Minix source and
the Aztec source.  

3) Anyone have an MS-DOS emulator?  It should be very straightforward to map
a number of functions through interrupt 21 to the Minix kernel -- a large
number of functions (open/close/seek/read/write) all have nearly identical
meanings in DOS and Unix.  The emulation doesn't have to be perfect -- it just
has to be enough to do something useful (which means no direct video calls
necessary -- if the program doesn't expect to talk to stdin/stdout/stderr,
forget it).

4) Has anyone done anything with ethernet on Minix?

5) I'm planning on handling all exceptions in an intelligent manner --
if I feel like it I may also do things like copy on write after fork.  I'm
not yet sure whether to build it up as a 2 layer system (user/supervisor) or
a 3 layer system (user/file system/security kernel).

6) I may look at some Xwindows concept.  I definitely want some type of
windowing built in.

My major motivation to use Minix is I want a protected mode file system and
memory manager which I have source code for and works.  
My target system is going to have to support a reasonable amount of 
concurrency and be used in a real-time environment requiring millisecond
resolution -- what I currently see is something that on a 1 khz interrupt
(no kernel mode?) to execute real time control. 

If I ever have a change to do it, I'll put out the modified sources.

Once I start to change things, I don't guarantee anything.

Comments/questions/criticisms welcome.

marty leisner
xerox corp.
leisner.henr@xerox.com
martyl@rocksvax.uucp

ed_l_patriquin@cup.portal.com (09/13/88)

I am currently working on a port of Minix 1.2 to protected mode.  I
currently have Minix running in protected mode and am tracking down
various bugs.  I should be ready to ship out beta versions to
interested parties sometime later this fall.

Ed Patriquin
Plus Development

aubrey@val.UUCP (Aubrey McIntosh) (04/19/89)

In article <13389@louie.udel.EDU> hhw5665@acf3.nyu.edu (Hsin-Hui Wu) writes:
>Hi,
>
>	I planned to put the Minix 1.3 into Protected mode, but I got
>some problems. I wonder whether 286 real mode interrupt routines can be
>used in 286 protected mode. The CPU reserves IDT gate 8 and 9 for
>internal exceptions. But where are the timer interrupt gate and keyboard
>interrupt gate?
>
>   	I think maybe I misunderstood the architecture of protected mode
>(I hope so). Is there any one who can tell me the differences of IDT 
>table between real mode and protected mode? I already knew the structures
>of these two modes, but I am naive about the usage. Any help will be
>much appreciated. Thanks in advance.
>
>	Or any reference books will be much appreciated.
>
>
>						Frank Wu
>
>hhw5665@acf3.nyu.edu

One problem is that interrupts < 20H are reserved by Intel.  However,
the IBM-AT uses them for its own (conflicting) purposes anyway.  One
clever result of this is that a check bounds instructions toggles the
int 5 routine, which means that obscure run time errors with some
compilers causes the printer to print the screen.  See also p.5-79
of the AT Technical manual, "verify '286 bound instruction."

It turns out that the 8259, the interrupt controller, puts out the
interrupt number (or the vector address, I forget which) on the bus
when it is wired up for '88 mode.  The bottom 3 bits are the values
from the priority, and the other bits are programmed into the part.
The IBM bios places the well known values corresponding to vectors
8..15 at boot time; however, these can be re-programmed to some address
which is not reserved by Intel.   

 Anyway, my interest in Minix is because I want:
  1)  A protected mode operating system,
  2)  Source to it,
  3)  A Modula-2 compiler for it.

I figure Minix is as good a bet of getting there as any.

So now I raise the question?

Where do we put the 16 interrupt vectors in Protected Minix?
I recommend that all 16 of them are in one consecutive block, and
I like powers of 2, so the address corresponding to int 64..int 79
seem like a good candidate.  Discussion?  




-- 
Whatcha' call a boomerang that doesn't come back?      --Lost--
--------------------------------------------------------------
1-(512)-346-5781 (v)                                Using Modula-2.     
Austin, TX 78759   ...!cs.utexas.edu![dell|oakhill|kvue]!val!aubrey

mcd@ccsitn.att.com (09/09/89)

I have been away from the minix community for quite a while and just 
recently got hooked back up with the mailing list.  Way back when someone
was working on a protected mode minix that would even run some DOS stuff.
Did this project ever come to fruition?  I have read several times about
a Minix 1.3PM.  Is this the Program?  If so how does one obtain patches,
etc to implement this?

Thanks for any help.

Mike Dickson          - mcd@ccsitn.att.com
                        att!ccsitn!mcd
                        arpa!ccsitn!mcd