From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933682AbbGGU1E (ORCPT ); Tue, 7 Jul 2015 16:27:04 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:51161 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758045AbbGGUU5 (ORCPT ); Tue, 7 Jul 2015 16:20:57 -0400 From: Yinghai Lu To: Kees Cook , "H. Peter Anvin" , Baoquan He Cc: linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH 21/42] x86, boot: Add more debug printout in compressed/misc.c Date: Tue, 7 Jul 2015 13:20:07 -0700 Message-Id: <1436300428-21163-22-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1436300428-21163-1-git-send-email-yinghai@kernel.org> References: <1436300428-21163-1-git-send-email-yinghai@kernel.org> X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org with support that use printf.c in x86 setup code. print out more info for debug info. Signed-off-by: Yinghai Lu --- arch/x86/boot/compressed/misc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index ee73b7b..a428c03 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -344,7 +344,7 @@ static void parse_elf(void *output) return; } - debug_putstr("Parsing ELF... "); + debug_putstr("Parsing ELF...\n"); phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); if (!phdrs) @@ -369,6 +369,11 @@ static void parse_elf(void *output) * Here dest is smaller than src always. */ memcpy(dest, output + phdr->p_offset, phdr->p_filesz); + debug_printf(" parse_elf: [0x%010lx-0x%010lx] <=== [0x%010lx-0x%010lx]\n", + (unsigned long)dest, + (unsigned long)dest + phdr->p_filesz - 1, + (unsigned long)output + phdr->p_offset, + (unsigned long)output + phdr->p_offset + phdr->p_filesz - 1); break; default: /* Ignore other PT_* */ break; } @@ -475,6 +480,11 @@ asmlinkage __visible void *decompress_kernel(void *rmode, memptr heap, error("Wrong destination address"); #endif + debug_printf(" decompress: [0x%010lx-0x%010lx] <=== [0x%010lx-0x%010lx]\n", + (unsigned long)output, + (unsigned long)output + output_len - 1, + (unsigned long)input_data, + (unsigned long)input_data + input_len - 1); debug_putstr("\nDecompressing Linux... "); decompress(input_data, input_len, NULL, NULL, output, NULL, error); parse_elf(output); -- 1.8.4.5