[Skiboot] [PATCH] opal-prd: Fix opal-prd crash

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Jul 31 06:40:58 AEST 2018


On Mon, 2018-07-30 at 18:15 +0800, Jeremy Kerr wrote:
> Hi Vasant,
> 
> > Presently callback function from HBRT uses r11 to point to target function
> > pointer. r12 is garbage. This works fine when we compile with "-no-pie" option
> > (as we don't use r12 to calculate TOC).
> > 
> > As per ABIv2 : "r12 : Function entry address at global entry point"
> 
> OK, your fixup there looks good for the call_le path.
> 
> However, the function calling interface in the opposite direction (ie,
> prd to HBRT, through call_be) will still use r11 rather than r12, so r12
> will be undefined in that case.
> 
> I *think* this will be okay though, as the OPD call interface implies
> that we'd only support calling into HBRT as ABIv1 only (and so there's
> no dependence on r12).
> 
> Ben wrote those thunks originally, so I'd like his input to confirm.

Right, we only support ABIv1 for BE.

> Cheers,
> 
> 
> Jeremy



More information about the Skiboot mailing list