[U-Boot] [PATCH 1/1] trace: conserve gd register

Simon Glass sjg at chromium.org
Sat Jun 22 19:10:07 UTC 2019


On Sun, 2 Jun 2019 at 12:05, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> An UEFI application may change the value of the register that gd lives in.
> But some of our functions like get_ticks() access this register. So we
> have to set the gd register to the U-Boot value when entering a trace
> point and set it back to the application value when exiting the trace
> point.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  lib/trace.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)

Ick. I can't think of a better idea.

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list