diff options
Diffstat (limited to 'board/xilinx/common/board.c')
| -rw-r--r-- | board/xilinx/common/board.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index ceb58da6d3c..26facb6daea 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -9,6 +9,7 @@ #include <efi.h> #include <efi_loader.h> #include <env.h> +#include <fwu.h> #include <image.h> #include <init.h> #include <jffs2/load_kernel.h> @@ -743,3 +744,29 @@ __weak int board_rng_seed(struct abuf *buf) return 0; } #endif + +#if defined(CONFIG_FWU_MULTI_BANK_UPDATE) +int fwu_platform_hook(struct udevice *dev, struct fwu_data *data) +{ + /* Note: The FWU metadata is an unsecure piece of data, as + * highlighted by the spec, and there is no way to ascertain + * that it has not been tampered with in a malicious manner. + * U-Boot OTOH can be part of a trusted boot chain, where the + * U-Boot image has been verified before being booted. So, + * although this does remove issues that might crop up with + * manual mismatches, still need to consider the fact that + * the FWU mdata is not a secure piece of data. + + * And this is a not real problem with Xilinx platforms because + * actually it is only providing reference stack. + */ + + struct fwu_image_entry *img_entry = &data->fwu_images[0]; + + /* Copy image type GUID */ + memcpy(&fw_images[0].image_type_id, &img_entry->image_type_guid, 16); + + return 0; +} + +#endif |
