]> git.dujemihanovic.xyz Git - u-boot.git/commit
fdtdec: Fix boundary check
authorAtish Patra <atish.patra@wdc.com>
Tue, 21 Apr 2020 18:15:00 +0000 (11:15 -0700)
committerAndes <uboot@andestech.com>
Thu, 23 Apr 2020 02:14:16 +0000 (10:14 +0800)
commitf614753c4b91bc3b56809773aeb17da10f1231a5
tree73bfed5960b90d9a88b8b0b99fbfae2f75bb6015
parent5370478d1c7afb8b2a8a0a00b31ff97c3a2c0451
fdtdec: Fix boundary check

In U-Boot, the reserved memory end address is considered as a inclusive
address. This notion is followed while adding a reserved memory node to
the DT.

For example:
end_address = start_address + size - 1

Follow the same notion and fix the end address computation while checking
for existing nodes.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
lib/fdtdec.c