Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932371AbWHGXyw (ORCPT ); Mon, 7 Aug 2006 19:54:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932418AbWHGXyw (ORCPT ); Mon, 7 Aug 2006 19:54:52 -0400 Received: from mx1.redhat.com ([66.187.233.31]:20685 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S932371AbWHGXyw (ORCPT ); Mon, 7 Aug 2006 19:54:52 -0400 Date: Mon, 7 Aug 2006 19:57:27 -0400 From: Don Zickus To: "Eric W. Biederman" Cc: fastboot@osdl.org, Horms , Jan Kratochvil , "H. Peter Anvin" , Magnus Damm , linux-kernel@vger.kernel.org Subject: Re: [Fastboot] [CFT] ELF Relocatable x86 and x86_64 bzImages Message-ID: <20060807235727.GM16231@redhat.com> References: <20060710233219.GF16215@in.ibm.com> <20060711010815.GB1021@host0.dyn.jankratochvil.net> <20060804210826.GE16231@redhat.com> <20060804234327.GF16231@redhat.com> <20060807174439.GJ16231@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1724 Lines: 45 > >> > > >> >> > >> >> The error is the uncompressed length does not math the stored length > >> >> of the data before from before we compressed it. Now what is > >> >> fascinating is that our crc's match (as that check is performed first). > >> >> > >> >> Something is very slightly off and I don't see what it is. > >> > > >> > I printed out orig_len -> 5910532 (which matches vmlinux.bin) > >> > bytes_out -> 5910531 > >> > > >> >> > > It seems to be an AMD64 vs EM64T problem. AMD chipsets work but Intel > > chipsets don't. > > > > I also blindly incremented bytes_out (as a really cheap hack), it didn't > > work until I added some random putstr's below it (timing??). Then the > > kernel booted. > > > > Still looking into things. > > Odd. I wonder if I'm missing a serializing instruction somewhere, > to ensure the effects of ``self modifying code'' aren't a problem. > As I read Intels Documentation if you have a jump before you get > to the code there shouldn't be a problem. > > Still that doesn't really explain bytes_out. > So I narrowed down the problem but it isn't obvious to me why this problem exists. Basically, even though bytes_out is supposed to be initialized to 0, it becomes -1 before entering decompress_kernel(). Of course, the fallout is in flush_window() bytes_out wounds up being one less than outcnt and hence my original problem. Any thoughts on how to debug where this could be getting corrupted? Cheers, Don - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/