From e6fe02a5715b3dc02fe4041c4f5a59099a711d70 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 22 Mar 2022 17:08:43 +0100 Subject: cmd: pxe_utils: sysboot: replace cls command by video_clear in PXE parser Since the commit bfaa51dd4adf ("cmd: add serial console support for the cls command") the cls command is not enough to clear the video display when ANSI console is activated. This patch clears the video device with the video_clear() API before to display the bitmap used for the PXE background. This patch avoids to display the LOGO, activated by default with commit 7a8555d87136 ("video: Show the U-Boot logo by default"). Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- boot/pxe_utils.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'boot') diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 0c24becae39..b08aee9896b 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +23,6 @@ #include #ifdef CONFIG_DM_RNG -#include #include #endif @@ -1516,8 +1517,13 @@ void handle_pxe_menu(struct pxe_context *ctx, struct pxe_menu *cfg) /* display BMP if available */ if (cfg->bmp) { if (get_relfile(ctx, cfg->bmp, image_load_addr, NULL)) { - if (CONFIG_IS_ENABLED(CMD_CLS)) - run_command("cls", 0); +#if defined(CONFIG_DM_VIDEO) + struct udevice *dev; + + err = uclass_first_device_err(UCLASS_VIDEO, &dev); + if (!err) + video_clear(dev); +#endif bmp_display(image_load_addr, BMP_ALIGN_CENTER, BMP_ALIGN_CENTER); } else { -- cgit v1.2.3 From b583348ca8c8ce74d5dd665446d20f4c6c6e3f06 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Thu, 24 Mar 2022 11:26:11 -0400 Subject: image: fit: Align hash output buffers Hardware-accelerated hash functions require that the input and output buffers be aligned to the minimum DMA alignment. memalign.h helpfully provides a macro just for this purpose. It doesn't exist on the host, but we don't need to be aligned there either. Fixes: 5dfb521386 ("[new uImage] New uImage low-level API") Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- boot/image-fit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'boot') diff --git a/boot/image-fit.c b/boot/image-fit.c index f01cafe4e27..6610035d0ad 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #ifdef CONFIG_DM_HASH #include @@ -1263,7 +1264,8 @@ int calculate_hash(const void *data, int data_len, const char *name, static int fit_image_check_hash(const void *fit, int noffset, const void *data, size_t size, char **err_msgp) { - uint8_t value[FIT_MAX_HASH_LEN]; + DEFINE_ALIGN_BUFFER(uint8_t, value, FIT_MAX_HASH_LEN, + ARCH_DMA_MINALIGN); int value_len; const char *algo; uint8_t *fit_value; -- cgit v1.2.3