summaryrefslogtreecommitdiffstats
path: root/src/arch/arm64/include/bits/lkrn.h
blob: 943464e9b876938256e71aad2ff732cd828e8d06 (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
#ifndef _BITS_LKRN_H
#define _BITS_LKRN_H

/** @file
 *
 * Linux kernel image invocation
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

/** Header magic value */
#define LKRN_MAGIC_ARCH LKRN_MAGIC_AARCH64

/**
 * Jump to kernel entry point
 *
 * @v entry		Kernel entry point
 * @v fdt		Device tree
 */
static inline __attribute__ (( noreturn )) void
lkrn_jump ( physaddr_t entry, physaddr_t fdt ) {
	register unsigned long x0 asm ( "x0" ) = fdt;

	__asm__ __volatile__ ( "br %1"
			       : : "r" ( x0 ), "r" ( entry ) );
	__builtin_unreachable();
}

#endif /* _BITS_LKRN_H */