From owner-freebsd-current@FreeBSD.ORG Mon Mar 5 22:03:12 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54C6A1065698; Mon, 5 Mar 2012 22:03:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 15FEC8FC1A; Mon, 5 Mar 2012 22:03:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id AAA0D46B43; Mon, 5 Mar 2012 17:03:11 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3712EB924; Mon, 5 Mar 2012 17:03:11 -0500 (EST) From: John Baldwin To: Palle Girgensohn Date: Mon, 5 Mar 2012 16:16:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203051239.53934.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203051616.12188.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Mar 2012 17:03:11 -0500 (EST) Cc: Palle Girgensohn , Christoph Hoffmann , "freebsd-current@freebsd.org" Subject: Re: gptzfsboot error using HP Smart Array P410i Controller X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 22:03:12 -0000 On Monday, March 05, 2012 2:35:59 pm Palle Girgensohn wrote: > > 5 mar 2012 kl. 18:39 skrev John Baldwin : > > > On Saturday, March 03, 2012 7:06:14 pm Christoph Hoffmann wrote: > >> Hello, > >> > >> I think this bug has been fix by John Baldwin (see below) after he found that HP > >> implemented 'e09127r3 EDD-4 Hybrid MBR boot code annex' dated > >> 4 January 2010. > >> > >> Maybe John could shade some light on it? > > > > Hmm, this fix should be in 9.0, so I don't have an explanation for why booting > > on 9.0 would still be broken. > > > Ok, that's odd. I tried 9.0, it does fail, and the printf actually makes it work. Can you try editing sys/boot/i386/common/drv.c and adding some additional padding after the edd_params? Perhaps the BIOS is assuming it always gets the full thing even if we pass in a 1.1-sized structure. Just try putting a edd_params_v4 structure after the normal one. > Palle > > > > >> Regards, > >> > >> Christoph > >> > >> Author: jhb > >> Date: Wed Nov 9 18:26:19 2011 > >> New Revision: 227400 > >> URL: > >> http://svn.freebsd.org/changeset/base/227400 > >> > >> Log: > >> MFC 226748: > >> - Add a new header for the x86 boot code that defines various structures > >> and constants related to the BIOS Enhanced Disk Drive Specification. > >> - Use this header instead of magic numbers and various duplicate structure > >> definitions for doing I/O. > >> - Use an actual structure for the request to fetch drive parameters in > >> drvsize() rather than a gross hack of a char array with some magic > >> size. While here, change drvsize() to only pass the 1.1 version of > >> the structure and not request device path information. If we want > >> device path information you have to set the length of the device > >> path information as an input (along with probably checking the actual > >> EDD version to see which size one should use as the device path > >> information is variable-length). This fixes data smashing problems > >> from passing an EDD 3 structure to BIOSes supporting EDD 4. > >> > >> Approved by: re (kib) > >> > >> -- > >> Christoph Hoffmann > >> > >> On Mar 1, 2012, at 10:39 PM, Palle Girgensohn wrote: > >> > >>> Hi! > >>> > >>> This is still happening with FreeBSD 9.0-RELEASE, as I have just > >>> discovered. The hack works like a charm, but seems kind of odd... :) > >>> > >>> Any progress in getting a "real" fix into the repository? Any risks with > >>> the hack - is it likely to believe that it will suddenly or sporadically > >>> fail? > >>> > >>> Cheers, > >>> Palle > >>> > >>> Christoph Hoffmann skrev: > >>>> Hello Daniel, > >>>> > >>>> Last time I checked up on the issue was on the 23rd of September, > >>>> it was not fixed then. > >>>> I was able to to boot from drive 0x80 after adding: > >>>> > >>>> *** zfsboot.c.orig Fri Sep 23 18:03:26 2011 > >>>> --- zfsboot.c Fri Sep 23 18:47:44 2011 > >>>> *************** > >>>> *** 459,464 **** > >>>> --- 459,465 ---- > >>>> heap_end = (char *) PTOV(bios_basemem); > >>>> } > >>>> > >>>> + printf("Hello! I am a hack.\n"); > >>>> dsk = malloc(sizeof(struct dsk)); > >>>> dsk->drive = *(uint8_t *)PTOV(ARGS); > >>>> dsk->type = dsk->drive & DRV_HARD ? TYPE_AD : TYPE_FD; > >>>> > >>>> I am inclined to think that this is related to the way how we compile this code, > >>>> especially when run on the following particular processor: > >>>> > >>>> 1 Processor(s) detected, 4 total cores enabled, Hyperthreading is enabled > >>>> Proc 1: Intel(R) Xeon(R) CPU E5630 @ 2.53GHz > >>>> QPI Speed: 5.8 GT/s. > >>>> > >>>> > >>>> Regards, > >>>> > >>>> Christoph > >>>> > >>>> > >>>> On Oct 11, 2011, at 3:16 PM, Daniel Kalchev wrote: > >>>> > >>>>> Has this issue been resolved somehow? Sane method to build gptzfsboot that will run on HP's P410i? > >>>>> > >>>>> Daniel > >>>>> _______________________________________________ > >>>>> freebsd-current@freebsd.org mailing list > >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >>>> > >>>> _______________________________________________ > >>>> freebsd-current@freebsd.org mailing list > >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >>> _______________________________________________ > >>> freebsd-current@freebsd.org mailing list > >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >> > >> > > > > -- > > John Baldwin > -- John Baldwin