From patchwork Wed Oct 24 04:04:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 193657 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 91C9D2C0080 for ; Wed, 24 Oct 2012 15:06:26 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83FAE4A3F4; Wed, 24 Oct 2012 06:06:12 +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 BVsP0dInfNAv; Wed, 24 Oct 2012 06:06:12 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35C314A495; Wed, 24 Oct 2012 06:05:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20D394A47B for ; Wed, 24 Oct 2012 06:05:15 +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 j1Og6-05KMSe for ; Wed, 24 Oct 2012 06:05:14 +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-fa0-f74.google.com (mail-fa0-f74.google.com [209.85.161.74]) by theia.denx.de (Postfix) with ESMTPS id 173FC4A3D9 for ; Wed, 24 Oct 2012 06:05:07 +0200 (CEST) Received: by mail-fa0-f74.google.com with SMTP id t1so5759fae.3 for ; Tue, 23 Oct 2012 21:05:07 -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=+kB7Me/a7DjhESxfh6GB2KNcV9nC1bav/588GIcB/xI=; b=N0FTRqNQ8x937EctPBK3ZxAijlx265y42+yDcVHbwrT4IVrlymDZjgHaA2jbTemRB8 7axCt+WS0T+gDJvS0NKb9CO/fykhTq6tnfF/A9uVXUBZ1ONgWLBhG9ee1H2aAG6Z4KzT xpapqqst5+lLKzea/UkTrhnZZQdq3VOeNzKfWPlmUZ25/6uqh8Fl2FbLqULHZ+bjOhMg pV9LGVxJUVUEZGRSDLoLNQqowWEO6KLcBoe95QSb0JvCgXl9OFm1wZlcedCUHBnhNa// SByRImMd+L0OzM9+FH72Fcycy2caATReI8tcd9tOcLpO1VQpbZOx9+8dkfaGhdPYSHQC fNbA== Received: by 10.216.51.138 with SMTP id b10mr882450wec.8.1351051507038; Tue, 23 Oct 2012 21:05:07 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id gp9si105778wib.0.2012.10.23.21.05.07 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 23 Oct 2012 21:05:07 -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 A1CEA5C0063; Tue, 23 Oct 2012 21:05:06 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 12765161C7E; Tue, 23 Oct 2012 21:05:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 23 Oct 2012 21:04:42 -0700 Message-Id: <1351051486-6980-12-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: ALoCoQmD+AazuqiOGpynmFaWZr5HLhR8MpJLBwpQS5SBMp6xeiiPDzJF+dStfInXNg+xnUGmgQaItgtjd+W6vxkB4Upbk9dn1yi8mjwH435f+YXT1jU/MTDkBb74wH4y3OoR9L/E744RHJV+tmBgknrq1CKwPQdXpW3v1bjCaKQXV+dD5gk/p2WY3l4j49s9N8xgRss/PeTE Cc: Duncan Laurie Subject: [U-Boot] [PATCH 11/15] x86: Ignore memory >4GB when parsing Coreboot tables 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: Duncan Laurie U-boot is unable to actually use that memory and it can cause problems with relocation if it tries to. Signed-off-by: Duncan Laurie Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/sdram.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index 93dccb8..5d3da99 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -60,6 +60,10 @@ int dram_init_f(void) struct memrange *memrange = &lib_sysinfo.memrange[i]; unsigned long long end = memrange->base + memrange->size; + /* Ignore memory over 4GB, we can't use it. */ + if (memrange->base > 0xffffffff) + continue; + if (memrange->type == CB_MEM_RAM && end > ram_size) ram_size = end; }