From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ronald G Minnich To: <9fans@cse.psu.edu> Subject: Re: [9fans] how small can you get In-Reply-To: <3C640534.FF043B6@research.bell-labs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 8 Feb 2002 10:16:27 -0700 Topicbox-Message-UUID: 4f288c9c-eaca-11e9-9e20-41e7f4b1d025 On Fri, 8 Feb 2002, Sean Quinlan wrote: > The current internal version of the kernel has this functionality. good. > We are also in the process of redoing the /boot. The idea is > to use rc as the boot scripting language. The combination of these two > ideas means that 9load can be greatly simplified, and we can have scenarios > such as > 9load->local kernel -> setup ip; connected to fs; load kernel over 9p -> reboot > > The local kernel is just a fancy bootloader. This is pretty much what we've been doing for the last 18 months with Linux. We can boot linux from flash, or etherboot from flash on those 256KB flash cases. The first Linux we boot in turn can boot another linux from wherever linux knows how to read from (disk, network, etc.). So my scenario would be linuxbios->gunzip local kernel from FLASH->setup ip; connected to fs; load kernel over 9p > The only tricky aspects to getting this to work is resetting the various > devices that potentially can be doing DMA during or soon after the reboot. Yup. In Two-Kernel Monte for Linux Erik Hendriks handles this by using loadable modules. Before Monte boots the next Linux it unloads all the modules he loaded, and their unload process pretty much disables each interface. Plan9 doesn't have loadable modules but I assume you've worked out the details of disabling the DMA. Actually for PCI I've always found it safe to just disable DMA in the device command register but Erik is more paranoid than I am (probably justifiable given awful PC hardware). The APIC and SMP add difficulties. Eric Biederman of LinuxNetworx has solved these problems however. You might want to check out his kexec patch unless you've solved this already. But turning off an APIC that was brought alive in uniprocessor mode and having it do the right thing when you get into SMP -- that's turned out to be tough. Add in the usual chipset bugs and ... what a mess. One thing we also do is use the Disk On Chip (where possible) to give us a 7MB / partition on the motherboard. This can be very handy ... you could put plan9.ini in there, for example. Anyway we're interested ... ron