From patchwork Wed Oct 24 04:04:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 193653 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 C6B512C0080 for ; Wed, 24 Oct 2012 15:05:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71DFD4A1E3; Wed, 24 Oct 2012 06:05:44 +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 h0Yu9ryF6faI; Wed, 24 Oct 2012 06:05:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3CBE84A46B; Wed, 24 Oct 2012 06:05:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 49CA84A18D for ; Wed, 24 Oct 2012 06:05:11 +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 o5sbm4ZmzvgK for ; Wed, 24 Oct 2012 06:05:10 +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-wi0-f202.google.com (mail-wi0-f202.google.com [209.85.212.202]) by theia.denx.de (Postfix) with ESMTPS id 5B86A4A2C6 for ; Wed, 24 Oct 2012 06:05:07 +0200 (CEST) Received: by mail-wi0-f202.google.com with SMTP id hr7so5804wib.3 for ; Tue, 23 Oct 2012 21:05:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=R62vHXpXMgPQnFyfP31yNyu7aQ6US896+qXOr9Ployc=; b=NUF5BprU7HDY8hnx91cxYmmxSTQ4kVvcSzMNiWjlq3X+HjKnVKhPOBqZFzV9u5TVJ1 5+q/ak0c/W1Uuv0iOazL+z1sZNaV+jmDsDguiFuZRcov1TaIIy/Eutkj67pJZrifn+04 KtbA5RE6Hgli9BFaIahtGWrCOtNZCK8mfvjfrLdY5wvqrxPNrkH8RL+PpX4hN8Nutfz0 /rtJtyB/eubn0xpNC0NE0TkOwGrxwFqiucsBCOP2gXkAKVtEu6l8/xROhuEpBXzvymrZ tz66bPNQ1+K9yiCip/UvHN3hkCGRznRGvrafdRMc1PpEjTKDpMnCZvah+K8G9Q52uwmM fnmg== Received: by 10.181.12.101 with SMTP id ep5mr234062wid.1.1351051506763; Tue, 23 Oct 2012 21:05:06 -0700 (PDT) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id bu8si104703wib.2.2012.10.23.21.05.06 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 23 Oct 2012 21:05:06 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 5CFFE20004E; Tue, 23 Oct 2012 21:05:06 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 97A74161D10; Tue, 23 Oct 2012 21:05:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 23 Oct 2012 21:04:37 -0700 Message-Id: <1351051486-6980-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351051486-6980-1-git-send-email-sjg@chromium.org> References: <1351051486-6980-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQlRzhl/UtV6US/LPR0hM5uvumH+YhWeNTgDS/d9Hu0jzooMRj/0HH+diKn6cxHOxuOYa7nygWua7btJhbKkZFv5AuNfMNg+yUEgj8nVww3dU8Xgx94mNyNKtDqNdLkhL3KTaiL1Lz0VtaG/PC7EY2FpoqvUp1+eUn1WDKIHxq8cNyGIyNRcwfx46NoDdaKzBY5hWuYL Cc: Stefan Reinauer Subject: [U-Boot] [PATCH 06/15] x86: Provide a function to clean up just before booting a zimage 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 From: Stefan Reinauer This function can be used by boards which want to do some clean-up before booting a zImage. Signed-off-by: Stefan Reinauer Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 1d6a0ed..a1366a1 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -39,6 +39,7 @@ #ifdef CONFIG_SYS_COREBOOT_ #include #endif +#include /* * Memory lay-out: @@ -282,8 +283,18 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, return 0; } +/* + * Implement a weak default function for boards that optionally + * need to clean up the system before jumping to the kernel. + */ +__weak void board_final_cleanup(void) +{ +} + void boot_zimage(void *setup_base, void *load_address) { + board_final_cleanup(); + printf("\nStarting kernel ...\n\n"); #ifdef CONFIG_SYS_COREBOOT_ timestamp_add_now(TS_U_BOOT_START_KERNEL);