Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vq8Cj-0007K0-Cl for mharc-grub-devel@gnu.org; Mon, 09 Dec 2013 16:17:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq8Cb-00079F-9U for grub-devel@gnu.org; Mon, 09 Dec 2013 16:17:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vq8CV-0003Sr-Ac for grub-devel@gnu.org; Mon, 09 Dec 2013 16:17:17 -0500 Received: from mail-qe0-f48.google.com ([209.85.128.48]:32919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq8CV-0003SB-6Y for grub-devel@gnu.org; Mon, 09 Dec 2013 16:17:11 -0500 Received: by mail-qe0-f48.google.com with SMTP id gc15so3337646qeb.7 for ; Mon, 09 Dec 2013 13:17:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Db1wrgpPKIozkhlzF1ywB/RF/BTbokuLZsafddAaVPU=; b=B2lQSKXpj0m4UrapFUNffveJwexhmxfHLgvD2NeAHrMJU/qcJMGfLftiZHm2gLhahm ye2yCZDyZuroT70FkyJRiR83UXxHtmDmLl2YVoXlxb6CKEleN5ahft8jmI7L1So/LnyY +++vu91AdRO4ucCNWfeyTjVQ8AZwWY9n5H5WT/aNOvUTVnehKmuJfG31E5n8GAlWmThC 73jXZN03g3XoDPPg0DK/iv9LuhGKws2PBv95d2dr9v4hwnRcIfn22bDKlET5tYgYgpFV Ij9psFrqLcWlLPqwWsgwbDfAwG2yw+0B32J7vmpogvT3aTtae1UVxyU6RuTOCS8TwTRJ 8wow== X-Gm-Message-State: ALoCoQl+EFACDJgav+899Fqf+meAapM0P8vY6sqVVqR71qmQiBzvnjzzVRAVPbpPRx/6EhHLEPJW X-Received: by 10.224.28.72 with SMTP id l8mr37586833qac.35.1386623830648; Mon, 09 Dec 2013 13:17:10 -0800 (PST) Received: from rocoto.smurfnet.nu ([2001:4b98:dc0:41:216:3eff:fea7:75f3]) by mx.google.com with ESMTPSA id z16sm22631555qab.3.2013.12.09.13.17.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Dec 2013 13:17:09 -0800 (PST) Date: Mon, 9 Dec 2013 22:17:20 +0100 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: kern/efi/mm.c - MAX_USABLE_ADDRESS Message-ID: <20131209211720.GA22356@rocoto.smurfnet.nu> References: <20131209173036.GK24997@rocoto.smurfnet.nu> <52A61537.7030407@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52A61537.7030407@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.48 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 21:17:23 -0000 On Mon, Dec 09, 2013 at 08:08:39PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > A simple fix would be to just stack the ifdefs, but a better one might > > be to move the define to one of (which is currently > > a dummy for all platforms, simply including ) or types.h. > > > cpu/efi/memory.h is a possibility. cpu/types.h isn't because it's, at > least partially, EFI limitation (due to EFI bugs), not CPU. Ah, ok - that makes sense then. > Real > restrictions is a mix of unrelated restriction but it seem to align well > with CPU. > Increasing it beyond 0xffffffff will need chacking that efi/mm.c can > handle it without overflow. > The limits are: > -0xffffffff on 32-bit platforms due to address space size (i386, arm) > -0x7fffffff when x86_64 compiled without -mcmodel=large due to compiler > assumptions > -0xffffffff on x86_64 because some EFI implementations don't map memory > above 4G contrary to spec. > - On ia64 it's probably unlimited but I didn't test and there is always > a danger of EFI bugs similar to x86_64 one, so better to be conservative > about it > - arm64. You're the expert. Thank you - that makes it very clear. / Leif