util/cbfstool: Drop IS_TOP_ALIGNED_ADDRESS() check in cbfstool_convert_fsp
This change drops the check for IS_TOP_ALIGNED_ADDRESS() before setting offset to 0 in cbfstool_convert_fsp(). If the user provides a baseaddress to relocate the FSP to, then the offset should be set to 0 since there is no requirement on where the file ends up in cbfs. This allows the user to relocate the FSP to an address in lower DRAM. BUG=b:155322763 Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Ibeadbf06881f7659b2ac7d62d2152636c853fb9f Reviewed-on: https://review.coreboot.org/c/coreboot/+/42263 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
00a8ed8fcd
commit
c3bb6923bd
|
@ -642,21 +642,18 @@ static int cbfstool_convert_fsp(struct buffer *buffer,
|
||||||
do_relocation = 0;
|
do_relocation = 0;
|
||||||
} else {
|
} else {
|
||||||
address = param.baseaddress;
|
address = param.baseaddress;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* *offset should either be 0 or the value returned by
|
* *offset should either be 0 or the value returned by
|
||||||
* do_cbfs_locate. do_cbfs_locate should not ever return a value
|
* do_cbfs_locate. do_cbfs_locate is called only when param.baseaddress
|
||||||
* that is TOP_ALIGNED_ADDRESS. Thus, if *offset contains a top
|
* is not provided by user. Thus, set *offset to 0 if user provides
|
||||||
* aligned address, set it to 0.
|
* a baseaddress i.e. params.baseaddress_assigned is set. The only
|
||||||
*
|
* requirement in this case is that the binary should be relocated to
|
||||||
* The only requirement in this case is that the binary should
|
* the base address that is requested. There is no requirement on where
|
||||||
* be relocated to the base address that is requested. There is
|
* the file ends up in the cbfs.
|
||||||
* no requirement on where the file ends up in the cbfs.
|
|
||||||
*/
|
*/
|
||||||
if (IS_TOP_ALIGNED_ADDRESS(*offset))
|
|
||||||
*offset = 0;
|
*offset = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Nothing left to do if relocation is not being attempted. Just add
|
* Nothing left to do if relocation is not being attempted. Just add
|
||||||
|
|
Loading…
Reference in New Issue