From owner-freebsd-bugs Sat Aug 4 5:20:12 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0A8D337B406 for ; Sat, 4 Aug 2001 05:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f74CK2r17436; Sat, 4 Aug 2001 05:20:02 -0700 (PDT) (envelope-from gnats) Received: from geneva.vmware.com (geneva.vmware.com [63.93.12.3]) by hub.freebsd.org (Postfix) with ESMTP id 5B04D37B405 for ; Sat, 4 Aug 2001 05:18:50 -0700 (PDT) (envelope-from rmanches@vmware.com) Received: from slipper.vmware.com (lester.vmware.com [172.16.15.251]) by geneva.vmware.com (8.9.3/8.9.3) with ESMTP id FAA26062 for ; Sat, 4 Aug 2001 05:18:50 -0700 Received: (from rmanches@localhost) by slipper.vmware.com (8.11.3/8.11.3) id f74CIvY00585; Sat, 4 Aug 2001 05:18:57 -0700 (PDT) (envelope-from rmanches) Message-Id: <200108041218.f74CIvY00585@slipper.vmware.com> Date: Sat, 4 Aug 2001 05:18:57 -0700 (PDT) From: Rob Manchester Reply-To: rmanches@vmware.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/29454: buslogic driver checks wrong bit for extended translation Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29454 >Category: kern >Synopsis: buslogic driver checks wrong bit for extended translation >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 04 05:20:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Rob Manchester >Release: FreeBSD 4.3-RELEASE i386 >Organization: VMware, inc >Environment: vmware virtual machine System: FreeBSD slipper.vmware.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 >Description: The buslogic driver checks the wrong bit in the "undocumented" geometry register. When a disk larger than 2G is used, the geometry returned by the bios is inconsistent with the geometry used to install the boot loader, so you can't boot. To: rmanches@vmware.com (Robert Manchester) Subject: Re: buslogic undocumented geometry register Date: Wed, 01 Aug 2001 14:54:38 -0600 From: "Justin T. Gibbs" >How-To-Repeat: Try an install on with on buslogic cards this driver supports with a disk greater than 2G and watch freebsd not boot. >Fix: this is an exciting one. diff -Naur dev/buslogic-4.3-RELEASE/btreg.h dev/buslogic/btreg.h --- dev/buslogic-4.3-RELEASE/btreg.h Sat Aug 4 04:56:29 2001 +++ dev/buslogic/btreg.h Sat Aug 4 04:58:21 2001 @@ -112,7 +112,7 @@ #define GEOMETRY_REG 0x03 #define DISK0_GEOMETRY 0x03 #define DISK1_GEOMETRY 0x0c -#define EXTENDED_TRANSLATION 0x10 +#define EXTENDED_TRANSLATION 0x80 #define GEOMETRY_DISK0(g_reg) (greg & DISK0_GEOMETRY) #define GEOMETRY_DISK1(g_reg) ((greg & DISK1_GEOMETRY) >> 2) >Release-Note: >Audit-Trail: >Unformatted: >Dear Justin, > >I've been looking at some of the code you wrote for the buslogic scsi >host adapters (btreg.h & bt.c in freebsd) , specificaly the Extended >translation field in the geometry register. It seems that the code >expects bit 4 to be set in the geometry register before you go and >calculate the disk geometry. I had thought that bit 7 was used to check >to see if the extended translation was availible. I was wondering if >you remembered why you checked bit 4 instead of 7. If you have >documentation on an the "undocumented" geometry register I would be >grateful. Looks like a bug to me. I used the Linux driver as a guide for "undocumented" behavior. Leonard Z. had an in with the developers at Buslogic, so the information in his driver should be accurate. The Linux driver uses bit 7. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message