From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 12 12:56:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D61D16A4CE for ; Mon, 12 Jan 2004 12:56:25 -0800 (PST) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF11543D5A for ; Mon, 12 Jan 2004 12:55:41 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 26898 invoked from network); 12 Jan 2004 20:55:41 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 12 Jan 2004 20:55:41 -0000 Received: from 10.50.40.206 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i0CKtOM8065075; Mon, 12 Jan 2004 15:55:37 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Martin Nilsson , Marcin Dalecki Date: Mon, 12 Jan 2004 15:30:20 -0500 User-Agent: KMail/1.5.4 References: <4001552B.5060108@gneto.com> <4001A184.5060301@gmx.net> <4001C283.5080106@gneto.com> In-Reply-To: <4001C283.5080106@gneto.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401121530.20732.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-hackers@freebsd.org Subject: Re: Assembler coding help needed. [solved, patch enclosed] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2004 20:56:25 -0000 On Sunday 11 January 2004 04:39 pm, Martin Nilsson wrote: > Marcin Dalecki wrote: > > Martin Nilsson wrote: > >> I'm trying to find out why I can't boot 5.2 from USB CDROM on > >> Supermicro motherboards. (I have an old Gateway P3 that can!). > >> > >> I've found out that that only 0x20 of 0x4c sectors of the loader are > >> read in and it therfor traps when executed. (read is only called once). > >> > >> load_notrunc: sub %dh,%cl # Update count > >> push %eax # Save > >> call read # Read it in > > > > The fun will be ^^^^ here. The rest is self contained and > > doesn't depend on CPU variant or periphery. > > I found the problem! > The bios trashes %cx when reading from USB CD but not when reading from > ATAPI CD. > > The attached patch fixes this and two other small nits in > sys/boot/i386/cdboot/cdboot.s Thanks for the nit fixes. > Can somebody (jhb) commit this? > > This probably affects all Phoenix-Award bios equipped boxes. My old > Gateway with AMI BIOS works as it should. I will commit something similar. I will save %cx around the BIOS call itself in the read function. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org