Installation guide
A.1.4 Device Addressing Limits
The limits for device addressing are as follows:
• Device access
There are two types of disk device access: raw (character) and buffered
(block).
For raw or character access, the uio.uio_offset structure field
describes the byte offset within the disk partition. In this release, the
uio_offset is an unsigned 64-bit value, allowing an offset up to 2
64
or 18 exabytes. This value is converted to a physical block/sector
number, which is the data transfer start position. The physical
block/sector number is limited by the buf.b_blkno structure field.
For buffered or block access, the buf.b_blkno structure field describes
the block/sector offset within the disk partition and is a signed 32-bit
value. Because this release supports a fixed 512-byte block/sector size, as
defined by DEV_BSIZE, the offset is limited to 1 TB.
• Major-minor numbers (dev_t)
Devices are identified by a major-minor pair of numbers, where the major
number specifies the device driver and the minor number identifies the
device. In this release, this pairing is represented by a 32-bit value
described by the type dev_t. The major number portion of dev_t
consists of bits 20 to 31 (a total of 12 bits). Because each device driver
requires 12 bits for its major number, you can configure only 4096 device
drivers into the system.
The minor number portion of dev_t consists of bits 0 to 19 (a total of
20 bits). The device driver is responsible for interpreting these bits. A
device driver that utilizes all 20 bits for device addressing can address up
to 1048576 devices for each major number. For device drivers that
support disk devices, some of the bits in the minor device number
represents the partition number. This release requires disk drivers to
reserve the lower 6 bits for device attributes and partition numbers, and
only supports eight partitions.
• SCSI/CAM addressing
Common Access Method (CAM) is an ANSI-proposed standard for a
common software interface to the Small Computer Systems Interface
(SCSI). There are no restrictions or limitations within CAM for disk
block addressing, because the address is an incoming value.
For SCSI-2, the Command Descriptor Block (CDB) defines the starting
disk block number for the transfer. In this release, the 10-byte CDB
reserves 4 bytes for the disk block address. This is an unsigned 32-bit
value that allows 2
32
− 1 or 4 gigasectors of addressing. Using a 512-byte
block/sector size, this value corresponds to 2 TB.
System Limits A–3