MOS Source Code
Loading...
Searching...
No Matches
setup.h File Reference
#include <mos/types.h>
+ Include dependency graph for setup.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mos_cmdline_hook_t
 
struct  mos_init_t
 

Macros

#define MOS_EARLY_SETUP(_param, _fn)
 
#define MOS_SETUP(_param, _fn)
 
#define MOS_INIT(_comp, _fn)
 

Enumerations

enum  init_target_t {
  INIT_TARGET_POST_MM , INIT_TARGET_SLAB_AUTOINIT , INIT_TARGET_POWER , INIT_TARGET_PRE_VFS ,
  INIT_TARGET_VFS , INIT_TARGET_SYSFS , INIT_TARGET_KTHREAD
}
 

Functions

__BEGIN_DECLS void startup_invoke_cmdline_hooks (void)
 
void startup_invoke_early_cmdline_hooks (void)
 
void startup_invoke_autoinit (init_target_t target)
 

Macro Definition Documentation

◆ MOS_EARLY_SETUP

#define MOS_EARLY_SETUP ( _param,
_fn )
Value:
static bool _fn(const char *arg); \
MOS_PUT_IN_SECTION(".mos.early_setup", mos_cmdline_hook_t, __setup_##_fn, { .param = _param, .hook = _fn }); \
static bool _fn(const char *arg)

Definition at line 30 of file setup.h.

◆ MOS_SETUP

#define MOS_SETUP ( _param,
_fn )
Value:
static bool _fn(const char *arg); \
MOS_PUT_IN_SECTION(".mos.setup", mos_cmdline_hook_t, __setup_##_fn, { .param = _param, .hook = _fn }); \
static bool _fn(const char *arg)

Definition at line 35 of file setup.h.

◆ MOS_INIT

#define MOS_INIT ( _comp,
_fn )
Value:
static void _fn(void); \
MOS_PUT_IN_SECTION(".mos.init", mos_init_t, __init_##_fn, { .target = INIT_TARGET_##_comp, .init_fn = _fn }); \
static void _fn(void)

Definition at line 40 of file setup.h.

Enumeration Type Documentation

◆ init_target_t

Enumerator
INIT_TARGET_POST_MM 
INIT_TARGET_SLAB_AUTOINIT 
INIT_TARGET_POWER 
INIT_TARGET_PRE_VFS 
INIT_TARGET_VFS 
INIT_TARGET_SYSFS 
INIT_TARGET_KTHREAD 

Definition at line 7 of file setup.h.

Function Documentation

◆ startup_invoke_cmdline_hooks()

__BEGIN_DECLS void startup_invoke_cmdline_hooks ( void )

Definition at line 49 of file setup.c.

Referenced by mos_start_kernel().

+ Here is the call graph for this function:

◆ startup_invoke_early_cmdline_hooks()

void startup_invoke_early_cmdline_hooks ( void )

Definition at line 56 of file setup.c.

Referenced by limine_entry().

+ Here is the call graph for this function:

◆ startup_invoke_autoinit()

void startup_invoke_autoinit ( init_target_t target)

Definition at line 8 of file setup.c.

Referenced by mos_start_kernel().