mem: When loading an image directly in memory, use the right CL size.

Some code was added fairly recently which would load a memory image
into a memory directly in order to make it easier to set up ROMs.
Unfortunately, that code accidentally used the image size instead of
the cache line size when setting up the port proxy which would actually
write the data. This happens to work when the image size is a power of
two since that's all the proxy checks for, but there's no guarantee
that every image will be sized that way.

This change instead looks into the system object, retrieves the cache
line size from it, and uses that to set up the port proxy.

Change-Id: I227ac475b855d9516e1feb881769e12ec4e7d598
Reviewed-by: Jason Lowe-Power <>
Maintainer: Jason Lowe-Power <>
Tested-by: kokoro <>
1 file changed