-
Notifications
You must be signed in to change notification settings - Fork 84
/
kexec.h
37 lines (28 loc) · 882 Bytes
/
kexec.h
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
/*
* ps4-kexec - a kexec() implementation for Orbis OS / FreeBSD
*
* Copyright (C) 2015-2016 shuffle2 <[email protected]>
* Copyright (C) 2015-2016 Hector Martin "marcan" <[email protected]>
*
* This code is licensed to you under the 2-clause BSD license. See the LICENSE
* file for more information.
*/
#ifndef KEXEC_H
#define KEXEC_H
#include "types.h"
#define SYS_KEXEC 153
#define SYS_KEXEC_NARGS 5
struct sys_kexec_args {
void *image;
size_t image_size;
void *initramfs;
size_t initramfs_size;
char *cmd_line;
};
typedef int (*sys_kexec_t)(void *td, struct sys_kexec_args *uap);
// Note: td is unused, you can pass NULL if you call this directly.
int sys_kexec(void *td, struct sys_kexec_args *uap);
int kernel_init(void *early_printf);
int kexec_init(void *early_printf, sys_kexec_t *sys_kexec_ptr)
__attribute__ ((section (".init")));
#endif