From owner-freebsd-current@FreeBSD.ORG Tue Aug 16 17:47:09 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017511065677; Tue, 16 Aug 2011 17:47:09 +0000 (UTC) (envelope-from christoph_hoffmann@me.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id D951E8FC12; Tue, 16 Aug 2011 17:47:08 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from tunnel0.sec101.ch ([62.2.44.112]) by asmtp027.mac.com (Oracle Communications Messaging Exchange Server 7u4-18.01 64bit (built Jul 15 2010)) with ESMTPSA id <0LQ100J7N821TS80@asmtp027.mac.com>; Tue, 16 Aug 2011 10:46:53 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-08-16_04:2011-08-16, 2011-08-16, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1108160218 From: Christoph Hoffmann In-reply-to: Date: Tue, 16 Aug 2011 19:46:48 +0200 Message-id: <9B96176A-7550-4B60-8F4D-0B667EEF7A15@me.com> References: <201108151212.07874.jhb@freebsd.org> <7BD5F062-A7B0-4D05-989F-F23C9353E7D8@me.com> <201108160948.07719.jhb@freebsd.org> To: Christoph Hoffmann X-Mailer: Apple Mail (2.1244.3) Cc: 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: Tue, 16 Aug 2011 17:47:09 -0000 Setting high_heap_size to zero ends with an error: Attempting Boot From CD-ROM Attempting Boot From Hard Drive (C:) 474: high_heap_size=0x0; dsk=0x1a000; &bootinfo=0x8694 malloc failure -- Christoph Hoffmann On Aug 16, 2011, at 4:41 PM, Christoph Hoffmann wrote: > Hello John, > > First with printf() before > dsk = malloc(sizeof(struct dsk)); > > Attempting Boot From CD-ROM > Attempting Boot From Hard Drive (C:) > 464: high_heap_size=0x300000; dsk=0x0; &bootinfo=0x8714 <--- the malloc() is next. > 474: high_heap_size=0x300000; dsk=0xdf325000; &bootinfo=0x8714 > probe_drive(): drive 0x80: type 0: unit 0: slice 1: part 0: > probe_drive(): drive 0x81: type 0: unit 1: slice 0: part 0: > > BTX loader 1.00 BTX version is 1.02 > Consoles: internal video/keyboard > BIOS drive A: is disk0 > BIOS drive C: is disk1 > BIOS drive D: is disk2 > > > and now without printf() at line 464 > > > Attempting Boot From CD-ROM > Attempting Boot From Hard Drive (C:) > 474: high_heap_size=0x300000; dsk=0xdf325000; &bootinfo=0x86b4 > probe_drive(): drive 0x0: type 0: unit 0: slice 0: part 0: > gptzfsboot: error 1 lba 32 > gptzfsboot: error 1 lba 1 > probe_drive(): drive 0x81: type 0: unit 1: slice 0: part 0: > gptzfsboot: No ZFS pools located, can't boot > > > Regards, > > Christoph > > -- > Christoph Hoffmann > > On Aug 16, 2011, at 3:48 PM, John Baldwin wrote: > >> On Tuesday, August 16, 2011 9:14:08 am Christoph Hoffmann wrote: >>> Hello John, >>> >>> Thank you very much indeed for your reply. >>> >>> The pmbr.s passes the ARGS set to 0x900 to main() in zfsboot.c and >>> *(uint8_t *)PTOV(ARGS)) is 0x80. >>> >>> In zfsboot.c main(), before the line >>> bootinfo.bi_version = BOOTINFO_VERSION; >>> gets executed we still keep the right value of the dsk->drive and just after >>> the execution, the dsk->drive is equal to zero. >>> >>> Adding >>> printf("hello\n"); >>> before >>> dsk = malloc(sizeof(struct dsk)); >>> keeps the dsk->drive value assigned to 0x80 and the box will boot. >>> >>> Any comments will be appreciated. >> >> That is odd indeed. Can you print out a few things: >> >> 1) if high_heap_size is > 0 >> >> 2) the value of 'dsk' and '&bootinfo' (try this both with a printf >> before the first call to malloc() and without). >> >> -- >> John Baldwin >> _______________________________________________ >> 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"