public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map()
@ 2016-04-13  3:33 Andreas Färber
  2016-04-13  9:25 ` Alexander Graf
  2016-04-18 16:26 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Färber @ 2016-04-13  3:33 UTC (permalink / raw)
  To: u-boot

Tracing the arguments has been helpful for pinpointing overflows.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 lib/efi_loader/efi_memory.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index df99585..138736f 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -123,6 +123,11 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
 	struct efi_mem_list *newlist;
 	bool do_carving;
 
+#ifdef DEBUG_EFI
+	printf("%s: 0x%" PRIx64 " 0x%" PRIx64 " %d %s\n", __func__,
+		start, pages, memory_type, overlap_only_ram ? "yes" : "no");
+#endif
+
 	if (!pages)
 		return start;
 
-- 
2.6.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map()
  2016-04-13  3:33 [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map() Andreas Färber
@ 2016-04-13  9:25 ` Alexander Graf
  2016-04-18 16:26 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2016-04-13  9:25 UTC (permalink / raw)
  To: u-boot



On 13.04.16 05:33, Andreas F?rber wrote:
> Tracing the arguments has been helpful for pinpointing overflows.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Andreas F?rber <afaerber@suse.de>

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex

> ---
>  lib/efi_loader/efi_memory.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
> index df99585..138736f 100644
> --- a/lib/efi_loader/efi_memory.c
> +++ b/lib/efi_loader/efi_memory.c
> @@ -123,6 +123,11 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
>  	struct efi_mem_list *newlist;
>  	bool do_carving;
>  
> +#ifdef DEBUG_EFI
> +	printf("%s: 0x%" PRIx64 " 0x%" PRIx64 " %d %s\n", __func__,
> +		start, pages, memory_type, overlap_only_ram ? "yes" : "no");
> +#endif
> +
>  	if (!pages)
>  		return start;
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map()
  2016-04-13  3:33 [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map() Andreas Färber
  2016-04-13  9:25 ` Alexander Graf
@ 2016-04-18 16:26 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-04-18 16:26 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 13, 2016 at 05:33:50AM +0200, Andreas F?rber wrote:

> Tracing the arguments has been helpful for pinpointing overflows.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Andreas F?rber <afaerber@suse.de>
> ---
>  lib/efi_loader/efi_memory.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
> index df99585..138736f 100644
> --- a/lib/efi_loader/efi_memory.c
> +++ b/lib/efi_loader/efi_memory.c
> @@ -123,6 +123,11 @@ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
>  	struct efi_mem_list *newlist;
>  	bool do_carving;
>  
> +#ifdef DEBUG_EFI
> +	printf("%s: 0x%" PRIx64 " 0x%" PRIx64 " %d %s\n", __func__,
> +		start, pages, memory_type, overlap_only_ram ? "yes" : "no");
> +#endif
> +
>  	if (!pages)
>  		return start;

This should be using debug() instead.  And in fact can you please do a
clean up series to make EFI use DEBUG (for toggling EFI_ENTRY extra
debug stuff) and debug() instead of adding a new symbol?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160418/dd20c76c/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-18 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13  3:33 [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map() Andreas Färber
2016-04-13  9:25 ` Alexander Graf
2016-04-18 16:26 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox