|
@@ -357,7 +357,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
|
|
struct spl_image_info image_info;
|
|
struct spl_image_info image_info;
|
|
int node = -1;
|
|
int node = -1;
|
|
int images, ret;
|
|
int images, ret;
|
|
- int base_offset, align_len = ARCH_DMA_MINALIGN - 1;
|
|
|
|
|
|
+ int base_offset, hsize, align_len = ARCH_DMA_MINALIGN - 1;
|
|
int index = 0;
|
|
int index = 0;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -386,8 +386,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
|
|
* For FIT with data embedded, data is loaded as part of FIT image.
|
|
* For FIT with data embedded, data is loaded as part of FIT image.
|
|
* For FIT with external data, data is not loaded in this step.
|
|
* For FIT with external data, data is not loaded in this step.
|
|
*/
|
|
*/
|
|
- fit = (void *)((CONFIG_SYS_TEXT_BASE - size - info->bl_len -
|
|
|
|
- align_len) & ~align_len);
|
|
|
|
|
|
+ hsize = (size + info->bl_len + align_len) & ~align_len;
|
|
|
|
+ fit = spl_get_load_buffer(-hsize, hsize);
|
|
sectors = get_aligned_image_size(info, size, 0);
|
|
sectors = get_aligned_image_size(info, size, 0);
|
|
count = info->read(info, sector, sectors, fit);
|
|
count = info->read(info, sector, sectors, fit);
|
|
debug("fit read sector %lx, sectors=%d, dst=%p, count=%lu\n",
|
|
debug("fit read sector %lx, sectors=%d, dst=%p, count=%lu\n",
|