Index
Prev
Index
32-bit address space
See address space, 32-bit
Conventions Used in This Guide
64-bit mode
Allowing for 64-Bit Mode
address exception
Address Exceptions
address space
32-bit
The 32-Bit Address Space
embedding in 64-bit
Compatibility of 32-Bit and 64-Bit Spaces
kseg0
Cached Physical Memory—kseg0
Cached Physical Memory—kseg0
kseg1
Uncached Physical Memory—kseg1
kseg2
Kernel Virtual Space—kseg2
kuseg
User Process Space—kuseg
segments of
Segments of the 32-bit Address Space
virtual mapping
Virtual Address Mapping
64-bit
The 64-Bit Address Space
cache-controlled
Cache-Controlled Physical Memory—xkphys
segments of
Segments of the 64-Bit Address Space
sign extension
Compatibility of 32-Bit and 64-Bit Spaces
virtual mapping
Virtual Address Mapping
xkseg
Kernel Virtual Space—xkseg
xksseg
Supervisor Mode Space—xksseg
xkuseg
User Process Space—xkuseg
bus virtual
PIO Addresses and DMA Addresses
data transfer between
Transferring Data
device address
Physical Device Addresses
kernel
Kernel Virtual Space—xkseg
Kernel Virtual Space—kseg2
map to user
Memory Use in User-Level Drivers
locking in memory
Locking the Program Address Space
memory address
Physical Memory Addresses
physical
Physical Address Space
Converting Virtual Addresses to Physical
supervisor
Supervisor Mode Space—xksseg
user process
User Process Space—kuseg
User Process Space—xkuseg
64-bit address space:See address space, 64-bit
Conventions Used in This Guide
addressing
Physical and Virtual Memory
alternate console
Specifying a Separate System Console
ASSERT macro
Using ASSERT
audio not covered
User-Level Access to SCSI Devices
Audio/Serial Option (ASO)
Memory-Mapped Access to Serial Ports
authorized binary interface (ABI)
Handling 32-Bit and 64-Bit Execution Models
bdevswtable
Kernel Switch Tables
block device
Kinds of Kernel-Level Drivers
combined with character
Use of the Open Type
Combined Block and Character Drivers
driver must be MP-aware
Flag D_MP
used when mounting filesystem
Verifying Driver Operation
versus character
Block Versus Character
buffer (buf_t)
See data types, buf_t
Conventions Used in This Guide
bus adapter
translates addresses
PIO Addresses and DMA Addresses
bus virtual address
PIO Addresses and DMA Addresses
cache
Cache Use and Cache Coherency
64-bit access
Cache-Controlled Physical Memory—xkphys
alignment of buffers
DMA Buffer Alignment
coherency
Cache Coherency in Multiprocessors
control functions
Managing Memory for Cache Coherency
device access always uncached
CPU Access to Device Registers
primary
CPU Access to Memory
secondary
CPU Access to Memory
cache algorithm
Cache-Controlled Physical Memory—xkphys
cdevsw table
Kernel Switch Tables
Challenge/Onyx
no uncached memory
Uncached Memory Access in the Challenge and Onyx Series
character device
Kinds of Kernel-Level Drivers
combined with block
Combined Block and Character Drivers
Use of the Open Type
used with mkfs
Verifying Driver Operation
versus block
Block Versus Character
COFF file format not supported
Compiling and Linking
command
See IRIX commands
Conventions Used in This Guide
compiler options
32-bit
Compile Options, 32-Bit Kernel
64-bit
Compile Options, 64-Bit Kernel
for loadable driver
Compile Options for Loadable Drivers
for network driver
Compilation Flags for MP TCP/IP
compiler variables
Compiler Variables
configuration files
Configuration Files
/dev/MAKEDEV
Configuring for a Dynamic Major Number
Dynamic Definition of Device Special Files
/etc/inittab
Specifying a Separate System Console
/etc/rc2.d
The Script MAKEDEV
/etc/rc2/S23autoconfig
Registration
/usr/cpu/sysgen/IPnnboot
Placing the Object File in /var/sysgen/boot
/usr/lib/X11/input/config
X Display Manager Configuration
/var/sysgen/boot
Master Configuration Database
How Names Are Used in Configuration
Configuring a Nonloadable Driver
/var/sysgen/Makefile.kernio
Using /var/sysgen/Makefile.kernio
/var/sysgen/master.d
Describing the Driver in /var/sysgen/master.d
Configuring a Nonloadable Driver
How Names Are Used in Configuration
Master Configuration Database
Selecting a Major Number
dependencies
Listing Dependencies
example
Example Driver Source Files
format
Descriptive Line
Descriptive Line
stubs
Stubs Section
variables
Variables Section
/var/sysgen/master.d/mem
Access Using mmap()
/var/sysgen/mtune/*
System Tuning Parameters
/var/sysgen/system
System Configuration Files
How Names Are Used in Configuration
Configuring a Nonloadable Driver
example
Example Driver Source Files
/var/sysgen/system/irix.sm
Learning EISA Device Addresses
Learning VME Device Addresses
for debugging
Enabling Debugging in irix.sm
for SCSI
Host Adapter Concepts
configuration flags
Descriptive Line
configuring a driver
loadable
Configuring a Loadable Driver
nonloadable
Configuring a Nonloadable Driver
CPU
CPU Modules
device access
CPU Access to Device Registers
IP26
Uncached Memory Access in the IP26 CPU
memory access by
CPU Access to Memory
model number from inventory
Testing the Inventory In Software
processors in
CPU Modules
type numbers
CPU Modules
watchpoint registers
Commands to Control Execution Flow
D_MP flag
Running on CPU 0
Flag D_MP
D_MT flag
Flag D_MT
D_OLD flag
Flag D_OLD
Entry Point open()
D_WBACK flag
Flag D_WBACK
Data Link Provider Interface (DLPI)
Application Interfaces
data transfer
Transferring Data
data types:summary table
Kernel Data Structures and Declarations
buf_t
Entry Point strategy()
Structure buf_t
BP_ISMAPPED
Buffer Location and b_flags
displaying
Commands to Display buf_t Objects
for syncronization
Coordinating Through the buf_t
functions
Managing Buffer Virtual Addresses
interrupt handling
Completing Block I/O
management
Strategies of the strategy() Entry Point
cred_t
User Process Administration
Use of the cred_t Object
dev_t
Minor Device Number
The Device Number Types
Use of the Device Number
dsconf
Testing the Driver Configuration
dsreq
Values for ds_flags
Return Codes and Status Values
The dsreq Structure
Return Codes and Status Values
Return Codes and Status Values
edt_t
Entry Point edtinit()
iovec_t
Data Location and the iovec_t
lock_t
Lock and Semaphore Types
Basic Locks
major_t
The Device Number Types
Major Device Number
minor_t
The Device Number Types
Minor Device Number
mrlock_t
Reader/Writer Locks
Lock and Semaphore Types
mutex_t
Lock and Semaphore Types
Using Mutex Locks
pollhead
Use and Operation of poll(2)
proc_t (not available)
Sending a Process Signal
scsi_re
Using scsi_command()
scsi_tar
Using scsi_info()
sema_t
Lock and Semaphore Types
sleep_t
Using Sleep Locks
sv_t
Lock and Semaphore Types
Using Synchronization Variables
uio_t
Entry Points read() and write()
Transferring Data Through a uio_t Object
Structure uio_t
userabi
Handling 32-Bit and 64-Bit Execution Models
vhandl_t
Entry Point map()
Managing Mapped Memory
debugging kernel
Preparing the System for Debugging
device access
CPU Access to Device Registers
device address
Physical Device Addresses
device number
See major device number, minor device number
Conventions Used in This Guide
device special file
Device Special Files
as normal file
Device Representation
defining
Static Definition of Device Special Files
/dev/dsk
IRIX Conventional Device Names
/dev/ei
Opening the Device Special File
External Interrupts in Challenge and Onyx Systems
/dev/kmem
Access Using a Device Model
/dev/mem
Access Using a Device Model
Access Using mmap()
/dev/mmem
Access Using mmap()
/dev/scsi/*
Generic SCSI Device Special Files
/dev/tty*
Memory-Mapped Access to Serial Ports
/dev/vme/*
Opening the Device Special File
EISA mapping
Opening a Device Special File
for user-level interrupt
Opening the Device Special File
inode contents
Device Representation
multiple names for
Multiple Names for One Device
name format
IRIX Conventional Device Names
Form of Filenames in /dev/scsi
PCI mapping
Opening a Device Special File
VME mapping
Opening a Device Special File
device special file/dev/kmem
Access Using mmap()
digital media not covered
User-Level Access to SCSI Devices
Direct Memory Access (DMA)
Direct Memory Access
Overview of Block I/O
buffer alignment for
DMA Buffer Alignment
cache control
Managing Memory for Cache Coherency
maximum size
Maximum DMA Transfer Size
setting up
Setting Up a DMA Transfer
user-level
VME User-Level DMA
user-level SCSI
Data Transfer Options
disk volume header
Placing symmon in the Volume Header
Verifying Driver Operation
driver
compiling
Compilation Flags for MP TCP/IP
Compiler Variables
configuring
Configuring a Nonloadable Driver
debugging
Preparing the System for Debugging
examples
network
Example ifnet Driver
RAM drive
Driver Example
SCSI bus
Example SCSI Device Driver
flag constant
Driver Flag Constant
Public Global Variables
Driver Flag Constant
initialization
Initialization Entry Points
lower half
Upper and Lower Halves
Driver Lower Half
prefix
Driver Name Prefix
How Names Are Used in Configuration
in master.d
Master Configuration Database
process context
User Process Administration
registration
Registration
types of
About This Guide
User-Level Device Control
block
Kinds of Kernel-Level Drivers
character
Kinds of Kernel-Level Drivers
kernel-level
About This Guide
Memory Use in Kernel-Level Drivers
Kernel-Level Device Control
layered
Layered Drivers
loadable
Loadable Drivers
network
Network Device Drivers
process-level
About This Guide
pseudo-device
Overview of Memory Mapping
SCSI bus
Designing a SCSI Driver
STREAMS
Kinds of Kernel-Level Drivers
About This Guide
upper half
Upper and Lower Halves
in multiprocessor
Uniprocessor Assumptions
Synchronizing Within Upper-Half Functions
user-level
Memory Use in User-Level Drivers
User-Level Device Control
ZZZ
Conventions Used in This Guide
Conventions Used in This Guide
driver debugging
alternate console
Specifying a Separate System Console
breakpoints
Commands to Control Execution Flow
circular buffer output
Displaying to the Circular Message Buffer
lock metering
Including Lock Metering in the Kernel Image
memory display
Commands to Display Memory
multiprocessor
Using symmon in a Multiprocessor Workstation
setsym use
Generating a Debugging Kernel
stopping during bootstrap
Entering symmon at Boot Time
symbol lookup
Commands for Symbol Conversion and Lookup
symbols
Enabling Debugging in irix.sm
symmon use
Using symmon
system log output
Displaying to the System Log
driver operations
Typical Driver Operations
DMA
Overview of Block I/O
ioctl
Overview of Device Control
mmap
Overview of Memory Mapping
open
Overview of Device Open
read
Overview of Character Device I/O
write
Overview of Character Device I/O
dslib library
Using dslib Functions
AAA
dslib Functions
data transfer options
Data Transfer Options
doscsireq()
Issuing a Request With doscsireq()
ds_ctostr()
Using ds_vtostr() and ds_ctostr()
ds_vtostr()
Using ds_vtostr() and ds_ctostr()
dsclose()
Using dsopen() and dsclose()
dsopen()
Using dsopen() and dsclose()
filldsreq()
Using filldsreq()
fillg0cmd()
Using fillg0cmd() and fillg1cmd()
fillg1cmd()
Using fillg0cmd() and fillg1cmd()
inquiry12()
inquiry12()—Issue an Inquiry Command
modeselect15()
modeselect15()—Issue a Group 0 Mode Select Command
modesense1a()
modesense1a()—Send a Group 0 Mode Sense Command
read08()
read08() and readextended28()—Issue a Read Command
readcapacity25()
readcapacity25()—Issue a Read Capacity Command
readextended28()
read08() and readextended28()—Issue a Read Command
releaseunit17()
reserveunit16() and releaseunit17()—Control Logical Units
requestsense03()
requestsense03()—Issue a Request Sense Command
reserveunit16()
reserveunit16() and releaseunit17()—Control Logical Units
senddiagnostic1d()
senddiagnostic1d()—Issue a Send Diagnostic Command
testunitready00()
testunitready00—Issue a Test Unit Ready Command
write0a()
write0a() and writeextended2a()—Issue a Write Command
writeextended2a()
write0a() and writeextended2a()—Issue a Write Command
dsreq driver
Overview of the dsreq Driver
data transfer options
Data Transfer Options
DS_ABORT
Using DS_ABORT
DS_CONF
Testing the Driver Configuration
DS_RESET
Using DS_RESET
exclusive open
Relationship to Other Device Special Files
flags
Values for ds_flags
return codes
Return Codes and Status Values
scatter/gather
Data Transfer Options
struct dsconf
Testing the Driver Configuration
struct dsreq
The dsreq Structure
ds_flags
Values for ds_flags
ds_msg
Return Codes and Status Values
ds_ret
Return Codes and Status Values
ds_status
Return Codes and Status Values
EISA bus
mapping into user process
EISA Mapping Support
PIO bandwidth
EISA PIO Bandwidth
user-level PIO
EISA Programmed I/O
ELF object format
Compiling and Linking
entry points:summary table
Entry Point Summary
Driver Exported Names
close
Persistent Mappings
Entry Point close()
Entry Point close()
devflag
Public Global Variables
Driver Flag Constant
edtinit
Loading
Entry Point edtinit()
halt
Entry Point halt()
info
Streamtab Structure
init
Loading
Entry Point init()
Initialization Entry Points
interrupt
Interrupt Entry Point
ioctl
Handling 32-Bit and 64-Bit Execution Models
Control Entry Point
map
Entry Point map()
mmap
Entry Point mmap()
mversion
Configuring a Loadable Driver
Public Global Variables
open
Entry Point open()
Entry Point open()
mode flag
Use of the Open Flag
type flag
Use of the Open Type
poll
Poll Entry Point
and interrupts
Calling pollwakeup()
print
Entry Point print()
read
Entry Points read() and write()
size
Saving the Size of a Block Device
Entry Point size()
start
Entry Point start()
Initialization Entry Points
Loading
strategy
Entry Point strategy()
and interrupts
Completing Block I/O
called from read or write
Calling Entry Point strategy() From Entry Point read() or write()
design models
Waiting for Block I/O to Complete
unload
Entry Point unload()
Persistent Mappings
Unloading
unmap
Entry Point unmap()
usage
Entry Point Summary
write
Entry Points read() and write()
example driver
Example ifnet Driver
Driver Example
Example SCSI Device Driver
execution model
Handling 32-Bit and 64-Bit Execution Models
external interrupt
Managing External Interrupts
External Interrupts in Challenge and Onyx Systems
generate
Generating Outgoing Signals
input is level-triggered
Receiving Incoming External Interrupts
pulse widths
Detecting Invalid External Interrupts
set pulse widths
Setting the Expected Pulse Width
user-level handler
Registering an External Interrupt Handler
fmodsw table
Kernel Switch Tables
function
See IRIX functions, kernel functions
Conventions Used in This Guide
hardware inventory
Hardware Inventory
adding entries to
Creating an Inventory Entry
contents
Contents of the Inventory
hinv displays
Displaying the Inventory with hinv
network driver use
Network Inventory Entries
software interface to
Testing the Inventory In Software
header files:summary table
Important Header Files
dslib.h
dslib Functions
for network drivers
Principal ifnet Header Files
sgidefs.h
Allowing for 64-Bit Mode
sys/cmnerr.h
Using cmn_err
sys/debug.h
Using ASSERT
sys/file.h
Use of the Open Flag
sys/immu.h
Working With Page and Sector Units
sys/major.h
Major Device Number
sys/open.h
Use of the Open Type
sys/param.h
Structure buf_t
sys/poll.h
Use and Operation of poll(2)
sys/region.h
Entry Point map()
sys/scsi.h
Host Adapter Concepts
sys/sema.h
Lock and Semaphore Types
sys/sysmacros.h
Working With Page and Sector Units
Major Device Number
Minor Device Number
sys/types.h
Allowing for 64-Bit Mode
The Device Number Types
Minor Device Number
Major Device Number
sys/uio.h
Structure uio_t
sys/var.h
System Tuning Parameters
idbg debugger
Enabling Debugging in irix.sm
Using idbg
command line use
Invoking idbg for a Single Command
command syntax
Commands of idbg
configuring in kernel
Including idbg in the Kernel Image
display I/O status
Commands to Display I/O Status
display process data
Commands to Display Process Information
interactive mode
Invoking idbg for Interactive Use
invoking
Loading and Invoking idbg
loading
Loading and Invoking idbg
lock meter display
Commands to Display Locks and Semaphores
log file output
Invoking idbg with a Log File
memory display
Commands to Display Memory and Symbols
ide PROM monitor
Placing symmon in the Volume Header
include file
See header files
Conventions Used in This Guide
INCLUDE statement
Configuring a Kernel
Loading
Entry Point init()
initialization
Initialization Entry Points
inode
Device Representation
Overview of Device Open
interrupt
Driver Lower Half
and strategy entry point
Completing Block I/O
associating to a driver
Associating Interrupt to Driver
concurrent with processing
Uniprocessor Assumptions
enabled during initialization
When Initialization Is Performed
latency
Performance and Latency
on multiprocessor
Mutual Exclusion
ZZZ
User-Level Interrupts
inventory
See hardware inventory
Conventions Used in This Guide
IP26 CPU
Uncached Memory Access in the IP26 CPU
IRIX commands
autoconfig
Configuring a Nonloadable Driver
Generating a Debugging Kernel
Configuring a Kernel
dvhtool
Placing symmon in the Volume Header
hinv
Displaying the Inventory with hinv
and MAKEDEV
Dynamic Definition of Device Special Files
The Script MAKEDEV
for CPU type
Interrogating the CPU Type
install
Static Definition of Device Special Files
Making Device Files
Configuring for a Dynamic Major Number
lboot
System Configuration Files
builds switch tables
Kernel Switch Tables
driver prefix with
Entry Point Naming and lboot
loads SCSI driver
Host Adapter Concepts
mkfs
Verifying Driver Operation
mknod
Configuring for a Dynamic Major Number
Making Device Files
Static Definition of Device Special Files
ml
Configuring for a Dynamic Major Number
Loadable Drivers
mount
Entry Point open()
Overview of Device Open
Verifying Driver Operation
nvram
Specifying a Separate System Console
prtvtoc
Verifying Driver Operation
setsym
Generating a Debugging Kernel
systune
System Tuning Parameters
Displaying to the Circular Message Buffer
Unloading
max DMA size
Maximum DMA Transfer Size
switch table size
Kernel Switch Tables
umount
Entry Point close()
uname
Interrogating the CPU Type
versions
Placing symmon in the Volume Header
IRIX functions
close()
Entry Point close()
endinvent()
Testing the Inventory In Software
getinvent()
Testing the Inventory In Software
getpagesize()
Virtual Address Mapping
ioctl()
User-Level Control of SCSI Devices
Overview of Device Control
Managing External Interrupts
Registering an External Interrupt Handler
kmem_alloc()
Driver Upper Half
mmap()
Access Using mmap()
Concepts and Use of mmap()
Overview of Memory Mapping
EISA PIO
Using the mmap() Function
PCI PIO
Using the mmap() Function
VME PIO
Using the mmap() Function
mpin()
Locking the Program Address Space
munmap()
Entry Point unmap()
open()
Entry Point open()
Overview of Device Open
with dsreq driver
Relationship to Other Device Special Files
plock()
Locking the Program Address Space
poll()
Use and Operation of poll(2)
read()
Overview of Character Device I/O
Overview of Block I/O
setinvent()
Testing the Inventory In Software
syslog()
Displaying to the System Log
test_and_set()
Achieving Mutual Exclusion
ULI_block_intr()
Achieving Mutual Exclusion
ULI_register_ei()
Registering an External Interrupt Handler
ULI_register_vme()
Registering a VME Interrupt Handler
ULI_sleep()
Interacting With the Handler
Using Multiple Devices
ULI_wakeup()
Interacting With the Handler
write()
Overview of Block I/O
Overview of Character Device I/O
jag (SCSI-to-VME adapter)
Target Numbers
jag (SCSI-toVME) adapter
Names of SCSI Devices on the Jag (VME Bus) Controller
kernel address space
driver runs in
Memory Use in Kernel-Level Drivers
mapping to user space
Memory Use in User-Level Drivers
kernel execution model
Handling 32-Bit and 64-Bit Execution Models
kernel functions:summary table
Kernel Functions
add_to_inventory()
Creating an Inventory Entry
badaddr()
Testing Device Physical Addresses
bcopy()
Block Copy Functions
biodone()
Strategies of the strategy() Entry Point
Completing Block I/O
bioerror()
Completing Block I/O
biowait()
Strategies of the strategy() Entry Point
bp_mapin()
Managing Buffer Virtual Addresses
brelse()
Allocating buf_t Objects and Buffers
bzero()
Block Copy Functions
cmn_err()
Producing Diagnostic Displays
buffer output
Displaying to the Circular Message Buffer
system log output
Displaying to the System Log
copyin()
Block Copy Functions
Control Entry Point
copyout()
Block Copy Functions
Control Entry Point
cvsema()
Example Conversion Problem
dki_dcache_inval()
Managing Memory for Cache Coherency
dki_dcache_wb()
Managing Memory for Cache Coherency
Uncached Memory Access in the IP26 CPU
drv_getparm()
User Process Administration
drv_priv()
User Process Administration
Use of the cred_t Object
drvhztousec()
Time Units
drvusectohz()
Time Units
flushbus()
Managing Memory for Cache Coherency
fubyte()
Byte and Word Functions
geteblk()
Allocating buf_t Objects and Buffers
getemajor()
Major Device Number
Device Number Functions
geteminor()
Device Number Functions
Learning the Adapter Number
getinvent()
Interrogating the CPU Type
getrbuf()
Allocating buf_t Objects and Buffers
initnsema()
Example Conversion Problem
initnsema_mutex() (not supported)
Semaphores
ip26_enable_ucmem()
Uncached Memory Access in the IP26 CPU
ip26_return_ucmem()
Uncached Memory Access in the IP26 CPU
itimeout()
Use of pollwakeup() Without Interrupts
Timer Support
kern_malloc() (obsolete)
General-Purpose Allocation
kmem_alloc()
Kernel Virtual Space—kseg2
General-Purpose Allocation
kmem_zalloc()
General-Purpose Allocation
makedevice()
Device Number Functions
phalloc()
Use and Operation of poll(2)
Allocating pollhead Objects
phfree()
Allocating pollhead Objects
Entry Point unload()
physiock()
Flag D_WBACK
Calling Entry Point strategy() From Entry Point read() or write()
pollwakeup()
Calling pollwakeup()
Use of pollwakeup()
printf()
Using printf()
psema()
Using a Semaphore for Mutual Exclusion
Example Conversion Problem
ptob()
Virtual Address Mapping
rmalloc()
Suballocation Functions
rmallocmap()
Suballocation Functions
rmfree()
Suballocation Functions
sleep()
Using sleep() and wakeup()
splhi()
denigrated
Priority Level Functions
meaningless
Uniprocessor Assumptions
splnet()
ineffective
Ineffective spl() Functions
splvme()
useless
Example Conversion Problem
subyte()
Byte and Word Functions
timeout()
Timer Support
uiomove()
Transferring Data Through a uio_t Object
uiophysio()
Calling Entry Point strategy() From Entry Point read() or write()
untimeout()
Timer Support
userabi()
Handling 32-Bit and 64-Bit Execution Models
v_getaddr()
Managing Mapped Memory
v_gethandle()
Managing Mapped Memory
v_mapphys()
Managing Mapped Memory
Entry Point map()
vsema()
Example Conversion Problem
Using a Semaphore for Mutual Exclusion
vt_gethandle()
Entry Point unmap()
Entry Point map()
wakeup()
Using sleep() and wakeup()
kernel mode of processor
Processor Operating Modes
kernel panic
address exception
Address Exceptions
moving data
Transferring Data
kernel switch tables
Kernel Switch Tables
kernel-level driver
About This Guide
Kernel-Level Device Control
Structure of a Kernel-Level Driver
structure of
Summary of Driver Structure
layered driver
Layered Drivers
lboot
See IRIX commands
Conventions Used in This Guide
libc reentrant version
Declaring Global Variables
loadable driver
Loadable Drivers
and switch table
Kernel Switch Tables
autoregister
Initialization of Loadable Drivers
compiler options
Compile Options for Loadable Drivers
configuring
Configuring a Loadable Driver
initialization
Initialization of Loadable Drivers
loading
Loading
master.d
Master File for Loadable Drivers
mversion entry
Public Global Variables
not in miniroot
Loadable Drivers
registration
Registration
unloading
Unloading
loading a driver
Loading
lock metering support
Including Lock Metering in the Kernel Image
Commands to Display Locks and Semaphores
locking
See mutual exclusion
Conventions Used in This Guide
locking memory
Locking the Program Address Space
lower half of driver
Driver Lower Half
major device number
Major Device Number
The Device Number Types
available numbers
Major Device Number
block vs. character
Major Device Number
dynamic allocation
Configuring for a Dynamic Major Number
external versus internal
External and Internal Numbers
for STREAMS clone
Recognizing a Clone Request Independently
Using the CLONE Driver
in /dev/scsi
Major and Minor Device Numbers in /dev/scsi
in inode
Device Representation
in master.d
Master Configuration Database
Descriptive Line
in variables in master.d
Variables Section
indexes switch table
Kernel Switch Tables
input to open
Overview of Device Open
range of
Major Device Number
selecting
Selecting a Major Number
/dev/MAKEDEV
Configuring for a Dynamic Major Number
The Device Number Types
Creating Additional Names in /dev/scsi
Dynamic Definition of Device Special Files
Generic SCSI Device Special Files
Defining Device Names
master.d configuration files
See configuration files,/var/sysgen/master.d
Conventions Used in This Guide
memory
Physical and Virtual Memory
memory address
cached
Cached Physical Memory—kseg0
physical
Physical Memory Addresses
Commands to Control Execution Flow
uncached
Uncached Physical Memory—kseg1
memory allocation
Memory Allocation
memory display
Commands to Display Memory
memory mapping
Memory Map Entry Points
Memory Use in User-Level Drivers
miniroot
no loadable drivers
Loadable Drivers
minor device number
Minor Device Number
The Device Number Types
encoding
Minor Device Number
external versus internal
External and Internal Numbers
for STREAMS clone driver
Using the CLONE Driver
Recognizing a Clone Request Independently
in /dev/scsi
Major and Minor Device Numbers in /dev/scsi
in inode
Device Representation
input to open
Use of the Device Number
Overview of Device Open
selecting
Selecting Minor Numbers
multiprocessor
block driver must support
Flag D_MP
converting to
Converting a Uniprocessor Driver
driver design for
Special Considerations for Multiprocessing
Planning for Multiprocessor Use
driver flag D_MP
Running on CPU 0
Flag D_MP
drivers for
Drivers for Multiprocessors
interrupt handling on
Mutual Exclusion
network drivers in
Multiprocessor Considerations
nonMP driver on CPU 0
Running on CPU 0
Flag D_MP
splhi useless in
Uniprocessor Assumptions
synchronizing upper-half code
Synchronizing Within Upper-Half Functions
uniprocessor assumptions invalid
Uniprocessor Assumptions
uniprocessor drivers use CPU 0
Drivers for Multiprocessors
using symmon in
Using symmon in a Multiprocessor Workstation
mutex locks
Using Mutex Locks
mutual exclusion
Mutual Exclusion Compared to Waiting
Basic Locks
basic locks
Basic Locks
in multiprocessor drivers
Protecting Common Data
in network driver
Mutual Exclusion Macros
mutex locks
Using Mutex Locks
priority inheritance
Using Mutex Locks
reader/writer locks
Reader/Writer Locks
semaphore
Using a Semaphore for Mutual Exclusion
sleep locks
Using Sleep Locks
names of devices
Form of Filenames in /dev/scsi
IRIX Conventional Device Names
Device Representation
network
Network Device Drivers
based on 4.3BSD
Network Driver Interfaces
driver interfaces
Network Driver Interfaces
example driver
Example ifnet Driver
header files
Principal ifnet Header Files
multiprocessor considerations
Multiprocessor Considerations
overview
Overview of Network Drivers
STREAMS protocol stack
Application Interfaces
network driver
debugging
Commands to Display Network-Related Structures
must be MP-aware
Flag D_MP
Network File System (NFS)
Application Interfaces
page size
I/O
Working With Page and Sector Units
macros
Working With Page and Sector Units
memory
Virtual Address Mapping
Working With Page and Sector Units
pipe semantics
Support for Pipes
prefix
Master Configuration Database
Driver Name Prefix
How Names Are Used in Configuration
primary cache
CPU Access to Memory
priority inheritance
Using Mutex Locks
priority level functions
Priority Level Functions
privilege checking
User Process Administration
process
User Process Administration
display data about
Commands to Display Process Information
handle of
Sending a Process Signal
sending signal to
Sending a Process Signal
table of in kernel
Commands to Display Process Information
process-level driver
About This Guide
processor
kernel mode
Processor Operating Modes
types
CPU Modules
user mode
Processor Operating Modes
Programmed I/O (PIO)
CPU Access to Device Registers
User-Level Access to Devices
EISA bus
EISA Programmed I/O
VME bus
VME Programmed I/O
pseudo-device driver
Overview of Memory Mapping
putbuf circular buffer
Commands to Display Memory and Symbols
Displaying to the Circular Message Buffer
RAM drive
Driver Example
raw device
See character device
Conventions Used in This Guide
reader/writer locks
Reader/Writer Locks
reentrant C library
Declaring Global Variables
registration of loadable driver
Registration
sash standalone shell
Placing symmon in the Volume Header
SCSI bus
SCSI Device Drivers
adapter error codes
Adapter Error Codes (Table scsi_adaperrs_tab)
adapter number
Names of SCSI Devices on a SCSI Bus
Learning the Adapter Number
adapter type number
Learning the Adapter Type Number
adapter type number
Acquiring a Type Number
command
Inquiry
inquiry12()—Issue an Inquiry Command
Using scsi_info()
Mode Select
modeselect15()—Issue a Group 0 Mode Select Command
Mode Sense
modesense1a()—Send a Group 0 Mode Sense Command
Read
read08() and readextended28()—Issue a Read Command
Read Capacity
readcapacity25()—Issue a Read Capacity Command
Request Sense
requestsense03()—Issue a Request Sense Command
Reserve Unit
reserveunit16() and releaseunit17()—Control Logical Units
Send Diagnostic
senddiagnostic1d()—Issue a Send Diagnostic Command
Test Unit Ready
testunitready00—Issue a Test Unit Ready Command
Write
write0a() and writeextended2a()—Issue a Write Command
display request structure
Commands to Display I/O Status
driver
Designing a SCSI Driver
error messages
SCSI Error Messages
example driver
Example SCSI Device Driver
hardware support overview
SCSI Hardware Support
host adapter
Host Adapter Drivers
functions of
Overview of Host Adapter Functions
intialization
Host Adapter Initialization
number of
Host Adapter Concepts
overview
Overview of Host Adapter Driver Architecture
purpose
Purpose of the Host Adapter Driver
scsi_abort()
Using scsi_abort()
scsi_alloc()
Using scsi_alloc()
scsi_command()
Using scsi_command()
scsi_free()
Using scsi_free()
scsi_info()
Using scsi_info()
scsi_reset()
Using scsi_reset()
vectors to
How the Host Adapter Functions Are Found
Storing Entry Point Addresses
kernel overview
IRIX Kernel SCSI Support
LUN
Logical Unit Numbers (LUNs)
Names of SCSI Devices on a SCSI Bus
message string tables
SCSI Error Message Tables
sense codes
SCSI Sense Codes (Table scsi_key_msgtab)
target ID
Names of SCSI Devices on a SCSI Bus
target number
Target Numbers
user-level access
User-Level Access to SCSI Devices
User-Level Control of SCSI Devices
ZZZ
User-Level Access to SCSI Devices
secondary cache
CPU Access to Memory
sector unit macros
Working With Page and Sector Units
semaphore
Semaphores
for mutual exclusion
Using a Semaphore for Mutual Exclusion
for waiting
Using a Semaphore for Waiting
sign extension of 32-bit addresses
Compatibility of 32-Bit and 64-Bit Spaces
signal
Sending a Process Signal
SIGSEGV
Address Exceptions
Silicon Graphics
developer program
Developer Program
FTP server
Internet Resources
WWW server
Internet Resources
64-bit entries seeNumbers
Conventions Used in This Guide
Conventions Used in This Guide
sleep locks
Using Sleep Locks
socket interface
Application Interfaces
STREAMS
STREAMS Drivers
AAA
Summary of Standard STREAMS Functions
clone driver
Support for CLONE Drivers
close entry point
Entry Point close()
debugging
Commands to Display STREAMS Structures
display data structures
Commands to Display STREAMS Structures
driver
About This Guide
extended poll support
Extension of Poll and Select
module_info structure
Streamtab Structure
multiprocessor design
Special Considerations for Multiprocessing
multithreaded monitor
Special Considerations for Multiprocessing
open entry point
Entry Point open()
put functions
Put Functions wput() and rput()
service scheduling
Service Scheduling
srv functions
Service Functions rsrv() and wsrv()
streamtab structure
Streamtab Structure
supplied drivers
Supplied STREAMS Modules
STREAMS protocol stack
Application Interfaces
structure of driver
Summary of Driver Structure
switch table
Kernel Switch Tables
symmon debugger
Placing symmon in the Volume Header
Using symmon
breakpoints
Commands to Control Execution Flow
command syntax
Commands of symmon
how invoked
How symmon Is Entered
in multiprocessor
Using symmon in a Multiprocessor Workstation
in uniprocessor
Using symmon in a Uniprocessor Workstation
invoking at bootstrap
Entering symmon at Boot Time
memory display
Commands to Display Memory
prompt
How symmon Is Entered
symbol lookup
Commands for Symbol Conversion and Lookup
virtual memory commands
Commands to Manage Virtual Memory
watchpoint register use
Commands to Control Execution Flow
synchronization variable
Using Synchronization Variables
sysgen files
See configuration files
Conventions Used in This Guide
system console
alternate
Specifying a Separate System Console
system log display
Displaying to the System Log
systune
See IRIX commands
Conventions Used in This Guide
terminal as console
Specifying a Separate System Console
32-bit entries see Numbers
Conventions Used in This Guide
tick
Time Units
time unit functions
Time Units
TLI interface
Application Interfaces
Translate Lookaside Buffer (TLB)
CPU Access to Memory
Translation Lookaside Buffer (TLB)
Virtual Address Mapping
maps kernel space
Kernel Virtual Space—xkseg
maps kuseg
User Process Space—kuseg
number of entries in
TLB Misses and TLB Sizes
udmalib
VME User-Level DMA
dma_allocbuf()
Buffer Allocation for User DMA
dma_mkparms()
Allocation of Descriptors
dma_start()
Advantages of User DMA
uncached memory access
32-bit
Uncached Physical Memory—kseg1
64-bit
Cache-Controlled Physical Memory—xkphys
do not map
Entry Point map()
IP26
Uncached Memory Access in the IP26 CPU
none in Challenge
Uncached Memory Access in the Challenge and Onyx Series
uniprocessor
converting driver
Converting a Uniprocessor Driver
using symmon
Using symmon in a Uniprocessor Workstation
unloading a driver
Unloading
upper half of driver
Upper and Lower Halves
upper half of of driver
Uniprocessor Assumptions
Synchronizing Within Upper-Half Functions
USE statement
Configuring a Kernel
Entry Point init()
user mode of processor
Processor Operating Modes
user-level DMA
VME User-Level DMA
user-level driver
User-Level Device Control
user-level interrupt (ULI)
User-Level Interrupt Management
User-Level Interrupts
and debugging
Debugging With Interrupts
external interrupt with
Registering an External Interrupt Handler
initializing
Setting Up
interrupt handler function
The User Level Interrupt Handler
registration
Registering the Interrupt Handler
restrictions on handler
Restrictions on the ULI Handler
ULI_block_intr() function
Achieving Mutual Exclusion
ULI_register_ei() function
Registering an External Interrupt Handler
ULI_register_vme() function
Registering a VME Interrupt Handler
ULI_sleep() function
Interacting With the Handler
Using Multiple Devices
ULI_wakeup() function
Interacting With the Handler
VME interrupt with
Registering a VME Interrupt Handler
user-level process
User-Level Device Control
variables in master.d
Variables Section
VECTOR statement
Loading
Configuring a Kernel
edtinit entry point
Entry Point edtinit()
EISA PIO
Learning EISA Device Addresses
for SCSI host adapter
Host Adapter Concepts
use of ctlr=
Use of the Device Number
VME PIO
Learning VME Device Addresses
vfssw table
Kernel Switch Tables
virtual memory
Virtual Address Mapping
CPU Access to Memory
32-bit mapping
Virtual Address Mapping
64-bit mapping
Virtual Address Mapping
debug display of
Commands to Manage Virtual Memory
page size
Virtual Address Mapping
virtual page number (VPN)
32-bit
Virtual Address Mapping
VME bus
adapter number
Names of SCSI Devices on the Jag (VME Bus) Controller
jag adapter
Names of SCSI Devices on the Jag (VME Bus) Controller
mapping into user process
VME Mapping Support
PIO to
bandwidth
VME PIO Bandwidth
user-level DMA
User-Level DMA From the VME Bus
VME User-Level DMA
user-level DMA bandwidth
DMA Engine Bandwidth
user-level interrupt handler for
Registering a VME Interrupt Handler
user-level PIO
VME Programmed I/O
volatile keyword
Declaring Global Variables
volume header
Placing symmon in the Volume Header
Verifying Driver Operation
waiting
Waiting for Time to Pass
Mutual Exclusion Compared to Waiting
for a general event
Waiting for a General Event
for an interrupt
Waiting for Block I/O to Complete
for memory
Waiting for Memory to Become Available
semaphore
Using a Semaphore for Waiting
synchronization variables
Using Synchronization Variables
time units
Time Units
timed events
Time Units