MOS Source Code
Loading...
Searching...
No Matches
kmain.c File Reference
+ Include dependency graph for kmain.c:

Go to the source code of this file.

Functions

static void invoke_constructors (void)
 
static bool init_sysfs_argv (sysfs_file_t *file)
 
 SYSFS_AUTOREGISTER (kernel, kernel_sysfs_items)
 
 MOS_SETUP ("init", setup_init_path)
 
 MOS_SETUP ("init_args", setup_init_args)
 
void mos_start_kernel (void)
 

Variables

static mm_context_t mos_kernel_mm
 
struct { 
 
   size_t   argc 
 
   const char **   argv 
 
init_args = { 0 } 
 
static sysfs_item_t kernel_sysfs_items []
 

Function Documentation

◆ invoke_constructors()

static void invoke_constructors ( void )
static

Definition at line 28 of file kmain.c.

Referenced by mos_start_kernel().

+ Here is the call graph for this function:

◆ init_sysfs_argv()

static bool init_sysfs_argv ( sysfs_file_t * file)
static

Definition at line 47 of file kmain.c.

+ Here is the call graph for this function:

◆ SYSFS_AUTOREGISTER()

SYSFS_AUTOREGISTER ( kernel ,
kernel_sysfs_items  )

◆ MOS_SETUP() [1/2]

MOS_SETUP ( "init" ,
setup_init_path  )

Definition at line 78 of file kmain.c.

+ Here is the call graph for this function:

◆ MOS_SETUP() [2/2]

MOS_SETUP ( "init_args" ,
setup_init_args  )

Definition at line 93 of file kmain.c.

+ Here is the call graph for this function:

◆ mos_start_kernel()

void mos_start_kernel ( void )

Definition at line 102 of file kmain.c.

Referenced by limine_entry().

+ Here is the call graph for this function:

Variable Documentation

◆ mos_kernel_mm

mm_context_t mos_kernel_mm
static

Definition at line 26 of file kmain.c.

Referenced by mos_start_kernel().

◆ argc

◆ argv

◆ [struct]

struct { ... } init_args

◆ kernel_sysfs_items

sysfs_item_t kernel_sysfs_items[]
static
Initial value:
= {
SYSFS_RO_ITEM("arch", kernel_sysfs_arch),
SYSFS_RO_ITEM("build_date", kernel_sysfs_build_date),
SYSFS_RO_ITEM("build_time", kernel_sysfs_build_time),
SYSFS_RO_ITEM("compiler", kernel_sysfs_compiler),
SYSFS_RO_ITEM("init_path", init_sysfs_path),
SYSFS_RO_ITEM("initrd", initrd_sysfs_info),
SYSFS_RO_ITEM("revision", kernel_sysfs_revision),
SYSFS_RO_ITEM("version", kernel_sysfs_version),
}
static bool init_sysfs_argv(sysfs_file_t *file)
Definition kmain.c:47
#define SYSFS_RO_ITEM(_name, _show_fn)
Definition sysfs.h:48

Definition at line 64 of file kmain.c.