/joh'liks/ n.,adj. 386BSD

Porting Unix to the 386: A Practical Approach



William & Lynne Jolitz


Started open source UNIX.

Appeared in part as a 17 article magazine series in 1991-1992.

Documented the "how, what, why, who, when" of porting BSD to the 386.

Done while BSD was becoming "open source".





Porting Unix to the 386: A Practical Approach - ring crossing

ring crossing:

Porting Unix to the 386: The Standalone System

This article, last of the original three done altogether in 1990, on getting the critical pieces functioning independantly that we needed to do the port. Once these we obtained, the kernel was inevitable.

Extending the Standalone System

Booting a kernel didn't require all of this - but by extending support, we had a "mini kernel" like functionality. Dillemma - how much do you let the boostrap/loader actually do? We chose after the kernel was up to have it to the most - but this answer is subject to review.

Processor Support -- i386.c

We initialized the processor with initial descriptor and page tables - one needs to run with the tables before activating memory/interrupt kernel functions.

Initial Task State Load

Here's an oddity we had in the initial port. We first avoided the 386 TSS context switch because it was slow. With the 486 and later, it wasn't so we used it. But we needed at lead one to transit rings.

System Call Handling

System calls were handled by a call gate, a 386 peculiar mechanism which allowed for ring crossing into supervisor mode using a special segment descriptor call. We simulated user mode to test prior to running in the kernel.





Copyright 2006 TeleMuse Partners, William Jolitz and Lynne Jolitz