|
article: Porting Unix to the 386: Three Initial PC UtilitiesThe second article in the "PORTING UNIX TO THE 386" series discussed the utilities we had to build to test the port on an actual 80386 PC. DOS C program for loading 386BSD kernel from DOS, and executing it, taking over the machine. The 386BSD Project and Berkeley UNIXSynopsis of what 386BSD was intended to be in the 1989-1990 timeframe. This, 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. 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. Watching for Land MinesAnticipating problems allowed us to find flaws in our work. We use the standalone system for bootstrap to load test programs that work machine-dependant portions of the kernel. Extending the Standalone SystemBooting 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.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. Trap HandlingWe coded stub routines to connect trap handlers to descriptor table entry points, wiring the kernel to receive processor traps. Porting Unix to the 386: Language Tools Cross SupportWe describe the need and use of a cross-support environment to create 386 code from a non-386 machine, so as to create the initial binarys before our port can generate them. Why Develop Cross-Tools?We used another proven UNIX system - a Symmtric 375, to cross compile 386 code (bootstrap, kernel, shell, utilities) to get the first system running. What's in the Tool Chest?The tool chest for 386BSD cross support included compiler, assembler, loader, libraries and include files. It did not include an emulation environment. Where Do We Go From HereWith cross tools we could make utility programs for our nascent system. The next step would be incorporating them into a filesystem so that they could run on the native 386, with the kernel program. What's in a Filesystem?What is it that makes up a filesystem? This depends very much on what kind of filesystem we are talking about. Porting Unix to the 386: Research and the Commercial SectorUnderstanding the boundary between research and development with BSD, and where a balance between commercial efforts can be struck. |