From patchwork Tue Nov 8 12:33:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Russ X-Patchwork-Id: 124345 X-Patchwork-Delegate: graeme.russ@gmail.com 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 9BF481007D4 for ; Tue, 8 Nov 2011 23:35:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84D5729A09; Tue, 8 Nov 2011 13:34:51 +0100 (CET) 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 ZPsF8tUJplIw; Tue, 8 Nov 2011 13:34:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84F3229917; Tue, 8 Nov 2011 13:34:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83A3429863 for ; Tue, 8 Nov 2011 13:34:06 +0100 (CET) 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 hqwic0+r6qg5 for ; Tue, 8 Nov 2011 13:34:04 +0100 (CET) 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-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by theia.denx.de (Postfix) with ESMTPS id 2D46C2987F for ; Tue, 8 Nov 2011 13:33:51 +0100 (CET) Received: by mail-gx0-f172.google.com with SMTP id v1so470459ggn.3 for ; Tue, 08 Nov 2011 04:33:50 -0800 (PST) Received: by 10.236.183.52 with SMTP id p40mr41462123yhm.19.1320755630923; Tue, 08 Nov 2011 04:33:50 -0800 (PST) Received: from localhost.localdomain (d122-104-32-210.sbr6.nsw.optusnet.com.au. [122.104.32.210]) by mx.google.com with ESMTPS id u19sm3948194ank.11.2011.11.08.04.33.48 (version=SSLv3 cipher=OTHER); Tue, 08 Nov 2011 04:33:50 -0800 (PST) From: Graeme Russ To: u-boot@lists.denx.de Date: Tue, 8 Nov 2011 23:33:19 +1100 Message-Id: <1320755603-8695-9-git-send-email-graeme.russ@gmail.com> X-Mailer: git-send-email 1.7.5.2.317.g391b14 In-reply-to: <1320459711-20257-4-git-send-email-graeme.russ@gmail.com> Cc: Graeme Russ Subject: [U-Boot] [PATCH v2 08/12] x86: Add multiboot header X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to bootstrap U-Boot is useful for using an existing BIOS to get an initial U-Boot port up and running before implementing the low-level reset vector code, SDRAM init, etc. and overwriting the BIOS Signed-off-by: Graeme Russ --- Changes for v1: - None (skipped to set single version for consolidated series) Changes for v2: - Consolidated patch series arch/x86/cpu/start.S | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) -- 1.7.5.2.317.g391b14 diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 5adb387..d099fc9 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -129,3 +129,23 @@ die: hlt blank_idt_ptr: .word 0 /* limit */ .long 0 /* base */ + + .p2align 2 /* force 4-byte alignment */ + +multiboot_header: + /* magic */ + .long 0x1BADB002 + /* flags */ + .long (1 << 16) + /* checksum */ + .long -0x1BADB002 - (1 << 16) + /* header addr */ + .long multiboot_header - _x86boot_start + CONFIG_SYS_TEXT_BASE + /* load addr */ + .long CONFIG_SYS_TEXT_BASE + /* load end addr */ + .long 0 + /* bss end addr */ + .long 0 + /* entry addr */ + .long CONFIG_SYS_TEXT_BASE