diff options
author | dim <dim@FreeBSD.org> | 2015-06-20 19:34:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-20 19:34:50 +0000 |
commit | e109f99dcb6c95c84bbec22229de29a25491f7c2 (patch) | |
tree | d142d742b698973a366ae768a3f4033924e314c8 /sys/boot/uboot/lib/copy.c | |
parent | 238df27d058d0d8912acf0a186d3f43289a0a2b6 (diff) | |
parent | cb167b45a82327b0d6d88e85e3d6e2e326291ee4 (diff) | |
download | FreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.zip FreeBSD-src-e109f99dcb6c95c84bbec22229de29a25491f7c2.tar.gz |
Merge ^/head r284188 through r284643.
Diffstat (limited to 'sys/boot/uboot/lib/copy.c')
-rw-r--r-- | sys/boot/uboot/lib/copy.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/boot/uboot/lib/copy.c b/sys/boot/uboot/lib/copy.c index bb658e3..51416ac 100644 --- a/sys/boot/uboot/lib/copy.c +++ b/sys/boot/uboot/lib/copy.c @@ -118,6 +118,13 @@ uboot_loadaddr(u_int type, void *data, uint64_t addr) this_block = eubldr; this_size = eblock - eubldr; } + } else if (subldr < sblock && eubldr < eblock) { + /* Loader is below or engulfs the sblock */ + this_block = (eubldr < sblock) ? sblock : eubldr; + this_size = eblock - this_block; + } else { + this_block = 0; + this_size = 0; } if (biggest_size < this_size) { biggest_block = this_block; |