From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [Qemu-devel] Change of TEXT_OFFSET for multi_v7_defconfig Date: Tue, 22 Apr 2014 11:00:19 -0600 Message-ID: <20140422170019.GA23955@obsidianresearch.com> References: <534D0D91.8020406@linaro.org> <534EAD6C.3040502@codeaurora.org> <534EF153.5050603@codeaurora.org> <53501E87.6070307@codeaurora.org> <20140417203521.GB22411@obsidianresearch.com> <535681A4.1080402@monstr.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from quartz.orcorp.ca ([184.70.90.242]:42726 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932854AbaDVRA1 (ORCPT ); Tue, 22 Apr 2014 13:00:27 -0400 Content-Disposition: inline In-Reply-To: <535681A4.1080402@monstr.eu> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Michal Simek Cc: Christopher Covington , Nicolas Pitre , Peter Maydell , Daniel Thompson , Joel Fernandes , linux-arm-msm@vger.kernel.org, Stephen Boyd , Peter Crosthwaite , QEMU Developers , linux-arm-kernel@lists.infradead.org > > index 8756e4b..551e971 100644 > > +++ b/arch/arm/include/asm/memory.h > > @@ -350,7 +350,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) > > #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) \ > > && pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ) > > > > -#endif > > +#endif /* __ASSEMBLY__ */ > This is unrelated change. Right, as I said it needs some cleanup :) This is left overs from rebasing to 3.14 - the original had to carry some small changes to memory.h as well, but now that we have PLAT_PHYS_OFFSET that isn't necessary. > > @@ -43,7 +50,7 @@ > > #endif > > > > OUTPUT_ARCH(arm) > > -ENTRY(stext) > > +ENTRY(phys_start) > > > > #ifndef __ARMEB__ > > jiffies = jiffies_64; > > @@ -86,11 +93,13 @@ SECTIONS > > #else > > . = PAGE_OFFSET + TEXT_OFFSET; > > #endif > > - .head.text : { > > + .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { > > _text = .; > > + phys_start = . - LOAD_OFFSET; > > HEAD_TEXT > > } > > I am not quite about these changes above but Russell can comment it. This is adjusting the entry point address in the ELF. I have copied what other arch's are doing and used the physical address as the entry address (see x86, ia64). Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe) Date: Tue, 22 Apr 2014 11:00:19 -0600 Subject: [Qemu-devel] Change of TEXT_OFFSET for multi_v7_defconfig In-Reply-To: <535681A4.1080402@monstr.eu> References: <534D0D91.8020406@linaro.org> <534EAD6C.3040502@codeaurora.org> <534EF153.5050603@codeaurora.org> <53501E87.6070307@codeaurora.org> <20140417203521.GB22411@obsidianresearch.com> <535681A4.1080402@monstr.eu> Message-ID: <20140422170019.GA23955@obsidianresearch.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > > index 8756e4b..551e971 100644 > > +++ b/arch/arm/include/asm/memory.h > > @@ -350,7 +350,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) > > #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) \ > > && pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ) > > > > -#endif > > +#endif /* __ASSEMBLY__ */ > This is unrelated change. Right, as I said it needs some cleanup :) This is left overs from rebasing to 3.14 - the original had to carry some small changes to memory.h as well, but now that we have PLAT_PHYS_OFFSET that isn't necessary. > > @@ -43,7 +50,7 @@ > > #endif > > > > OUTPUT_ARCH(arm) > > -ENTRY(stext) > > +ENTRY(phys_start) > > > > #ifndef __ARMEB__ > > jiffies = jiffies_64; > > @@ -86,11 +93,13 @@ SECTIONS > > #else > > . = PAGE_OFFSET + TEXT_OFFSET; > > #endif > > - .head.text : { > > + .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { > > _text = .; > > + phys_start = . - LOAD_OFFSET; > > HEAD_TEXT > > } > > I am not quite about these changes above but Russell can comment it. This is adjusting the entry point address in the ELF. I have copied what other arch's are doing and used the physical address as the entry address (see x86, ia64). Jason