From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH v3 02/31] arm64: Kernel booting and initialisation Date: Mon, 10 Sep 2012 17:08:56 +0100 Message-ID: <20120910160856.GG27042@arm.com> References: <1347035226-18649-1-git-send-email-catalin.marinas@arm.com> <1347035226-18649-3-git-send-email-catalin.marinas@arm.com> <20120909172046.GB31430@game.jcrosoft.org> <20120910055339.GC31430@game.jcrosoft.org> <20120910125137.GC27042@arm.com> <20120910152102.GD31430@game.jcrosoft.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:45749 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758019Ab2IJQJq (ORCPT ); Mon, 10 Sep 2012 12:09:46 -0400 Content-Disposition: inline In-Reply-To: <20120910152102.GD31430@game.jcrosoft.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Jean-Christophe PLAGNIOL-VILLARD Cc: Nicolas Pitre , "linux-arch@vger.kernel.org" , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" On Mon, Sep 10, 2012 at 04:21:02PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 13:51 Mon 10 Sep , Catalin Marinas wrote: > > On Mon, Sep 10, 2012 at 06:53:39AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > On 19:29 Sun 09 Sep , Nicolas Pitre wrote: > > > > On Sun, 9 Sep 2012, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > > On 17:26 Fri 07 Sep , Catalin Marinas wrote: > > > > > > +The image must be placed at the specified offset (currently 0x80000) > > > > > > +from the start of the system RAM and called there. The start of the > > > > > > +system RAM must be aligned to 2MB. > > > > > can we drop this > > > > > > > > Drop what? > > > > And why? > > > This contrain the must be loadable at any address > > > > You can't easily load the kernel image at any address, unless it can > > relocate itself and you have a way to specify PHYS_OFFSET. We don't want > > a compile-time PHYS_OFFSET, the kernel detects it at boot time based on > > the load address. > so NACK kexec and other boot loaders require it Just in case it wasn't clear, the kernel can be loaded at any address in RAM (and the RAM can start at any sane address). The way the kernel calculates PHYS_OFFSET is (load address - TEXT_OFFSET) unless we pass it by other means (none currently specified). For a kdump kernel, it just assumes that its PHYS_OFFSET is higher but it can ioremap the crashed kernel memory. -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Mon, 10 Sep 2012 17:08:56 +0100 Subject: [PATCH v3 02/31] arm64: Kernel booting and initialisation In-Reply-To: <20120910152102.GD31430@game.jcrosoft.org> References: <1347035226-18649-1-git-send-email-catalin.marinas@arm.com> <1347035226-18649-3-git-send-email-catalin.marinas@arm.com> <20120909172046.GB31430@game.jcrosoft.org> <20120910055339.GC31430@game.jcrosoft.org> <20120910125137.GC27042@arm.com> <20120910152102.GD31430@game.jcrosoft.org> Message-ID: <20120910160856.GG27042@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Sep 10, 2012 at 04:21:02PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 13:51 Mon 10 Sep , Catalin Marinas wrote: > > On Mon, Sep 10, 2012 at 06:53:39AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > On 19:29 Sun 09 Sep , Nicolas Pitre wrote: > > > > On Sun, 9 Sep 2012, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > > On 17:26 Fri 07 Sep , Catalin Marinas wrote: > > > > > > +The image must be placed at the specified offset (currently 0x80000) > > > > > > +from the start of the system RAM and called there. The start of the > > > > > > +system RAM must be aligned to 2MB. > > > > > can we drop this > > > > > > > > Drop what? > > > > And why? > > > This contrain the must be loadable at any address > > > > You can't easily load the kernel image at any address, unless it can > > relocate itself and you have a way to specify PHYS_OFFSET. We don't want > > a compile-time PHYS_OFFSET, the kernel detects it at boot time based on > > the load address. > so NACK kexec and other boot loaders require it Just in case it wasn't clear, the kernel can be loaded at any address in RAM (and the RAM can start at any sane address). The way the kernel calculates PHYS_OFFSET is (load address - TEXT_OFFSET) unless we pass it by other means (none currently specified). For a kdump kernel, it just assumes that its PHYS_OFFSET is higher but it can ioremap the crashed kernel memory. -- Catalin