From patchwork Sat Oct 20 22:33:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 192956 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 931742C008F for ; Sun, 21 Oct 2012 09:34:19 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81EF74A41F; Sun, 21 Oct 2012 00:34:10 +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 9GnOkz3wYLuT; Sun, 21 Oct 2012 00:34:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F69C4A427; Sun, 21 Oct 2012 00:33:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF79A4A408 for ; Sun, 21 Oct 2012 00:33:45 +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 VvaQ2Em-iu2H for ; Sun, 21 Oct 2012 00:33:45 +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-we0-f202.google.com (mail-we0-f202.google.com [74.125.82.202]) by theia.denx.de (Postfix) with ESMTPS id 304AE4A407 for ; Sun, 21 Oct 2012 00:33:43 +0200 (CEST) Received: by mail-we0-f202.google.com with SMTP id x43so85643wey.3 for ; Sat, 20 Oct 2012 15:33:43 -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=xgNRdRYuxrPb5ae0aFDB/gkD2CHLwnoNN3Qw/wiTsIY=; b=UBOTJqScXkKmZrd/zT2uXVChW1kgGfgmKlJKvI6/oTHtTFY0z1jDGBeJC30V+2ECGQ dHbFtfLiYDRa3nu5EVgR4sNB1uoA7gFmK2SE3v75nfoW7ARe36bZ6YMz5eemrxw8ohRL wDyO9G2rP5NUuTgRvPNRqOLKB4XUtqVYSoy5mFscsF0SfwnUtcs+SBLh8sYUCEkwltoK rnsDNcolHpUuqItm305Edkb0lkTFrKJ5Bfp/Gd7ZQ7I6hnTUONJ0Bdy2vPHeIDK99y2s Rh9vkGJL7e+3Jc80ybLxiMxjMSNNnkq8KThuVEPoxwyDFyOkcENj5w5B0L0QZR7nyYEP Hb+w== Received: by 10.180.82.193 with SMTP id k1mr1601253wiy.0.1350772423530; Sat, 20 Oct 2012 15:33:43 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id hm1si585307wib.3.2012.10.20.15.33.43 (version=TLSv1/SSLv3 cipher=AES128-SHA); Sat, 20 Oct 2012 15:33:43 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id 2681E5C0050; Sat, 20 Oct 2012 15:33:43 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 8BED116185E; Sat, 20 Oct 2012 15:33:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Oct 2012 15:33:12 -0700 Message-Id: <1350772396-28946-9-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1350772396-28946-1-git-send-email-sjg@chromium.org> References: <1350772396-28946-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQnsnLPJ6TOHsddS6yN/lVld6cpxH13aw2ysELKgcJCXB6GVfVtNKhdfFCEeSNVpd5f/XIKPNIKxBbpowgZirGhWUfpGPmj/spb7i1InO2tp5deEjuHcgPkKzHgClwjsHsSDbQrjauVfDk0NjYxOKX6CmU7OlEYAfhUiW5OVLaj+v7/dVOiqjV6sISngdoK1jzaq4ptr Cc: Tom Rini Subject: [U-Boot] [PATCH 08/12] x86: Initialize the device tree pointer to NULL in i386. 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: Gabe Black If the device tree pointer isn't set to anything, which could happen if the device tree isn't found, for instance, or simply never set up, the pointer could be set to something arbitrary. This change forces initializes it to NULL so that it's more obviously not set. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index e8bfe6f..8b6d4cf 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -93,6 +93,7 @@ static void load_gdt(const u64 *boot_gdt, u16 num_entries) void init_gd(gd_t *id, u64 *gdt_addr) { id->gd_addr = (ulong)id; + gd->fdt_blob = NULL; setup_gdt(id, gdt_addr); }