From owner-freebsd-stable@FreeBSD.ORG Tue Jun 21 15:55:20 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B895D1065670 for ; Tue, 21 Jun 2011 15:55:20 +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 8FEFC8FC18 for ; Tue, 21 Jun 2011 15:55:20 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2FA4146B03; Tue, 21 Jun 2011 11:55:20 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B56368A01F; Tue, 21 Jun 2011 11:55:19 -0400 (EDT) From: John Baldwin To: Henri Hennebert Date: Tue, 21 Jun 2011 11:55:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201106210901.27338.jhb@freebsd.org> <4E00AFA6.4050305@restart.be> In-Reply-To: <4E00AFA6.4050305@restart.be> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201106211155.19231.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 21 Jun 2011 11:55:19 -0400 (EDT) Cc: freebsd-stable@freebsd.org Subject: Re: ZFS boot inside on the second partition inside a slice X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 15:55:20 -0000 On Tuesday, June 21, 2011 10:50:14 am Henri Hennebert wrote: > On 06/21/2011 15:01, John Baldwin wrote: > > Index: zfsldr.S > > =================================================================== > > --- zfsldr.S (revision 223339) > > +++ zfsldr.S (working copy) > > @@ -234,9 +234,12 @@ nread.1: xor %ecx,%ecx # Get > > callw read # Read from disk > > lea 0x10(%bp),%sp # Clear stack > > jnc return # If success, return > > - mov $msg_read,%si # Otherwise, set the error > > - # message and fall through to > > - # the error routine > > + mov %ah,%al # Format > > + mov $read_err,%di # error > > + call hex8 # code > > + mov $msg_read,%si # Set the error message and > > + # fall through to the error > > + # routine > > /* > > * Print out the error message pointed to by %ds:(%si) followed > > * by a prompt, wait for a keypress, and then reboot the machine. > > @@ -296,12 +299,28 @@ read.1: mov $msg_chs,%si > > jmp error > > msg_chs: .asciz "CHS not supported" > > > > +/* > > + * Convert AL to hex, saving the result to [EDI]. > > + */ > > +hex8: push %ax # Save > > + shrb $0x4,%al # Do upper > > + call hex8.1 # 4 > > + pop %ax # Restore > > +hex8.1: andb $0xf,%al # Get lower 4 > > + cmpb $0xa,%al # Convert > > + sbbb $0x69,%al # to hex > > + das # digit > > + orb $0x20,%al # To lower case > > + stosb # Save char > > + ret # (Recursive) > > + > > /* Messages */ > > > > -msg_read: .asciz "Read" > > -msg_part: .asciz "Boot" > > +msg_read: .ascii "Read error: " > > +read_err: .asciz "XX" > > +msg_part: .asciz "Boot error" > > > > -prompt: .asciz " error\r\n" > > +prompt: .asciz "\r\n" > > > > .org PRT_OFF,0x90 > > > I get > > Read error: 01 Hmm, that would be 'invalid parameter'. Can you add a 'foo: jmp foo' infinite loop and move it around to figure out which read call is failing? -- John Baldwin