Adding your minidriver to the system

The main() function of startup main.c looks like this:

...
paddr_t		mdrvr_addr;
...

/*
* Collect information on all free RAM in the system.
*/
init_raminfo();

/* In a virtual system we need to initialize the page tables */

if(shdr->flags1 & STARTUP_HDR_FLAGS1_VIRTUAL)
{
   init_mmu();
}

/* The following routines have hardware or system dependencies that
   may need to be changed. */
init_intrinfo();

/* Allocate a 64 KB data area. */
mdrvr_addr = alloc_ram(~0L, 65535, 1);

/* Register the minidriver and its handler function. */
mdriver_add("mini-data",  0,  mini_data, mdrvr_addr, 65535);
...

The name stored in the system page for our minidriver is mini-data.