next up previous contents index
Next: 10.14.12 Multiboot Specification Up: (X86 PC) MultiBoot Startup Previous: 10.14.10 base_multiboot_init_cmdline: command-line preprocessing

10.14.11 base_multiboot_find: find a MultiBoot boot module by name

   

SYNOPSIS

#include <oskit/x86/pc/base_multiboot.h>

struct multiboot_module *base_multiboot_find(const char *string);

DESCRIPTION

This is not an initialization function, but rather a utility function for the use of the client OS. Given a particular string, it searches the array of boot modules passed by the boot loader for a boot module with a matching string. This function can be easily used by the OS to locate specific boot modules by name.

If multiple boot modules have matching strings, then the first one found is returned. If any boot modules have no strings attached (no pun intended), then those boot modules will never be ``found'' by this function, although they can still be found by hunting through the boot module array manually.

PARAMETERS

string
The string to match against the strings attached to the boot modules.

RETURNS

If successful, returns a pointer to the multiboot_module entry matched; from this structure, the actual boot module data can be found using the mod_start and mod_end elements, which contain the start and ending physical addresses of the boot module data, respectively.

If no matching boot module can be found, this function returns NULL.

DEPENDENCIES

phystokv
10.6.2
boot_info
10.14.7
strcmp
9.4.18



University of Utah Flux Research Group