Searched hist:ad4494dc38a39d06a31ef3386829ef1af79db39a (Results 1 – 1 of 1) sorted by relevance
| /rk3399_ARM-atf/common/ |
| H A D | bl_common.c | ad4494dc38a39d06a31ef3386829ef1af79db39a Thu Jul 28 13:38:03 UTC 2016 Dan Handley <dan.handley@arm.com> Remove dcache invalidation after image authentication
At the end of successful image authentication in load_auth_image(), the data cache for the virtual address range corresponding to the image is invalidated (by a call to inv_dcache_range()). The intent seems to be to ensure the data caches do not contain any sensitive data used during authentication, which subsequent code can read. However, this same address range is already flushed (cleaned and invalidated by a call to flush_dcache_range()) at the end of load_image(), and the subsequent invalidate has no functional effect.
This patch removes the redundant call to inv_dcache_range(). It also moves the flush_dcache_range() call from the end of load_image() to the end of load_auth_image(), so the image data will remain in the caches during authentication, improving performance.
This also improves the comments that explain the rationale for calling flush_dcache_range() after image loading/authentication.
Change-Id: I14f17ad2935075ef6f3d1327361c5088bfb2d284
|