From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 22 Jun 2019 20:10:07 +0100 Subject: [U-Boot] [PATCH 1/1] trace: conserve gd register In-Reply-To: <20190602110508.27338-1-xypron.glpk@gmx.de> References: <20190602110508.27338-1-xypron.glpk@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, 2 Jun 2019 at 12:05, Heinrich Schuchardt 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 > --- > lib/trace.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 49 insertions(+) Ick. I can't think of a better idea. Reviewed-by: Simon Glass