1 /* 2 * Copyright (c) 2014 Travis Geiselbrecht 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #pragma once 9 10 #include <sys/types.h> 11 #include <lk/compiler.h> 12 #include <lib/bootimage_struct.h> 13 14 typedef struct bootimage bootimage_t; 15 16 status_t bootimage_open(const void *ptr, size_t len, bootimage_t **bi) __NONNULL(); 17 status_t bootimage_close(bootimage_t *bi) __NONNULL(); 18 status_t bootimage_get_range(bootimage_t *bi, const void **ptr, size_t *len) __NONNULL((1)); 19 20 /* ask for a file section of the bootimage, by type */ 21 status_t bootimage_get_file_section(bootimage_t *bi, uint32_t type, const void **ptr, size_t *len) __NONNULL((1)); 22 23