From patchwork Sun Apr 7 15:33:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Vladimir_=27=CF=86-coder/phcoder=27_Serbinenko?= X-Patchwork-Id: 234508 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 8B7D02C00BA for ; Mon, 8 Apr 2013 02:52:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7502D4A1E5; Sun, 7 Apr 2013 18:52:23 +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 C9nbCNqXbJYx; Sun, 7 Apr 2013 18:52:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7EC094A1E6; Sun, 7 Apr 2013 18:52:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C977C4A1DF for ; Sun, 7 Apr 2013 17:41:19 +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 3kLcuY3y6Ljm for ; Sun, 7 Apr 2013 17:40:43 +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-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by theia.denx.de (Postfix) with ESMTPS id BEE694A1DD for ; Sun, 7 Apr 2013 17:40:36 +0200 (CEST) Received: by mail-ea0-f169.google.com with SMTP id n15so1984167ead.28 for ; Sun, 07 Apr 2013 08:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=Btn+SbgUMApchgPGa5Fz5mz2Gv5JLlFxEhX7YafOKXo=; b=rgu/35g62VO/j0ZuBpSOYaUusTneW72ysPwHjU78EE+QtZiZXyzteXLk0G9eNHdCm8 TxFpUuCdSNxsY+F0N4DmbKMvtSfGs/l5T8pTeo33Se1tyL22BwyWTzTsPjMedZgaZRBQ Ti5NzkNZB27KC0ZlYfucf3QRyiTp6ZC2vLVu/TpSAoblbUJRZ051OxHaknRbRmUEMwVm LUt8F8ez6rqnj06pTFeNRFSSpWwpGXBaZ0rnnqlAXPsLbh776591Pus1GR8u/V1fbgTx exSjKHbeF10ccLbOh3dWM6W+P0DummulXocTweYWKF8Ht7U+WXr4JxHsHCu848d6kxF/ GgvA== X-Received: by 10.15.22.76 with SMTP id e52mr39969098eeu.7.1365348836357; Sun, 07 Apr 2013 08:33:56 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPS id r4sm26840987eeo.12.2013.04.07.08.33.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Apr 2013 08:33:55 -0700 (PDT) Message-ID: <516191E2.8040403@gmail.com> Date: Sun, 07 Apr 2013 17:33:54 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: u-boot@lists.denx.de X-Enigmail-Version: 1.4.1 X-Mailman-Approved-At: Sun, 07 Apr 2013 18:51:55 +0200 Subject: [U-Boot] [PATCH] Fix wrong >4G filtering 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Filtering of >4G chunks is wrong and one of such chunks can be improperly declared as usable ram top after being cut down to 4G, so uboot tries to relocate to ROM. diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index 786009c..3b8dd5e 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -77,8 +77,11 @@ ulong board_get_usable_ram_top(ulong total_size) continue; /* Filter memory over 4GB. */ + if (start > 0xffffffffULL) + continue; if (end > 0xffffffffULL) - end = 0x100000000ULL; + end = 0xffffffffULL; + /* Skip this region if it's too small. */ if (end - start < total_size) continue;