plat: marvell: sip: make sure that comphy init will use correct address
The argument passed via x1 is used as a base address for comphy related
routines. Nevertheless validation of this address wasn't good enough and
allowed some non comphy related addresses to slip over.

To overcome this issue make sure that the address passed via SMC points
to valid CP range and allow to proceed comphy initializations only with
correct comphy offset.

This could be fixed in a different way e.g. by passing CP id from the
caller, but since this API is already used with various Linux, U-Boot
and UEFI versions it can't be changed.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Change-Id: Ia74dbc36efcfbefc4a102d31191e6af5808c4a82
1 parent 8a08e27 commit b143fa7491bf9029ccd46c05d7d2267b3c2e2775
@Grzegorz Jaszczyk Grzegorz Jaszczyk authored on 4 Apr 2019
Showing 1 changed file
View
plat/marvell/common/mrvl_sip_svc.c