X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Fimage.c;h=f17fa40c495c42ac3f9a68110d6befeee5547431;hb=54b6abae3ae9dd181044ddd52429b4df5505872f;hp=84e859a30f455c184ecc4997b584e7c958c5fc4f;hpb=e7dcf5645f09504573f534b0fc9abbbc6ff8a5ad;p=oweals%2Fu-boot.git diff --git a/common/image.c b/common/image.c index 84e859a30f..f17fa40c49 100644 --- a/common/image.c +++ b/common/image.c @@ -61,6 +61,7 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, #endif /* !USE_HOSTCC*/ #include +#include #ifndef CONFIG_SYS_BARGSIZE #define CONFIG_SYS_BARGSIZE 512 @@ -132,6 +133,7 @@ static const table_entry_t uimage_os[] = { #if defined(CONFIG_BOOTM_OPENRTOS) || defined(USE_HOSTCC) { IH_OS_OPENRTOS, "openrtos", "OpenRTOS", }, #endif + { IH_OS_OPENSBI, "opensbi", "RISC-V OpenSBI", }, { -1, "", "", }, }; @@ -175,6 +177,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_PMMC, "pmmc", "TI Power Management Micro-Controller Firmware",}, { IH_TYPE_STM32IMAGE, "stm32image", "STMicroelectronics STM32 Image" }, { IH_TYPE_MTKIMAGE, "mtk_image", "MediaTek BootROM loadable Image" }, + { IH_TYPE_COPRO, "copro", "Coprocessor Image"}, { -1, "", "", }, }; @@ -376,9 +379,9 @@ void image_print_contents(const void *ptr) } } else if (image_check_type(hdr, IH_TYPE_FIRMWARE_IVT)) { printf("HAB Blocks: 0x%08x 0x0000 0x%08x\n", - image_get_load(hdr) - image_get_header_size(), - image_get_size(hdr) + image_get_header_size() - - 0x1FE0); + image_get_load(hdr) - image_get_header_size(), + (int)(image_get_size(hdr) + image_get_header_size() + + sizeof(flash_header_v2_t) - 0x2060)); } } @@ -580,7 +583,7 @@ ulong env_get_bootm_low(void) #if defined(CONFIG_SYS_SDRAM_BASE) return CONFIG_SYS_SDRAM_BASE; -#elif defined(CONFIG_ARM) +#elif defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE) return gd->bd->bi_dram[0].start; #else return 0; @@ -597,7 +600,8 @@ phys_size_t env_get_bootm_size(void) return tmp; } -#if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS) +#if (defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)) && \ + defined(CONFIG_NR_DRAM_BANKS) start = gd->bd->bi_dram[0].start; size = gd->bd->bi_dram[0].size; #else