|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Boot firmware device tree helpers. More...
Go to the source code of this file.
Functions | |
| int | sys_boot_fdt_copy (uint8_t *dst, size_t dst_size, const uint8_t *src, uint32_t *fdt_size) |
| Validate and copy a boot firmware device tree blob. | |
Boot firmware device tree helpers.
Validate and copy a boot firmware device tree blob.
CONFIG_BOOT_FDT.
This helper validates the FDT header magic and total-size field, checks that the blob fits in the caller-provided storage, and copies the blob into that storage. The caller owns the destination buffer and decides how long the copied blob remains available.
| dst | Destination buffer for the copied FDT. |
| dst_size | Destination buffer size in bytes. |
| src | Source FDT pointer. |
| fdt_size | Output for the FDT size in bytes. Set on success and when returning -ENOSPC. |
| 0 | If the FDT was validated and copied. |
| -EINVAL | If an argument is invalid or src is not a valid FDT. |
| -ENOSPC | If dst is too small for the FDT. |