diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-10-15 12:30:09 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-10-27 21:13:15 +0100 |
commit | d3d6afae3c56af4f7b68d777468d509b3d6bdb55 (patch) | |
tree | e4a6ff182b76ee0526f432408f95386f0f2e819c | |
parent | 87e9963d5acaa41f3c54c1dee9159c775352f86a (diff) | |
download | u-boot-d3d6afae3c56af4f7b68d777468d509b3d6bdb55.zip u-boot-d3d6afae3c56af4f7b68d777468d509b3d6bdb55.tar.gz u-boot-d3d6afae3c56af4f7b68d777468d509b3d6bdb55.tar.bz2 |
trace: conserve gd register on RISC-V
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>
-rw-r--r-- | lib/trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/trace.c b/lib/trace.c index 831283c..defc971 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -57,7 +57,7 @@ static inline uintptr_t __attribute__((no_instrument_function)) return offset / FUNC_SITE_SIZE; } -#if defined(CONFIG_EFI_LOADER) && defined(CONFIG_ARM) +#if defined(CONFIG_EFI_LOADER) && (defined(CONFIG_ARM) || defined(CONFIG_RISCV)) /** * trace_gd - the value of the gd register |