aboutsummaryrefslogtreecommitdiff
path: root/include/apos/initrd.h
blob: d38e6698da1c42c8ee68dc24d218ed0d57549555 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef APOS_INITRD_H
#define APOS_INITRD_H

/**
 * @file initrd.h
 * Initrd handling.
 */

#include <apos/types.h>
#include <apos/pmem.h>
#include <apos/vmem.h>

/**
 * Get \c init program size in bytes.
 *
 * @param fdt Global FDT pointer.
 * @return Size of \c init in bytes.
 */
size_t get_init_size(const void *fdt);

/**
 * Get \c init program base address.
 *
 * @param fdt Global FDT pointer.
 * @return Start of \c init.
 */
vm_t get_init_base(const void *fdt);

/**
 * Get \c initrd top address.
 *
 * @param fdt Global FDT pointer.
 * @return Top address of \c initrd.
 */
pm_t get_initrdtop(const void *fdt);

/**
 * Get \c initrd base address.
 *
 * @param fdt Global FDT pointer.
 * @return Base address of \c initrd.
 */
pm_t get_initrdbase(const void *fdt);

#endif /* APOS_INITRD_H */