Simon Glass | d78aa75 | 2022-10-20 18:23:10 -0600 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Verified Boot for Embedded (VBE) vbe-simple common file |
| 4 | * |
| 5 | * Copyright 2022 Google LLC |
| 6 | * Written by Simon Glass <sjg@chromium.org> |
| 7 | */ |
| 8 | |
| 9 | #ifndef __VBE_SIMPLE_H |
| 10 | #define __VBE_SIMPLE_H |
| 11 | |
| 12 | /** struct simple_priv - information read from the device tree */ |
| 13 | struct simple_priv { |
| 14 | u32 area_start; |
| 15 | u32 area_size; |
| 16 | u32 skip_offset; |
| 17 | u32 state_offset; |
| 18 | u32 state_size; |
| 19 | u32 version_offset; |
| 20 | u32 version_size; |
| 21 | const char *storage; |
| 22 | }; |
| 23 | |
| 24 | /** |
| 25 | * vbe_simple_read_fw_bootflow() - Read a bootflow for firmware |
| 26 | * |
| 27 | * Locates and loads the firmware image (FIT) needed for the next phase. The FIT |
| 28 | * should ideally use external data, to reduce the amount of it that needs to be |
| 29 | * read. |
| 30 | * |
| 31 | * @bdev: bootdev device containing the firmwre |
| 32 | * @blow: Place to put the created bootflow, on success |
| 33 | * @return 0 if OK, -ve on error |
| 34 | */ |
| 35 | int vbe_simple_read_bootflow_fw(struct udevice *dev, struct bootflow *bflow); |
| 36 | |
| 37 | #endif /* __VBE_SIMPLE_H */ |