From: Tom Rini Date: Mon, 10 Apr 2017 14:24:22 -0400 Subject: [U-Boot] [U-Boot, v2] ti: clocks: Fix do_enable_clocks() to accept NULL pointers as input parameters In-Reply-To: <1490602527-1654-1-git-send-email-lukma@denx.de> References: <1490602527-1654-1-git-send-email-lukma@denx.de> Message-ID: <20170410182422.GJ19897@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Mar 27, 2017 at 10:15:27AM +0200, Lukasz Majewski wrote: > Up till this commit passing NULL as input parameter was allowed, but not > handled properly. > > When one passed NULL to one of this function parameters, the code was > executed causing data abort. > > However, what is more interesting, the abort was not caught because of code > execution in HYP mode with masked CPSR A bit ("Imprecise Data Abort mask bit). > The TI's AM57xx SoC switch to HYP mode with A bit masked in lowlevel_init.S > due to SMC call. Such operation (by default) is performed in SoC ROM code. > > The problem would pop up when one: > - Switch back to SVC mode after disabling LPAE support > - Somebody enables A bit (by executing cpsie a asm instruction) > > and then the previously described exception would be caught. > > Signed-off-by: Lukasz Majewski > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: