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

Jeremy Kerr jk at ozlabs.org
Mon Jul 30 20:15:04 AEST 2018


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.

Cheers,


Jeremy


More information about the Skiboot mailing list