From patchwork Fri Jan 6 02:05:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 134582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DD2791007D6 for ; Fri, 6 Jan 2012 13:05:53 +1100 (EST) Received: from localhost ([::1]:44556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RizBm-0000Hw-2A for incoming@patchwork.ozlabs.org; Thu, 05 Jan 2012 21:05:50 -0500 Received: from eggs.gnu.org ([140.186.70.92]:40549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RizBf-0000He-Gu for qemu-devel@nongnu.org; Thu, 05 Jan 2012 21:05:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RizBe-0006do-Dg for qemu-devel@nongnu.org; Thu, 05 Jan 2012 21:05:43 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:61847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RizBe-0006dU-BO for qemu-devel@nongnu.org; Thu, 05 Jan 2012 21:05:42 -0500 Received: by qcsd15 with SMTP id d15so732722qcs.4 for ; Thu, 05 Jan 2012 18:05:41 -0800 (PST) Received: by 10.229.134.201 with SMTP id k9mr1618384qct.10.1325815541479; Thu, 05 Jan 2012 18:05:41 -0800 (PST) Received: from localhost (207-172-165-101.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com. [207.172.165.101]) by mx.google.com with ESMTPS id o8sm104957824qaj.0.2012.01.05.18.05.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Jan 2012 18:05:40 -0800 (PST) Date: Thu, 5 Jan 2012 21:05:39 -0500 From: Kevin O'Connor To: Gleb Natapov Message-ID: <20120106020539.GB25140@morn.localdomain> References: <4F055827.50202@redhat.com> <20120105083239.GR2072@redhat.com> <20120105092037.GA31206@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120105092037.GA31206@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.173 Cc: Gerhard Wiesinger , Gerd Hoffmann , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Boot order problem and disable iPXE/gPXE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Thu, Jan 05, 2012 at 11:20:37AM +0200, Gleb Natapov wrote: > On Thu, Jan 05, 2012 at 10:09:44AM +0100, Gerhard Wiesinger wrote: > > But as far as I remember therefore the option ROM registers through > > BIOS for INT 19h booting. So Seabios should know it that this is a > > harddisk. > It registers BEV. Otherwise you wouldn't be able to boot at all. In fact > it registers multiple BEVs (one for each attached scsi device). But BIOS > knows nothing about the device behind the BEV. It just jumps to BEV > address to boot from it when INT 19h is called. There may be scsi cdrom > there or even tape. Gerhard's option rom is actually registering a BCV, and SeaBIOS can know that is likely a hard drive. So, I think Gerhard has a point. SeaBIOS could probably fall back to the harddrive priority if it finds a BCV without an explicit bootindex priority. Gerhard - does the patch below improve things for you? -Kevin --- a/src/boot.c +++ b/src/boot.c @@ -326,7 +326,7 @@ boot_add_bev(u16 seg, u16 bev, u16 desc, int prio) void boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio) { - bootentry_add(IPL_TYPE_BCV, defPrio(prio, DEFAULT_PRIO) + bootentry_add(IPL_TYPE_BCV, defPrio(prio, DefaultHDPrio) , SEGOFF(seg, ip).segoff , desc ? MAKE_FLATPTR(seg, desc) : "Legacy option rom"); }