summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c6
-rw-r--r--lib/efi_loader/efi_disk.c11
-rw-r--r--lib/efi_loader/efi_memory.c2
-rw-r--r--lib/efi_loader/efi_runtime.c14
4 files changed, 8 insertions, 25 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 15a1b90..be6f5e8 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -6,8 +6,6 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-/* #define DEBUG_EFI */
-
#include <common.h>
#include <efi_loader.h>
#include <malloc.h>
@@ -76,9 +74,7 @@ efi_status_t efi_exit_func(efi_status_t ret)
static efi_status_t efi_unsupported(const char *funcname)
{
-#ifdef DEBUG_EFI
- printf("EFI: App called into unimplemented function %s\n", funcname);
-#endif
+ debug("EFI: App called into unimplemented function %s\n", funcname);
return EFI_EXIT(EFI_UNSUPPORTED);
}
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index f9ad615..c434c92 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -84,10 +84,8 @@ static efi_status_t EFIAPI efi_disk_rw_blocks(struct efi_block_io *this,
blocks = buffer_size / blksz;
lba += diskobj->offset;
-#ifdef DEBUG_EFI
- printf("EFI: %s:%d blocks=%x lba=%"PRIx64" blksz=%x dir=%d\n", __func__,
- __LINE__, blocks, lba, blksz, direction);
-#endif
+ debug("EFI: %s:%d blocks=%x lba=%"PRIx64" blksz=%x dir=%d\n", __func__,
+ __LINE__, blocks, lba, blksz, direction);
/* We only support full block access */
if (buffer_size & (blksz - 1))
@@ -101,9 +99,8 @@ static efi_status_t EFIAPI efi_disk_rw_blocks(struct efi_block_io *this,
/* We don't do interrupts, so check for timers cooperatively */
efi_timer_check();
-#ifdef DEBUG_EFI
- printf("EFI: %s:%d n=%lx blocks=%x\n", __func__, __LINE__, n, blocks);
-#endif
+ debug("EFI: %s:%d n=%lx blocks=%x\n", __func__, __LINE__, n, blocks);
+
if (n != blocks)
return EFI_EXIT(EFI_DEVICE_ERROR);
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 9e669f5..ad713d0 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -6,8 +6,6 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-/* #define DEBUG_EFI */
-
#include <common.h>
#include <efi_loader.h>
#include <malloc.h>
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 11d0126..99b5ef1 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));