summaryrefslogtreecommitdiffstats
path: root/lib/efi_loader/efi_runtime.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-06-02 11:38:27 +0200
committerTom Rini <trini@konsulko.com>2016-06-06 13:39:16 -0400
commitedcef3ba1d2d5beb92fcd7df253e196e77ba174d (patch)
treef2ca61e10c1d34979f928dc7b20d0976236e800e /lib/efi_loader/efi_runtime.c
parenta86aeaf228da739bce6bc40927949efc33672050 (diff)
downloadtalos-obmc-uboot-edcef3ba1d2d5beb92fcd7df253e196e77ba174d.tar.gz
talos-obmc-uboot-edcef3ba1d2d5beb92fcd7df253e196e77ba174d.zip
efi_loader: Move to normal debug infrastructure
We introduced special "DEBUG_EFI" defines when the efi loader support was new. After giving it a bit of thought, turns out we really didn't have to - the normal #define DEBUG infrastructure works well enough for efi loader as well. So this patch switches to the common debug() and #define DEBUG way of printing debug information. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_runtime.c')
-rw-r--r--lib/efi_loader/efi_runtime.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 11d01268d8..99b5ef11c2 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -165,9 +165,7 @@ static void efi_runtime_detach(ulong offset)
ulong *p = efi_runtime_detach_list[i].ptr;
ulong newaddr = patchto ? (patchto + patchoff) : 0;
-#ifdef DEBUG_EFI
- printf("%s: Setting %p to %lx\n", __func__, p, newaddr);
-#endif
+ debug("%s: Setting %p to %lx\n", __func__, p, newaddr);
*p = newaddr;
}
}
@@ -182,10 +180,7 @@ void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map)
static ulong lastoff = CONFIG_SYS_TEXT_BASE;
#endif
-#ifdef DEBUG_EFI
- printf("%s: Relocating to offset=%lx\n", __func__, offset);
-#endif
-
+ debug("%s: Relocating to offset=%lx\n", __func__, offset);
for (; (ulong)rel < (ulong)&__efi_runtime_rel_stop; rel++) {
ulong base = CONFIG_SYS_TEXT_BASE;
ulong *p;
@@ -212,10 +207,7 @@ void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map)
continue;
}
-#ifdef DEBUG_EFI
- printf("%s: Setting %p to %lx\n", __func__, p, newaddr);
-#endif
-
+ debug("%s: Setting %p to %lx\n", __func__, p, newaddr);
*p = newaddr;
flush_dcache_range((ulong)p & ~(EFI_CACHELINE_SIZE - 1),
ALIGN((ulong)&p[1], EFI_CACHELINE_SIZE));
OpenPOWER on IntegriCloud