trace: conserve gd register
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 2 Jun 2019 11:05:08 +0000 (13:05 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 10 Jul 2019 22:52:58 +0000 (16:52 -0600)
commita2fa38da200cbd454bcb8dc7659bde00044302f7
treedc3068e5466c4582bbc037c3d52800fce802496d
parent7ef8e9b09a74567c529f168a4da5c1d5cffd58c2
trace: conserve gd register

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@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/trace.c