Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 1998 09:35:35 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Christopher Wood <christopher.wood@bellhow.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Ultra-DMA
Message-ID:  <19980630093535.S1880@freebie.lemis.com>
In-Reply-To: <3597FB95.4B43A247@bellhow.com>; from Christopher Wood on Mon, Jun 29, 1998 at 04:39:49PM -0400
References:  <3597FB95.4B43A247@bellhow.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 29 June 1998 at 16:39:49 -0400, Christopher Wood wrote:
> I'm considering putting together a low-end pentium machine to run fBSD
> on...
> I want to go SCSI, but Ultra-DMA would be much cheaper. Can fBSD utilize
> Ultra-DMA hardware? And if I want to use this machine for CD copying,
> would
> I still need SCSI, or would UDMA be sufficient?
>
> Also, if anyone has equiment lists and/or shopping lists from reputable
> vendors
> they have used to build a fBSD system, could you forward it to me
> please?

You need to look at your mail formatting (compare
http://www.lemis.com/email.html).

Let's try again...

> I'm considering putting together a low-end pentium machine to run
> fBSD on...  I want to go SCSI, but Ultra-DMA would be much
> cheaper. Can fBSD utilize Ultra-DMA hardware? And if I want to use
> this machine for CD copying, would I still need SCSI, or would UDMA
> be sufficient?

UDMA is supported, and it brings a *great* improvement.  A non-DMA IDE
system with a low-end Pentium will max out at about 500 kB/s, at which
point the system will be using 90% interrupt time, making the system
almost useless.  The same machine with UDMA would use about 1% or 2%
interrupt time with full disk throughput (which on modern disks can be
over 6 MB/s).  Unless you have a large number of disks, you won't see
any improvement from UDMA to SCSI, and you may even see a performance
decrease.

To enable UDMA, set the disk driver flags, either in the visual config
at boot time, or (preferably) in your kernel config file.  Here's an
excerpt from "The Complete FreeBSD", second edition
(http://www.cdrom.com/titles/os/bsdbook2.htm), page 264 (with the
latest addendum).  In practice, you can almost always just set the
flags word to 0xe0ffe0ff.

A number of flags and options apply to wdc0:

o The  flags  fields are used to enable the multi-sector I/O and the 32 bit I/O
  modes.  You can use them either  in  the  controller  definition  or  in  the
  individual   disk   definitions.   If  you  want  to  use  them  during  boot
  configuration, specify them in the controller definition.

  16 flag bits are provided for each drive.  The first 16 flag  bits  refer  to
  drive 1, and the second 16 bits refer to drive 0.  In each set of flags,

  o Bit 15 (0x8000) specifies to probe for 32 bit transfers.

  o Bit 14 (0x4000) enables waking powered-down laptop drives.

  o Bit 13 (0x2000) allows probing for PCI IDE DMA controllers, such as Intel's
    PIIX south bridges.

  o Bit  12  (0x1000) enables LBA (logical block addressing mode).  If this bit
    is not set, the driver accesses  the  disk  in  CHS  (cylinder/head/sector)
    mode.

  o In CHS mode, if bits 11 to 8 are not equal to 0, they specify the number of
    heads to assume (between 1 and 15).  The driver recalculates the number  of
    cylinders to make up the total size of the disk.

  o The low 8 bits specify the maximum number of  sectors  per  transfer.   The
    special  case 0xff represents the maximum transfer size which the drive can
    handle.

  See the man page for wd(4) (on your system, but not in this  book)  for  more
  details.

  Thus,  we  can  break  down  the example value 0xff8004 (the full 32 bits are
  0x00ff8004) into 0x00ff for drive 1  (use  the  maximum  transfer  size)  and
  0x8004 for drive 0 (allow probing for 32 bit support, and use a transfer size
  of 4 sectors).

Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980630093535.S1880>