From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Wed, 13 Apr 2016 11:25:52 +0200 Subject: [U-Boot] [PATCH] efi_loader: Add debug output for efi_add_memory_map() In-Reply-To: <1460518430-7101-1-git-send-email-afaerber@suse.de> References: <1460518430-7101-1-git-send-email-afaerber@suse.de> Message-ID: <570E10A0.8030004@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13.04.16 05:33, Andreas F?rber wrote: > Tracing the arguments has been helpful for pinpointing overflows. > > Cc: Alexander Graf > Signed-off-by: Andreas F?rber Reviewed-by: Alexander Graf 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; > >