OSkit is a collection of 31 component librsries designed to help in creating an Operating System. These range from low-level assitance like swapping between protected mode and real mode, all the way up to an X11 client library. For Nilo's purposes, we only want 3 of the libraries. These deals with low-level kernel support, a minimal C library, and a framework for using Linux or FreeBSD device drivers.
OSKit also supports a netboot program based on etherboot. This uses GRUB to load a multiboot compliant image from a floppy. It can also use bootp and NFS to load a kernel.
We are of course mostly interested in the framework for using either Linux or FreeBSD device drivers at the source level. This support consists of a stub for the kernel routines the drivers expect to be able to use, and a generic API to use either Linux or FreeBSD drivers.
The following functions are supplied by OSKit for accessing device drivers.
osenv_mem_alloc - allocate memory.
osenv_mem_free - free memory.
osenv_mem_get_phys - find the physical address of an allocated block.
osenv_mem_get_virt - find the virtual address of an allocated block.
osenv_mem_phys_max - find the largest physical memory address.
osenv_mem_map_phys - map physical memory into kernel virtual memory.
osenv_isadma_alloc - Reserve a DMA channel.
osenv_isadma_free - Release a DMA channel.
osenv_io_avail - Check availability of a range of ports.
osenv_io_alloc - Allocate a range of ports.
osenv_io_free - Release a range of ports.
osenv_intr_disable - prevent interrupts in the driver environment.
osenv_intr_enable - allow interrupts in the driver environment.
osenv_intr_enabled - determine the current interrupt enable state.
osenv_irq_alloc - allocate an interrupt request line.
osenv_irq_free - Unregister the handler for the interrupt.
osenv_irq_disable - Disable a single interrupt line.
osenv_irq_enable - Enable a single interrupt line.
osenv_irq_pending - Determine if an interrupt is pending for a single line.
osenv_sleep_init - prepare to put the current process to sleep.
osenv_sleep - put the current process to sleep.
osenv_wakeup - wake up a sleeping process.
osenv_timer_init - Initialize the timer support code.
osenv_timer_register - Request a timer handler be called at the specified frequency.
osenv_isabus_remchild - remove a device node from an ISA bus.