1# zx_system_mexec_payload_get
2
3## NAME
4
5<!-- Updated by update-docs-from-abigen, do not edit. -->
6
7system_mexec_payload_get - Return a ZBI containing ZBI entries necessary to boot this system
8
9## SYNOPSIS
10
11<!-- Updated by update-docs-from-abigen, do not edit. -->
12
13```
14#include <zircon/syscalls.h>
15
16zx_status_t zx_system_mexec_payload_get(zx_handle_t resource,
17                                        void* buffer,
18                                        size_t buffer_size);
19```
20
21## DESCRIPTION
22
23`zx_system_mexec_payload_get()` accepts a resource handle and a
24pointer/length corresponding to an output buffer and fills the buffer with an
25incomplete ZBI containing a sequence of entries that should be appended to a
26ZBI before passing that image to [`zx_system_mexec()`].
27
28*resource* must be of type **ZX_RSRC_KIND_ROOT**.
29
30*buffer* and *buffer_size* must point to a buffer that is no longer than 16KiB.
31
32## RIGHTS
33
34<!-- Updated by update-docs-from-abigen, do not edit. -->
35
36*resource* must have resource kind **ZX_RSRC_KIND_ROOT**.
37
38## RETURN VALUE
39
40`zx_system_mexec_payload_get()` returns **ZX_OK** on success.
41
42## SEE ALSO
43
44 - [`zx_system_mexec()`]
45
46<!-- References updated by update-docs-from-abigen, do not edit. -->
47
48[`zx_system_mexec()`]: system_mexec.md
49