|
system call: Unix Kernel Load ProgramDOS C program for loading 386BSD kernel from DOS, and executing it, taking over the machine. Porting Unix to the 386: Designing the Software SpecificationThis, the first article, is the first published mention of 386BSD. By this time, the project had been operational for 18 months, and William Jolitz was at Berkeley working on the Net/2 release. The 386BSD specification was in two parts - one that detailed getting to a operational system that could build itself and basic console applications, and a more extensive community involvement part, called "A Modest Proposal". The Definition of the 386BSD SpecificationChoosing how far to go in supporting X86 architecture in order to get a basic BSD UNIX system to be able to bootstrap the futre efforts. 386BSD Port Goals: A Practical ApproachWe decided to shoot for a system that emphasized novel 386 support code to create a basic BSD environment on the 386. We assumed that by making it freely available, others will extend the work to remaining areas. Kernel Linear Address Space Overhead386BSD ignored as much as possible the segmentation hardware of the x86, preferring to use a "flat" address space. Virtual Address Space Layout386BSD executed programs with a virtual address similar to a VAX running UNIX. In February 1991, this changed so that the format of the process virtual address space memory usage could be arranged differently. Structure of Per-Process Data (u.)The "u." in more detail, handling kernel stack overflows in 386BSD. Microprocessor IdiosyncrasiesSometimes you're forced to use processor features - like hardware context switching. Origionally, the earliest versions of 386BSD didn't use the hardware context switch TSS feature - but you still had to have one anyways. System Call InterfaceHow to call the system's kernel from a process, using existing industry standards accross the X86 platform. Microprocessor and System Specification IssuesSupport the processor, and support the ISA bus peripherals are the objectives for the first parts of 386BSD. Porting Unix to the 386: The Standalone SystemThis 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. Introducing the Standalone SystemOriginally the test framework to prove kernel parts work in the environment of an protected mode program running on the "raw" machine, this became the bootstrap environment to later load and start the kernel in system operation. Processor Support -- i386.cWe 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 LoadHere'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 HandlingSystem 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. Cross-Support MethodologyOur methodology was to prove that we could get a usable, tested executable across onto the native machine to be useful there. As we found and fixed, this methodology sped getting enough good and working native components, such that we could begin native development. |