1 /* SPDX-License-Identifier: BSD-3-Clause */
9 * This is a boot device access function, which is used by libpayload to read data from
10 * the flash memory (or other boot device). It has to be implemented by payloads that want
11 * to use FMAP or libcbfs.
13 * @param buf The output buffer to which the data should be written to.
14 * @param offset Absolute offset in bytes of the requested boot device memory area. Not aligned.
15 * @param size Size in bytes of the requested boot device memory area. Not aligned.
17 * @returns Number of bytes returned to the buffer, or negative value on error. Typically should
18 * be equal to the `size`, and not aligned forcefully.
20 ssize_t
boot_device_read(void *buf
, size_t offset
, size_t size
);
22 #endif /* _BOOT_DEVICE_H */