From patchwork Thu Apr 18 02:13:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 237414 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2EC122C0195 for ; Thu, 18 Apr 2013 12:18:07 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 117924A382; Thu, 18 Apr 2013 04:17:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9EECnPf1HUYz; Thu, 18 Apr 2013 04:17:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF5594A34E; Thu, 18 Apr 2013 04:15:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FFB34A331 for ; Thu, 18 Apr 2013 04:15:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VY0okbRNKH63 for ; Thu, 18 Apr 2013 04:15:52 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f201.google.com (mail-gg0-f201.google.com [209.85.161.201]) by theia.denx.de (Postfix) with ESMTPS id 458B74A2EC for ; Thu, 18 Apr 2013 04:15:10 +0200 (CEST) Received: by mail-gg0-f201.google.com with SMTP id q6so235784ggc.4 for ; Wed, 17 Apr 2013 19:15:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=CIanza22HCH2PJIYdGRR1Y/eEME8Azefoy3ybDhO1fA=; b=G7sH31ivPM0ITPgfgWk00IZ6ZRNFLytedE2Pi2t3uvHNa63FlI01chQwL30V/ImA7e /hFGga3sbwibHRBFiBpYzFNivFwjVdX1Xw2JMSlaaPCGXVFhGUwtHWJeYttAwOMsLgY2 H+qmz/k1FT0xR37UgYH6Wo5TivGjh7wbNF1qWMq5d5llTkvVBL+u5SjTKsfvhVk/hdnM frLyEV2HlowqGoi4ALE0yYR8MXlPmpbDOjzu4SOhTurbETIhEv5Tgee5h5r0HF7SEo5o lHNYQ0R2lv+EDZUch7upPbS4comti73fszwR1fk9toB7VvLAZrXSOrMlb6o6QsjlLKxE 3TBA== X-Received: by 10.236.25.175 with SMTP id z35mr4386010yhz.45.1366251309755; Wed, 17 Apr 2013 19:15:09 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id s80si1875545yhe.6.2013.04.17.19.15.09 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 17 Apr 2013 19:15:09 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id E95E25AF65F; Wed, 17 Apr 2013 19:14:10 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 70CEB1608C7; Wed, 17 Apr 2013 19:14:10 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 17 Apr 2013 19:13:35 -0700 Message-Id: <1366251228-19884-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1366251228-19884-1-git-send-email-sjg@chromium.org> References: <1366251228-19884-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQm/2yKZ/5GW9m45hMIJ+OI9ClwMCeYgA85EHFDyYUOXLFaLcUUPTfYDOsRQAwkDj8cMWnN7BYyBQL2eey6HNvLtXBeovd146U7IrZ4Z1+iDL1YPMhPWlt8awVz6uWXvxnsdi4ZaB4Ar3RLeAIpVuPLzw6RcO3JjuSSb1iKeencodsFKceSPQ4OULhPQ9dSd7JqL5zQt Cc: Graeme Russ , u-boot-review@google.com Subject: [U-Boot] [PATCH 06/19] x86: Rationalise kernel booting logic and bootstage X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The 'Starting linux' message appears twice in the code, but both call through the same place. Unify these and add calls to bootstage to mark the occasion. Signed-off-by: Simon Glass Reviewed-by: Michael Spang Acked-by: Graeme Russ --- arch/x86/cpu/cpu.c | 5 +++++ arch/x86/lib/bootm.c | 8 -------- arch/x86/lib/zimage.c | 11 +++++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 1a2f85c..7a914a5 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -120,6 +120,11 @@ void setup_gdt(gd_t *id, u64 *gdt_addr) int __weak x86_cleanup_before_linux(void) { +#ifdef CONFIG_BOOTSTAGE_STASH + bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH, + CONFIG_BOOTSTAGE_STASH_SIZE); +#endif + return 0; } diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 83caf6b..2520228 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -93,14 +93,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], goto error; } -#ifdef DEBUG - printf("## Transferring control to Linux (at address %08x) ...\n", - (u32)base_ptr); -#endif - - /* we assume that the kernel is in place */ - printf("\nStarting kernel ...\n\n"); - boot_zimage(base_ptr, load_address); /* does not return */ diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 4e9e1f7..b54cf12 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -283,6 +283,13 @@ __weak void board_final_cleanup(void) void boot_zimage(void *setup_base, void *load_address) { + debug("## Transferring control to Linux (at address %08x) ...\n", + (u32)setup_base); + + bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel"); +#ifdef CONFIG_BOOTSTAGE_REPORT + bootstage_report(); +#endif board_final_cleanup(); printf("\nStarting kernel ...\n\n"); @@ -363,10 +370,6 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) return -1; } - printf("## Transferring control to Linux " - "(at address %08x) ...\n", - (u32)base_ptr); - /* we assume that the kernel is in place */ boot_zimage(base_ptr, load_address); /* does not return */