ArvernOS
Loading...
Searching...
No Matches
atag.h File Reference
#include <stdint.h>
Include dependency graph for atag.h:

Data Structures

struct  atag_header_t
 
struct  atag_mem_t
 
struct  atag_cmdline_t
 
struct  atag_initrd2_t
 

Functions

void atag_init (atag_header_t *ptr)
 
const char * atag_get_cmdline ()
 
atag_initrd2_tatag_get_initrd2_at (uint8_t index)
 

Detailed Description

See also
http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

ARM tags are used to pass information from the bootloader to the kernel. It is kind of legacy now because Linux uses Device Trees, but it is easier to implement in a project like ArvernOS.

Function Documentation

◆ atag_get_cmdline()

const char * atag_get_cmdline ( )

Returns the command line found in the ATAGs.

Returns
a string containing the command line found in the ATAGS or NULL

◆ atag_get_initrd2_at()

atag_initrd2_t * atag_get_initrd2_at ( uint8_t index)

Returns the initrd2 entry at a specific index found in the ATAGs.

Parameters
indexthe index of the initrd2 entry to retrieve
Returns
the initrd2 entry or NULL if not found (or index is invalid)

◆ atag_init()

void atag_init ( atag_header_t * ptr)

Initializes the ATAGs module, which essentially parses the ATAGs and store information that can be queried later.

Parameters
ptra pointer to the first ATAG header