summaryrefslogtreecommitdiffstats
path: root/kexec/fs2dt.h
blob: fe2493123466971ea82f6391e766d9e260def591 (plain)
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
#ifndef FS2DT_H
#define FS2DT_H

#if (BOOT_BLOCK_VERSION != 2 && BOOT_BLOCK_VERSION != 17)
#error Please add or correct definition of BOOT_BLOCK_VERSION
#endif

/* boot block as defined by the linux kernel */
struct bootblock {
	unsigned magic;
	unsigned totalsize;
	unsigned off_dt_struct;
	unsigned off_dt_strings;
	unsigned off_mem_rsvmap;
	unsigned version;
	unsigned last_comp_version;
#if (BOOT_BLOCK_VERSION >= 2)
	/* version 2 fields below */
	unsigned boot_physid;
	/* version 3 fields below */
	unsigned dt_strings_size;
#if (BOOT_BLOCK_VERSION >= 17)
	/* version 17 fields below */
	unsigned dt_struct_size;
#endif
#endif
};

extern struct bootblock bb[1];

/* Used for enabling printing message from purgatory code
 * Only has implemented for PPC64 */
extern int my_debug;
extern int dt_no_old_root;

void reserve(unsigned long long where, unsigned long long length);
void create_flatten_tree(char **, off_t *, const char *);

#endif /* KEXEC_H */