> The ROM API is thoroughly undocumented, but apparently passing the xor > of the real arguments as an extra argument is required [1]. Also, we > need to do the "save gd/restore gd" dance. These are both error-prone, > and lead to a lot of code duplication. > Since both imx8m[np] and imx8ulp SOCs have this, add a separate > translation unit which is included precisely when the new > CONFIG_IMX8_ROMAPI symbol is set, which provide convenience wrappers > that take care of computing the xor value as well as doing the gd > dance, and that thus have a more intuitive API. Subsequent patches > will make use of these to reduce boilerplate. > [1] One wonders, for example, if the check is only applied to the > lower 32 bits, or if we're implicitly relying on all 64-bit pointer > values we're passing effectively have 0 in the upper 32 bits. > Reviewed-by: Peng Fan <[email protected]> > Signed-off-by: Rasmus Villemoes <[email protected]> Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================

