Motorola MCP750 Spécifications

Naviguer en ligne ou télécharger Spécifications pour PC/postes de travail Motorola MCP750. Motorola MCP750 Specifications Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 344
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs

Résumé du contenu

Page 1 - Device Driver Programming

Device Driver Programming0890425-070October 1999

Page 2

Device Driver ProgrammingxData Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5Byt

Page 3

Device Driver Programming7-8VME Address Ranges 7The following text explains the address ranges used by VME devices on the (H)VMEprimary I/O bus when t

Page 4 - Referenced Publications

Power Hawk 620/640 Hardware Environment7-9Bus Time-Out 7For each data transfer accessing a slave device, the VME bus provides a bus timer whichmeasure

Page 5

Device Driver Programming7-10Considerations” for more information. Also refer to Device Drivers and VME Bus Errorsand the iobus_err(2) man page for mo

Page 6

Power Hawk 620/640 Hardware Environment7-11Bus arbitration is important only for devices that can act as bus masters. This is indicatedin a device spe

Page 7 - Contents

Device Driver Programming7-12VME interrupt request lines are only one source of interrupts in the system. VMEinterrupt request lines are mapped to the

Page 8

Power Hawk 620/640 Hardware Environment7-13whereby the IACK* signal is propagated to each device via an IACKIN/IACKOUT*signal chain through the slots

Page 9

Device Driver Programming7-14Table 7-3. Default PCI Address DecodeAddress Mode Processor PCI VMEPCI I/O: StartEndOffset0x800000000x960000000x00000000

Page 10

8Motorola MCP750 Hardware EnvironmentSYSTEM OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1

Page 11

Device Driver Programming

Page 12

8-18Chapter 8Motorola MCP750 Hardware Environment888SYSTEM OVERVIEW 8The Motorola MCP750 system is a , single board, uniprocessor, real-time, super-mi

Page 13

ContentsxiTiming and Timeout Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19Interrupt Vector Routines . . .

Page 14

Device Driver Programming8-2The MCP750 provides the 1 MB backdoor external cache option. The Falcon chip set con-trols the boot Flash and the ECC DRAM

Page 15

Motorola MCP750 Hardware Environment8-3Figure 8-1. Motorola MCP750 System Block Diagram

Page 16

Device Driver Programming8-4BUSSES 8There are two main busses on the MCP750, the processor bus (also called the MPC60Xbus) and the 64-bit PCI bus.Inte

Page 17 - Introduction

Motorola MCP750 Hardware Environment8-5- The PCI bus (interrupts from PCI devices)- The CPCI bus (interrupts from CPCI devices)- Power monitor interru

Page 18

Device Driver Programming8-6Figure 8-2, “Big Endian Bit and Byte Notation” for more information. (Note that thedepicted bit ordering (with bit 31 most

Page 19

Motorola MCP750 Hardware Environment8-7

Page 20 - Organization of Manual 1

Device Driver Programming8-8

Page 21 - Supporting Documentation 1

Motorola MCP750 Hardware Environment8-9

Page 22

Device Driver Programming8-10

Page 23 - Understanding Device Drivers

9Understanding the Kernel EnvironmentOverview of the Kernel I/O Structure and Flow of Control . . . . . . . . . . . . . . . . . . . 9-1Overview of So

Page 24

Device Driver ProgrammingxiiUsing Multiple Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18Synchr

Page 25

Device Driver Programming

Page 26 - Structure 2

9-19Chapter 9Understanding the Kernel Environment999This chapter describes the role of device drivers within the kernel and gives an overview ofvariou

Page 27 - Interrupts 2

Device Driver Programming9-2Figure 9-1. Kernel I/O StructureBy issuing system calls from the user level, a program accesses the file and process contr

Page 28

Understanding the Kernel Environment9-3/usr/include/sys directories contain the system header files that contain the defini-tions of the structures us

Page 29 - Types of Devices 2

Device Driver Programming9-4CAUTIONWhen using C data types to communicate with hardware deviceson the Series 6000 platform, care must be taken to ensu

Page 30 - STREAMS Interface 2

Understanding the Kernel Environment9-5cmn_err.h Defines the interface to display messages or panic the system.param.h Defines the machine type dependen

Page 31 - Major and Minor Numbers 2

Device Driver Programming9-6The cdevsw structure specifies the interface routines present for the character device.Each device driver can provide open

Page 32

Understanding the Kernel Environment9-7d_msgio VOP_MSGIO() routine called for non-STREAMS characterdevices that support msgio.d_ttys Pointer to the dr

Page 33

Device Driver Programming9-8the transfer, two structures are used: the iovec(D4) and uio(D4) structures. Thesestructures are defined in /usr/include/s

Page 34 - Driver Environment 2

Understanding the Kernel Environment9-9uio_fmode The file status flags set by the value of the oflag argument speci-fied when the file was opened with

Page 35 - Master File 2

Contentsxiiiidspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5idtune. . . . . . . .

Page 36 - Driver Development 2

Device Driver Programming9-10/** Used by drivers*/device_t *devices; /* List of devices on this adapter */long adapter_state;/* Adapter has b

Page 37 - The PCI Environment

Understanding the Kernel Environment9-11cpu Reserved for future use.sio_address Short I/O address of the adapter. The term short I/O refersto the sixt

Page 38

Device Driver Programming9-12The device Structure 9The device_t structure is defined in adapter.h as follows:typedef struct devices device_t;struct dev

Page 39

Understanding the Kernel Environment9-13The command word is a 32-bit integer divided into several fields. The fields are explainedin Table 9-2:As mentio

Page 40 - Big Vs Little Endian Issues 3

Device Driver Programming9-14manual for additional information. The system buffers are used to implement the tradi-tional UNIX buffer cache, which is

Page 41 - Types of PCI Resources 3

Understanding the Kernel Environment9-15ready to manage its own allocation and deallocation requests. This is done by indexing thememory units in the

Page 42 - Base Address Registers(BAR) 3

Device Driver Programming9-16btopr(D3) Convert size in bytes to size in pages (round up)ptob(D3) Convert size in pages to size in bytesvtop(D3) Conver

Page 43 - PowerMax OS Support 3

Understanding the Kernel Environment9-17Synchronization Routines 9The kernel provides three broad categories of synchronization/serialization routines

Page 44

Device Driver Programming9-18Sleep Locks 9Sleep locks are used for serializing access to shared resources when spin locks cannot beused. At base level

Page 45

Understanding the Kernel Environment9-19sor. Only interrupt requests at level 4 or higher are presented to the processor. All otherrequests are ignore

Page 46

Device Driver ProgrammingxivBreakpoints in the Initialization Phase. . . . . . . . . . . . . . . . . . . . . . . . . 15-14Using crash to Debug a Drive

Page 47

Device Driver Programming9-20To assist you in converting between microseconds and clock ticks, the kernel provides thefollowing routines:drv_hztousec(

Page 48

Understanding the Kernel Environment9-21device unit identifier or a pointer to a configuration structure. When the interrupt becomesactive, the interrup

Page 49 - System Overview 4

Device Driver Programming9-22offsets in all of its dealings with the rest of the kernel. This is the new off64_t type andwith it offsets, up to approx

Page 50 - Caches 4

Understanding the Kernel Environment9-23Although old binaries will install correctly, old sources cannot be rebuilt under the newPowerMAX OS without s

Page 51 - Data Types 4

Device Driver Programming9-24

Page 52 - (H)VME Addressing 4

10Developing a Device DriverUnderstanding the Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1Dev

Page 53 - Address Modifiers 4

Device Driver Programming

Page 54 - VME Address Ranges 4

10-110Chapter 10Developing a Device Driver101010This chapter describes the procedures for developing a device driver. It identifies aspectsof the devi

Page 55

Device Driver Programming10-2reset in hardware or via a software command. While in this mode, the only functions thatthe HPS can perform are to open c

Page 56 - Bus Time-Out 4

Developing a Device Driver10-3Programmed I/O Support 10A programmed I/O device does not directly access physical memory. Instead the devicesupplies da

Page 57 - Bus Arbitration 4

ContentsxvThe Asynchronous I/O Support Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-25The aread Routine . . . . . . . . . .

Page 58 - • CPU Release on Request

Device Driver Programming10-4NOTEThis section illustrates the installation procedure for a 13-slotmodel of the Series 6000 platform. Different models

Page 59 - Interrupt Lines (Levels) 4

Developing a Device Driver10-5To install the board on the HVME primary I/O bus:• Mount the VME board onto an HVME adapter board (see A1). Thereis a mo

Page 60 - • jumpers or switches

Device Driver Programming10-6The e command displays a byte, word, or longword of memory beginningat the specified memory location. This command can al

Page 61

Developing a Device Driver10-7Each type of entry point is briefly described as follows.Initialization Routines 10Typically, there are some initializati

Page 62

Device Driver Programming10-8You might also want to declare other structures for your device driver. The definitions forsuch structures should be in th

Page 63

Developing a Device Driver10-9Typically, the types of activities performed by a driver’s init() or start() routine areas follows:1. Find the adapter’s

Page 64

Device Driver Programming10-10tine. The rest of the initialization tasks can be coded either in the init() routine or in thestart() routine.The Start

Page 65 - System Overview 5

Developing a Device Driver10-11Information needed to develop each type of driver I/O service routine is presented in thesections that follow.The Open

Page 66 - Caches 5

Device Driver Programming10-12FEXCL Interpreted in a driver dependent manner. Some driversinterpret this flag to mean open the device with exclusiveac

Page 67 - Interrupts 5

Developing a Device Driver10-13The Close Routine 10Specification#include <sys/types.h>#include <sys/file.h>#include <sys/errno.h>#inc

Page 68 - Byte-Ordering and Alignment 5

Device Driver ProgrammingxviTablesTable 4-1. HVME Address Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6Table

Page 69 - VME Addressing 5

Device Driver Programming10-14The Read Routine 10Specification#include <sys/types.h>#include <sys/errno.h>#include <sys/uio.h>#includ

Page 70 - VME Address Ranges 5

Developing a Device Driver10-15To transfer characters to the user’s I/O buffers, the driver calls the uiomove(D3) kernelfunction and sets the read–wri

Page 71 - Bus Time-Out 5

Device Driver Programming10-16The Write Routine 10Specification#include <sys/types.h>#include <sys/errno.h>#include <sys/uio.h>#inclu

Page 72 - • Invalid transfer

Developing a Device Driver10-17The Ioctl Routine 10Specification#include <sys/types.h>#include <sys/errno.h>#include <sys/file.h>#inc

Page 73 - Bus Arbitration 5

Device Driver Programming10-18The Chpoll Routine 10Specification#include <sys/types.h>#include <sys/errno.h>#include <sys/file.h>#inc

Page 74 - Interrupt Lines (Levels) 5

Developing a Device Driver10-19device minor number. If the I/O event for which the device is being polled has notoccurred when the driver’s chpoll rou

Page 75

Device Driver Programming10-20the mmap routine returns NOPAGE. If the offset does exist, mmap returns the physical pageID for the page at offset off i

Page 76 - VME to PCI Address Decode 5

Developing a Device Driver10-21The Intr Routine 10Specificationvoidxxintr(ivec)intivec;Return ValuesNone.The ivec argument specifies a driver-defined n

Page 77

Device Driver Programming10-22waiting on completion of a write request that data have been written fromthe internal driver buffers by waking up any ba

Page 78

Developing a Device Driver10-23device driver uses a local routine to probe each VME slot until the device is found. Itignores slots that are already m

Page 79 - System Overview 6

1IntroductionFocus of Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1Overview of t

Page 80 - Caches 6

Device Driver Programming10-24Finally, the kernel provides an error reporting facility. This facility consists of a kernelerror logging routine, an er

Page 81 - Data Types 6

Developing a Device Driver10-25When a process blocked by SLEEP_LOCK_SIG is interrupted by a job control stop signaland is subsequently continued, the

Page 82 - VME Addressing 6

Device Driver Programming10-26in SV_WAIT_SIG and needs to be wakened. If the flag is still set, the interrupt routineclears it and then invokes SV_SIG

Page 83 - VME Address Ranges 6

11Multithreading a Device DriverThe Multithreaded, Preemptive Kernel and Device Drivers . . . . . . . . . . . . . . . . . . . 11-1Protecting a Device

Page 85 - Bus Time-Out 6

11-111Chapter 11Multithreading a Device Driver111111This chapter describes the methods for protecting a device driver in a multiprocessorsystem. It pr

Page 86

Device Driver Programming11-2• Linked lists, state fields, and other data structures used by the driver• Global variables• Hardware registersAs indicat

Page 87 - Bus Arbitration 6

Multithreading a Device Driver11-3of some code depends upon the current state being constant, then the lock that protectsupdates to the state must be

Page 88 - Interrupt Lines (Levels) 6

Device Driver Programming11-4Using the Synchronization Primitives 11The synchronization primitives to use in a multithreaded environment are spin lock

Page 89

Multithreading a Device Driver11-5Spin Locks 11Spin locks are low-level, busy waiting synchronization primitives. They coordinate accessto data struct

Page 90

Device Driver Programming

Page 91

Device Driver Programming11-6Basic Locks 11After you have defined a basic lock’s lock information structure by using theLKINFO_DECL(D5) macro, you mus

Page 92

Multithreading a Device Driver11-7Note that strictly speaking, the interrupt levels listed here are machine independentabstractions of the hardware in

Page 93 - System Overview 7

Device Driver Programming11-8Upon acquiring a lock with the priority level set at the specified pl, LOCK returns the pre-vious priority level to the ca

Page 94

Multithreading a Device Driver11-9#include <sys/types.h>#include <sys/ksynch.h>#include <sys/ddi.h>void LOCK_DEALLOC(lockp)lock_t *l

Page 95

Device Driver Programming11-10#include <sys/types.h>#include <sys/kmem.h>#include <sys/ksynch.h>#include <sys/ddi.h>rwlock_t *

Page 96 - Memory 7

Multithreading a Device Driver11-11NOTEDo not use the plbase priority value for the min_pl argumentThis value is invalid because it does not block any

Page 97 - Data Types 7

Device Driver Programming11-12Upon acquiring the lock, the RW_TRYRDLOCK routine returns the previous priority level.If the lock is not acquired, the R

Page 98 - Byte-Ordering and Alignment 7

Multithreading a Device Driver11-13pl is the interrupt priority level to be set after releasing the lock.The RW_UNLOCK routine has no return value.Fin

Page 99 - VME Addressing 7

Device Driver Programming11-14#include <sys/types.h>#include <sys/kmem.h>#include <sys/ksynch.h>#include <sys/ddi.h>sleep_t *S

Page 100 - VME Address Ranges 7

Multithreading a Device Driver11-15prihi High priorityprimed Medium priority (recommended)prilo Low priorityDrivers can use these values to request a

Page 101 - Bus Time-Out 7

1-11Chapter 1Introduction111This chapter defines the scope of this manual and overviews the effort required to developa device driver for PowerMAX OS.

Page 102 - Bus Arbitration 7

Device Driver Programming11-16porarily boost the priority of an LWP which is in the timesharing class as a reward forvoluntarily blocking itself. Vali

Page 103 - Interrupt Lines (Levels) 7

Multithreading a Device Driver11-17#include <sys/types.h>#include <sys/ksynch.h>#include <sys/ddi.h>bool_t SLEEP_LOCKOWNED(lockp)loc

Page 104

Device Driver Programming11-18Using Multiple Locks 11If multiple LWPs are contending for the resources of the driver, it can be more efficient tohave

Page 105 - PCI Address Decode 7

Multithreading a Device Driver11-19flag specifies if the caller can sleep waiting for memory if sufficient memory is notimmediately available to alloc

Page 106 - 0xA0000000

Device Driver Programming11-20primed Medium priority (recommended)prilo Low priorityDrivers can use these values to request a priority appropriate to

Page 107

Multithreading a Device Driver11-21If an LWP sleeps because of a call to SV_WAIT_SIG, signals can cause the LWP to wakeup. Job control stop signals (S

Page 108

Device Driver Programming11-22svp is a pointer to the synchronization variable to be broadcast signaled.flags is a bit field for flags. No flags are cur

Page 109 - PROCESSOR BOARD 8

11 Supporting Direct Memory Access (DMA)Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 110 - MEMORY 8

Device Driver Programming

Page 111

12-112Chapter 12 Supporting Direct Memory Access (DMA)121212This chapter explains how to program devices that support Direct Memory Access (DMA)using

Page 112 - INTERRUPTS 8

Copyright 1999 by Concurrent Computer Corporation. All rights reserved. This publication or any part thereof isintended for use with Concurrent Comput

Page 113 - BYTE-ORDERING AND ALIGNMENT 8

Device Driver Programming1-22. Design the driver.3. Write the driver.4. Integrate the driver into the system5. Test and debug the driver.Procedures fo

Page 114

Device Driver Programming12-2system loads it from disk back into RAM. This activity is not under the control of the userand may happen at any time. Me

Page 115

Supporting Direct Memory Access (DMA)12-3physical memory pages. If the device is capable of performing scatter/gather DMA, thenthe driver should creat

Page 116

Device Driver Programming12-4count. Also construct a new chain pair if the addition of this count to theprevious pair would result in the count exceed

Page 117

Supporting Direct Memory Access (DMA)12-5else {/* * we must add another chain pair * * return an error if there are too many discontiguous * memory ar

Page 118

Device Driver Programming12-6Direct Memory Access to Kernel Space 12Because kernel memory is never paged out, the driver writer needs only to handle v

Page 119

12Loadable ModulesThe DLM Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2Loadable Modul

Page 120

Device Driver Programming

Page 121

13-113Chapter 13Loadable Modules131313The Dynamically Loadable Modules (DLM) feature allows you to add a device driver (orother kernel module) to a ru

Page 122

Device Driver Programming13-2The DLM Mechanism 13Loadable Module Types 13Since this book is about device drivers, this chapter focuses on loadable dev

Page 123 - System Data Structures 9

Loadable Modules13-3Overview of the Load Process 13When a loadable module needs to be added to the system, the DLM mechanism reads themodule's lo

Page 124 - Header Files 9

Introduction1-3Chapters 4-8 describe the hardware environments, briefly overview the platform and thenprovide more information on configuring and opera

Page 125 - The cdevsw Structure 9

Device Driver Programming13-4NOTELoadable high-level drivers (HDRV) cannot be auto loaded.HDRV drivers can, however, be demand loaded using themodadmi

Page 126

Loadable Modules13-5Making Modules Loadable 13The following sections explain how to convert your non-loadable driver to be a loadabledriver.Coding a W

Page 127 - The cred Structure 9

Device Driver Programming13-6The mod_drvdetach routine is called by the driver's _unloadroutine to disable and remove the driver's interrupt

Page 128

Loadable Modules13-7NOTEA DLM can contain only one wrapper macro definition.Note that only MOD_DRV_WRAPPER and MOD_HDRV_WRAPPER module types have theha

Page 129 - The adapter Structure 9

Device Driver Programming13-8Screen 13-2 shows a sample wrapper for a high level (HDRV) driver.Screen 13-2. High Level Driver Wrapper Coding ExampleS

Page 130

Loadable Modules13-9Screen 13-4 shows a sample wrapper for a file system module. Notice that this file systemmodule doesn't need to do any clean-up

Page 131

Device Driver Programming13-10Packaging a Loadable Module for Installation 13Dynamically Loadable Modules under PowerUX are compiled as shared objects

Page 132 - Kernel Support Routines 9

Loadable Modules13-11The $modtype line in the Master file lets you define a character string that helps iden-tify a driver in error messages. This strin

Page 133 - BREAK signal.)

Device Driver Programming13-12The global auto-unload delay values are defined as:DEF_UNLOAD_DELAY 60 0 3600This says that, by default, a

Page 134

Loadable Modules13-13The -l option instructs modadmin to load a loadable module into the running system.For example, the commandmodadmin -l lploads a

Page 135 - Address Management Routines 9

Device Driver Programming1-4PowerMAX OS Real-Time Guide (Pub. No. 0890466)Explains user-level interrupt routines and inter-process synchronization on

Page 136 - Data Transfer Routines 9

Device Driver Programming13-14Unloading the Module 13The -u and -U options instruct modadmin to unload a module from the running system.For example, t

Page 137 - Synchronization Routines 9

14Driver Installation and TuningUsing idtools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 138 - Sleep Locks 9

Device Driver Programming

Page 139 - Timing and Timeout Routines 9

14-114Chapter 14Driver Installation and Tuning141414For device driver writers, installation means different things. If you are installing a driverfor

Page 140 - Interrupt Vector Routines 9

Device Driver Programming14-2for these commands are provided in the Command Reference. Details about the DSP com-ponent files (such as the Driver.o, Ma

Page 141 - Debug Routines 9

Driver Installation and Tuning14-3Base kernel rebuilds are usually needed after a statically linked kernel module is installed,when any static module

Page 142

Device Driver Programming14-4NOTEThe exact pathnames of installed files in /etc/conf can changein future releases. These files should be accessed only

Page 143

Driver Installation and Tuning14-5On the next system reboot after a kernel reconfiguration, in sysinit state, the idmknodcommand is run automatically (

Page 144

Device Driver Programming14-6By default, if the parameter has already been tuned previously, you are asked to confirmthe change with the messageTunabl

Page 145 - Developing a Device Driver

Driver Installation and Tuning14-7figuration files from the installation media to the hard disk of the system, installs any DSPsusing idinstall, then th

Page 146

2Understanding Device DriversWhat Is a Device Driver?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Ap

Page 147

Device Driver Programming14-8DSP Component Files 14Following are each of the component files that make up the typical DSP. Where possible,an example ha

Page 148 - DMA Support 10

Driver Installation and Tuning14-9Driver.o 14A required component, the Driver.o component is the driver object module that is to beconfigured into the

Page 149 - Data Chaining Support 10

Device Driver Programming14-10component of a DSP is installed, idinstall stores the module's System file informa-tion in /etc/conf/sdevice.d/modu

Page 150 - Installing the Device 10

Driver Installation and Tuning14-112. Generates a valid id field value (called a tag) and prepends it to the entry.3. Generates an rstate field with a v

Page 151

Device Driver Programming14-12For complete information about the Mtune file format, refer to the Mtune(4) manualpage.Node 14An optional component, the

Page 152

Driver Installation and Tuning14-13The contents of the /etc/conf/rc.d directory are linked to /etc/idrc.d whenevera new configuration of the kernel is

Page 153 - Interrupt Service Routines 10

Device Driver Programming14-14Packages should never access Sd files in /etc/conf directly; they should use theidinstall command instead.The contents o

Page 154

Driver Installation and Tuning14-15Packaging the Driver 14For complete information on the system packaging tools, refer to System AdministrationVolume

Page 155 - The Init Routine 10

Device Driver Programming14-16Following is an example of a prototype file for a driver add-on package.For more information, refer to the prototype(4) m

Page 156

Driver Installation and Tuning14-17When writing a postinstall script, you should make liberal use of echo andmessage commands to tell the user what is

Page 157 - The Open Routine 10

Device Driver Programming

Page 158 - • Lock a non-sharable device

Device Driver Programming14-183. Invoke idbuild without any options to cause the kernel to be rebuiltwhen the system is rebooted.Following is an examp

Page 159 - The Close Routine 10

Driver Installation and Tuning14-19Removing a Package 14As shown above, the installation process is relatively simple and straightforward from theuser

Page 160 - The Read Routine 10

Device Driver Programming14-20Updating a DSP 14If a check for the existence of the DSP (using idcheck) turns up positive, apostinstall script should u

Page 161 - /* number of bytes to copy */

Driver Installation and Tuning14-21removed. An idbuild is required to reconfigure the kernel once the DSP has beenremoved.Building a New Kernel 14A ne

Page 162 - The Write Routine 10

Device Driver Programming14-22Documenting Your Driver Installation 14If you are developing a DSP to be installed by users who might not be familiar wi

Page 163 - The Ioctl Routine 10

15Driver Testing and DebuggingIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 165 - The Mmap Routine 10

15-115Chapter 15Driver Testing and Debugging151515Introduction 15Testing a device driver consists of installing the driver on a working system and att

Page 166

Device Driver Programming15-24. ioctl(D2), read(D2), write(D2) and/or strategy(D2) andprint(D2)When the driver seems to be functioning properly under

Page 167

Driver Testing and Debugging15-3a file or to a remote terminal. You can also write cmn_err statements to the console, butmassive amounts of statements

Page 168 - Local Routines 10

2-12Chapter 2Understanding Device Drivers222This chapter explains what a device driver is and how a driver differs from an application.It describes th

Page 169 - Error Handling 10

Device Driver Programming15-4Installing a Driver for Testing 15Many of the steps that follow require you to modify files and directories owned by root

Page 170

Driver Testing and Debugging15-5Common Driver Problems 15Following is a discussion of some common driver bugs, with possible symptoms. Theseshould be

Page 171

Device Driver Programming15-6Timing Errors 15Timing errors occur when the driver code executes too quickly or too slowly for the devicebeing driven. F

Page 172

Driver Testing and Debugging15-7the input and output. As soon as any one of these operations fails, you should reboot thesystem immediately to ensure

Page 173

Device Driver Programming15-8• If a system panic is repetitively occurring in a section of driver code, abreakpoint can be set beforehand in that code

Page 174

Driver Testing and Debugging15-9Understanding the p command of the console processor debugging commands is essentialto booting the system and debuggin

Page 175 - Protecting a Device Driver 11

Device Driver Programming15-10##INIT: :New run level: 0The system is coming down. Please wait.CPU 0 halted001fea24 [001fea24] pause_self+60% 48000000

Page 176 - • Hardware registers

Driver Testing and Debugging15-11001baf5c [001baf5c] idle+84 % 80700014 lwz r3,0x14(r16)#0>#0>b gdread#0>r# dd if=/dev/rusr of=/dev/null

Page 177

Device Driver Programming15-12CPU 1 breakpoint00124808 [00124808] gdread+1c %*48000095 bl gdsizeCPU 0 halted001baf5c [001baf5c] idle+84 % 8070

Page 178 - • _MPSTAT

Driver Testing and Debugging15-1300:00: hsa: Adapter 8 configured in slot 10.00: SCSI disk @ID 0 on hsa adapter 8.00: hsa: Adapter 9 configured i

Page 179 - Spin Locks 11

Device Driver Programming2-2Figure 2-1. Driver Placement in the KernelUNIX systems see every device as a file. Even the user-level interface to the d

Page 180 - Basic Locks 11

Device Driver Programming15-14STACK TRACE FOR PROCESS 30 LWP 0:xcmn_panic+0x64 () sp:058cc100 ret:002ade28xcmn_err

Page 181 - NULL pointer

Driver Testing and Debugging15-15 CPU 0 CPU 1dsk(a,0,0,0)/.dsk(a,0,0,0)/bootNH Boot LoaderBoot: /stand/unix2997340+626016+2768732 start 0xE000symb

Page 182

Device Driver Programming15-16#0>#0>bk all#0>r00:00: The system is coming up. Please wait.00:00: hsa: Adapter 8 configured in slot 10.00:

Page 183 - Read/Write Locks 11

Driver Testing and Debugging15-17The system automatically saves the dump image when it detects an improper shutdown.By default, when entering multi-us

Page 184

Device Driver Programming15-18the starting address of the stack, list the registers with the paniccommand.proc List the process table. Use this inform

Page 185

Driver Testing and Debugging15-19matically under various conditions, such as panics and breakpoint traps. Any time thekdb>> prompt displays, you

Page 186

Device Driver Programming15-20analysis. If the error is recoverable, the driver should not panic the system. An example ofpanicking using cmn_err() is

Page 187 - Sleep Locks 11

16Special ConsiderationsDevice Drivers and Real Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1Device Dri

Page 188

Device Driver Programming

Page 189

16-116Chapter 16Special Considerations161616This chapter describes the special factors that you must consider when developing adevice driver for a rea

Page 190

Understanding Device Drivers2-3System data structures, called switch tables, contain the starting addresses for the principalroutines included in all

Page 191 - LWP that suc

Device Driver Programming16-2should not be blocked for long periods of time. A device driver that is written for a con-ventional UNIX kernel can block

Page 192 - Synchronization Variables 11

Special Considerations16-3system start-up script, to register itself to catch a range of VME addresses. If a VME buserror occurs within this registere

Page 193

Device Driver Programming16-44. Based on the state of the device and the information from the IO_INFOiobus_err(2) call, the signal handler should deci

Page 194 - LWP goes to sleep. No spin

Special Considerations16-5labeling of imported or exported data. For a description of these and related issues, refer tothe TCSEC.Design and Implement

Page 195

Device Driver Programming16-6

Page 196 - LWPswake

17Writing a User-Level Device DriverUnderstanding a User-Level Device Driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1What I

Page 197

Device Driver ProgrammingCreate a User-Level Interrupt Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-40Provide Debug and

Page 198

17-117Chapter 17Writing a User-Level Device DriverThis chapter provides an overview of user-level device drivers. It describes thecomponents that make

Page 199 - DMA into User Buffers 12

Device Driver Programming17-2What Are the Advantages and Disadvantages of a User-Level Driver?17The chief advantage of a user-level device driver is t

Page 200

Writing a User-Level Device Driver17-3Because of these limitations, it is intended that a user-level device driver be used only byapplications that ex

Page 201

Device Driver Programming2-4much more slowly than the CPU, the data transfer can squander many processor cycles ifthe CPU waits on the drive. To avoid

Page 202

Device Driver Programming17-4Single-User Drivers versus Multiuser Drivers 17Developing a user-level device driver that allows only one lightweight pro

Page 203 - 24-Bit DMA Devices 12

Writing a User-Level Device Driver17-5different types of driver routines that can be provided is presented in “Overview of User-Level Device Driver Ro

Page 204

Device Driver Programming17-6Shared Memory Regions 17Shared memory regions are needed to provide access to a device’s registers and to provideaccess t

Page 205 - Loadable Modules

Writing a User-Level Device Driver17-7int register_id; /* IPC id for register region */unsigned int register_offset;/* register offset into shared mem

Page 206

Device Driver Programming17-81. Define a reserved section of physical memory by initializing theres_sects[] array in the /etc/conf/pack.d/mm/space.c fil

Page 207

Writing a User-Level Device Driver17-9you use the userdma(2) system call to prepare a buffer forDMA transfers.The dmavec structure has been defined to

Page 208 - The DLM Mechanism 13

Device Driver Programming17-10Generally a user-level device driver performs I/O asynchronously rather thansynchronously. The reason is that asynchrono

Page 209 - Auto Load 13

Writing a User-Level Device Driver17-11Overview of Interrupt-Handling Issues 17A user-level driver can be written to support only polling and provide

Page 210 - Auto Unload 13

Device Driver Programming17-12Overview of Synchronization Issues 17During development of a user-level device driver, you must address a number ofsynch

Page 211 - Making Modules Loadable 13

Writing a User-Level Device Driver17-13overview of these system calls is provided in “Process Synchronization Tools” on page17-19.Overview of Error Re

Page 212 - Wrapper Macros 13

Understanding Device Drivers2-5NOTESome of the DDI/DKI functions (such as kmem_alloc(D3))resemble standard library functions (such as malloc(3C)), but

Page 213 - Sample Wrapper Code 13

Device Driver Programming17-14Overview of the Device Configuration Program 17User-level device drivers written by Concurrent Computer Corporation perso

Page 214

Writing a User-Level Device Driver17-15Understanding Operating System Support for a User-LevelDriver 17Operating system support for writing and using

Page 215

Device Driver Programming17-16• The application’s buffer must be locked in physical memory; that is, thebuffer must be resident, and the virtual to ph

Page 216

Writing a User-Level Device Driver17-17buffer a pointer to an I/O buffer in the user’s virtual address spacesize the size of the I/O buffer in bytesus

Page 217

Device Driver Programming17-18functions. The order in which the functions are executed is the reverse of the order inwhich they are registered with a

Page 218 - Managing Loadable Modules 13

Writing a User-Level Device Driver17-19is suggested that the string indicate the name of the routine that has producedthe error.The uderror routine wr

Page 219

Device Driver Programming17-20exclusion mechanisms, and coordinating client-server interaction among processes.Descriptions of the tools that are pert

Page 220 - Dynamic Symbols and kdb 13

Writing a User-Level Device Driver17-21able and re-enable rescheduling and to determine the number of rescheduling locks ineffect. These macros are br

Page 221

Device Driver Programming17-22Procedures for using the server_block and the server_wake1 system calls in auser-level driver’s interrupt routine are ex

Page 222

Writing a User-Level Device Driver17-23The vme_address(3C) Library Routine 17The vme_address(3C) routine enables you to obtain a 32-bit physical addre

Page 223 - Using idtools 14

iiiPrefaceScope of ManualThis manual provides reference information and procedures for developing device driverfor all Concurrent systems (except Powe

Page 224

Device Driver Programming2-6Types of Device Driver Interfaces 2A device driver interface is the set of structures, routines, and optional functions us

Page 225

Device Driver Programming17-24shmget(2) to obtain the shared memory identifier for the regionshmat(2) to attach the shared memory region to the process

Page 226

Writing a User-Level Device Driver17-25Return ValueThe driver’s open routine returns EUD_NOERROR if the device is successfully opened.Otherwise, it re

Page 227

Device Driver Programming17-26For an I/O device that performs programmed I/O or a user-level device driver that doesintermediate buffer copying, the u

Page 228

Writing a User-Level Device Driver17-27Return ValueThe driver’s aread routine returns EUD_NOERROR if the operation is successfullyqueued. It returns t

Page 229 - Overview of DSP Components 14

Device Driver Programming17-28Parametersdev_desc the identifier for the device to which data are to be written. This identifier isreturned by the driver

Page 230 - DSP Component Files 14

Writing a User-Level Device Driver17-29Return ValueThe driver’s acheck routine returns EUD_NOERROR if the specified asynchronous I/Ooperation has been

Page 231 - System 14

Device Driver Programming17-30Parametersdev_desc the identifier for the device to or from which the asynchronous I/O operationis being performed. This

Page 232 - $loadable gt

Writing a User-Level Device Driver17-31A general purpose control function similar to the ioctl routine used by kernel devicedrivers has not been defin

Page 233 - Mtune 14

Device Driver Programming17-32• Ensuring that all I/O operations have been completedThis function is especially important for a device that uses DMA b

Page 234

Writing a User-Level Device Driver17-33Example specification and pseudo code for a user-level driver’s close routine ispresented as follows:intdev_clo

Page 235 - Sassign 14

Understanding Device Drivers2-7Major and Minor Numbers 2Before the operating system can access a device, the device needs its driver installed and asp

Page 236 - Space.c 14

Device Driver Programming17-34Developing the Driver’s Interrupt Service Routine 17To develop a user-level driver routine that services interrupts gene

Page 237 - Packaging the Driver 14

Writing a User-Level Device Driver17-351. Provide for communication between the user-level interrupt process andother processes to which the driver is

Page 238

Device Driver Programming17-36the process is in this state, all signals are ignored. The process no longerexecutes at normal program level. Each time

Page 239

Writing a User-Level Device Driver17-37For those user-level interrupt applications that want to bind some portion of their addressspace to local memor

Page 240 - Installing a Package 14

Device Driver Programming17-38and the Secure/PowerUX kernels, the exception-handling code checks forinterrupt-handling routines.• An interrupt-handlin

Page 241 - Installing a DSP 14

Writing a User-Level Device Driver17-39-i create the user-level interrupt process-d display debug and status information-x remove the user-level devic

Page 242 - Removing a DSP 14

Device Driver Programming17-403. Initialize global data structures that contain information about a particulardevice, and initialize synchronization p

Page 243 - Building a New Kernel 14

Writing a User-Level Device Driver17-41Provide Debug and Status Information 17You might want to provide the -d option to facilitate debugging. To supp

Page 244

Device Driver Programming17-42• Use printf throughout your code.• Maintain event statistics and trace information. Maintain a trace buffer inshared me

Page 245 - Driver Testing and Debugging

A-1AAppendix AExample PCI User-Level Device Driver111This appendix contains an example of a user-level device driver for a National InstrumentsPCI DIO

Page 246

Device Driver Programming2-8• System calls by applications• Interrupts by devices.The process of initializing the system creates several tables so the

Page 247

Device Driver ProgrammingA-2#include <sys/bridge.h>#include <sys/pci_info.h>extern int shmctl();extern int shmdt();extern int errno;#defin

Page 248 - General Guidelines 15

Example PCI User-Level Device DriverA-3 int bus,dev; PCI_DWORD dev_vend_id; bus = PCITAG_BUSNUM(tag); dev = PCITAG_DEVNUM(tag)+1; for (; bus

Page 249

Device Driver ProgrammingA-4 perror("PCIud - unable to alloc DIO Base address 0 (PCImite) "); goto hot_swap_only;}/* map base address

Page 250

Example PCI User-Level Device DriverA-5 goto error_exit;}/* bind phys address of PCI dev to shm_id */if (shmbind(bar1_shm_id, bar1.cpu_addr) == -1)

Page 251 - Common Driver Problems 15

Device Driver ProgrammingA-6}if (bar0_shm_id != NULL) {/* check if shmid valid */ shmctl(bar0_shm_id, IPC_RMID, NULL);/* yes, free it */ bar1_sh

Page 252 - Accessing Critical Data 15

Glossary-1Glossary222adapterA hardware set which connects one or more device controllers to the computer system.alignmentThe position in memory of a u

Page 253

Device Driver ProgrammingGlossary-2block data transferThe method of transferring data in units (blocks) between a block device such as a mag-netic tap

Page 254

GlossaryGlossary-3cacheA section of computer memory where the most recently used buffers, i-nodes, pages, andso on are stored for quick access.charact

Page 255 - Shutdown and Reboot 15

Device Driver ProgrammingGlossary-4device understands. For example, on a disk drive, the controller accepts a request to read afile and converts the re

Page 256

GlossaryGlossary-5device switch tableThe kernel table constructed during automatic configuration that contains the address ofeach driver entry point r

Page 257

Understanding Device Drivers2-91. The system directs the I/O system call (open and read, for exam-ple) to a special device file. This file includes th

Page 258

Device Driver ProgrammingGlossary-6FDDIFiber Distributed Data Interface.functionA kernel utility used in a driver. The term function is used interchan

Page 259

GlossaryGlossary-7kernel buffer cacheA set of buffers used to minimize the number of times a block-type device must beaccessed.lightweight processA li

Page 260

Device Driver ProgrammingGlossary-8moduleA STREAMS module consists of two related queue structures, one each for upstreamand downstream messages. One

Page 261

GlossaryGlossary-9raw I/OMovement of data directly between user address spaces and the device. Raw I/O is usedprimarily for administrative functions w

Page 262

Device Driver ProgrammingGlossary-10small computer system interface (SCSI)The American National Standards Institute (ANSI) approved interface for supp

Page 263 - Using crash Functions 15

GlossaryGlossary-11threadAn abstraction of the concept of execution in a shared address space. A sequence ofinstructions that are executed as an indep

Page 264 - Kernel Debugger 15

Device Driver ProgrammingGlossary-12

Page 265 - System Panics 15

Index-1Aacheck routine 17-28adapter structure 9-9, 10-9address assignment and configuration 4-8, 5-8, 6-8, 7-10address management routines 9-15addr

Page 266

Device Driver ProgrammingIndex-2DLM 13-2DMA device 17-3dma_pageio(D3) routine 12-3DR11W user-level driver 17-30Driveruser-level 17-1driverconfigu

Page 267 - Special Considerations

IndexIndex-310-20, 17-34, 17-40interrupt-handling routineconstraints 17-37interrupts 2-3, 15-6intr routine 10-21iobus_err 6-8, 7-9ioctl macros 9-

Page 268

Device Driver Programming2-10Devices need not use all the entry points provided by the switch table. For instance, printerdrivers do not need read rou

Page 269

Device Driver ProgrammingIndex-4Pparallel execution 2-3physiock routine 12-2physmap routine 10-9physmap_alloc routine 9-15physmap_free routine 9-

Page 270

IndexIndex-5SV_ALLOC routine 9-18, 11-18SV_BROADCAST routine 9-18SV_DEALLOC routine 9-18, 11-22SV_SIGNAL routine 9-18, 11-21SV_WAIT routine 9-18,

Page 271

Device Driver ProgrammingIndex-6

Page 274

Understanding Device Drivers2-111. Prepare a Driver Software Package (DSP), including the Driver.o objectmodule (the actual driver code), Master, Syst

Page 275

Device Driver Programming2-12ram_ results in routines named ram_open, ram_init and so on. For more informa-tion, see the prefix(D1) manual page.The Ma

Page 276

3The PCI EnvironmentIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1PC

Page 277

Device Driver Programming

Page 278 - P_PLOCK

3-13Chapter 3The PCI Environment333Introduction 3The PCI (Peripheral Component Interconnect) BUS specifications was created out of theneed to create a

Page 279

Device Driver ProgrammingivThe glossary defines technical terms important to understanding the concepts this guidepresents.The index contains an alpha

Page 280

Device Driver Programming3-2high performance form factors are used only when the design of the add on device requiresperformance or resources that exc

Page 281

The PCI Environment3-3Endian translation is necessary whenever a memory or I/O mapped address space isaccessed, or when accessing configuration space i

Page 282 - Shared Memory Regions 17

Device Driver Programming3-4of the configuration space. The remaining 192 or 1984(2048-64) is reserved for customuse by the device.Within the configura

Page 283 - User I/O Buffer Descriptor 17

The PCI Environment3-5ROM Base Address Registers(BAR) 3Decode into Memory Space 3Similar to Base Address Registers that decode into Memory Space with

Page 284

Device Driver Programming3-6Finding the Correct Adapter Structure 3Use the routines adapter_find and adapter_find2 to locate instances of your device.

Page 285

The PCI Environment3-7call must be used. The arguments must include the CPU physical address and the size ofthe PCI BAR register returned from the “pc

Page 286

Device Driver Programming3-8

Page 287

3Series 6000 Hardware EnvironmentSystem Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 288

Device Driver Programming

Page 289 - Overview of Error Returns 17

4-14Chapter 4Series 6000 Hardware Environment444This chapter provides hardware-specific information useful in developing device driversfor the Series

Page 290

PrefacevOn line Command ReferenceOn line Operating System API ReferenceOn line System Files and Devices ReferenceOn line Device Driver Reference

Page 291 - Driver 17

Device Driver Programming4-2Figure 4-1. Elements of an HN6800 Processor BoardCaches 4The processor features separate 16-Kb, four-way set-associative

Page 292

Series 6000 Hardware Environment4-3Memory 4The HN6800 system uses 32-bit addresses for up to four gigabytes of virtual addressspace.Figure 4-1 shows t

Page 293

Device Driver Programming4-4Byte-Ordering and Alignment 4The Series 6000 platform orders bytes according to the Big Endian convention, in whichthe mos

Page 294

Series 6000 Hardware Environment4-5Transfer Width Support 4For all non-block mode transfers, (H)VME supports byte, word and long-word addresses.It sup

Page 295 - The spl Support Routines 17

Device Driver Programming4-6HVME Address Ranges 4Table 4-1 shows the address ranges for HVME devices:VME Address Ranges 4This section details the addr

Page 296 - Rescheduling Control Tools 17

Series 6000 Hardware Environment4-7Table 4-3 shows the address ranges for (H)VME bus master accesses:Table 4-3. HVME Bus Master AccessTransfer Type

Page 297 - The Server System Calls 17

Device Driver Programming4-8Bus Time-Out 4The (H)VME bus measures with a bus timer the duration of data transfers accessing slavedevices. If a data tr

Page 298

Series 6000 Hardware Environment4-9then the device vendor must build a programmable assembly for a suitableaddress.NOTEInstalling components not speci

Page 299 - The open Routine 17

Device Driver Programming4-10NOTEThe VMEbus specification defines an optional bus clear (BCLR)signal for the present master to relinquish the bus. HVM

Page 300

Series 6000 Hardware Environment4-11Interrupt Request Levels and Priorities 4In the Series 6000, interrupts come from both processors or other hardwar

Page 301

Device Driver Programmingvi

Page 302 - The aread Routine 17

Device Driver Programming4-12NOTEFor system speed and proper device operation, increase the prior-ity of devices needing a quick response to interrupt

Page 303 - The awrite Routine 17

Series 6000 Hardware Environment4-13• If hardware settings determine the interrupt vector (preset), thenreconfigure the interrupt vector by modifying

Page 304 - The acheck Routine 17

Device Driver Programming4-14

Page 305 - The await Routine 17

5Power Hawk 610 Hardware EnvironmentSystem Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 306 - Control Functions 17

Device Driver Programming

Page 307 - The close Routine 17

5-15Chapter 5Power Hawk 610 Hardware Environment555This chapter provides hardware-specific information useful in developing device driversfor the Powe

Page 308

Device Driver Programming5-2Figure 5-1. Elements of a Power Hawk PH610 Processor BoardCaches 5The processor features separate 16-Kb, four-way set-ass

Page 309

Power Hawk 610 Hardware Environment5-3Memory 5The Power Hawk 610 uses 32-bit addresses for up to four gigabytes of virtual addressspace.Figure 5-1 dep

Page 310

Device Driver Programming5-4individually enable and disable them. It sends the resultant interrupt through the MPC105Bridge chip to the PowerPC 604 pr

Page 311

Power Hawk 610 Hardware Environment5-5Figure 5-2. Big Endian Bit and Byte NotationVME Addressing 5This section describes the characteristics of data

Page 312 - Use of Local Memory 17

ContentsviiContentsChapter 1 IntroductionFocus of Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 313 - MPA_CPU_VMELEV command;

Device Driver Programming5-6Address Modifiers 5For each data transfer on the VME bus, the bus master (either a processor or an I/O device)must identify

Page 314

Power Hawk 610 Hardware Environment5-7VME Devices as Bus Masters 5When a VME device addresses memory (or other VME sources), the VME device is thebus

Page 315 - P_SHMBIND

Device Driver Programming5-8• Invalid transfer• Nonexistent device addressed• Device correctly addressed but malfunctioningThe kernel tries to recogni

Page 316 - Reset the Device 17

Power Hawk 610 Hardware Environment5-9Bus Arbitration 5Busses that support multiple bus masters must provide a means of resolving the contentionof con

Page 317 - Debugging the Driver 17

Device Driver Programming5-10A system can use more than one of these options. By default, the system uses the straightslot priority scheme, wherein th

Page 318

Power Hawk 610 Hardware Environment5-11If two interrupt requests with the same interrupt level occur simultaneously on the VMEI/O bus, the system reso

Page 319

Device Driver Programming5-127. When the interrupt handler on the (H)VME bus forwards an interruptacknowledge to a processor, the low-level portion of

Page 320

6PowerMAXION Hardware EnvironmentSystem Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 321

Device Driver Programming

Page 322

6-16Chapter 6PowerMAXION Hardware Environment666This chapter provides hardware-specific information useful in developing device driversfor PowerMAXION

Page 323

Device Driver ProgrammingviiiConfiguration Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3Base Ad

Page 324

Device Driver Programming6-2Figure 6-1. Elements of a PowerMAXION Processor BoardCaches 6There are separate 16-Kbyte, four-way set-associative instru

Page 325 - Glossary

PowerMAXION Hardware Environment6-3tained in the hardware. Secondary data cache support is provided. Caches can be disabledin software. They can also

Page 326

Device Driver Programming6-4Byte-Ordering and Alignment 6The byte-ordering convention used in the PowerMAXION platform is Big Endian. In thismodel, th

Page 327

PowerMAXION Hardware Environment6-5Transfer Width Support 6For all non-block mode transfers, byte, word and long-word addresses are supported. Byteadd

Page 328

Device Driver Programming6-6VME Devices as VME Bus Slaves 6When a processor acts as bus master on the VME bus and addresses VME devices on theVME I/O

Page 329

PowerMAXION Hardware Environment6-7Bus Time-Out 6For each data transfer accessing a slave device, the VME bus provides a bus timer whichmeasures the d

Page 330

Device Driver Programming6-8A data transfer malfunction occurs when using an invalid address, address modifier, ortransfer on the bus. Another possibi

Page 331

PowerMAXION Hardware Environment6-9Bus Arbitration 6Because a bus provides the capability to support multiple bus masters, a means of resolv-ing the c

Page 332

Device Driver Programming6-10powerfail, 60 Hz clock, timers, real-time clocks, the console processor, serial or parallelport controllers, and so on. S

Page 333

PowerMAXION Hardware Environment6-11Interrupt Vector Generation and Configuration 6In hardware, the interrupt process functions as follows. On the VME

Page 334

ContentsixBuses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3Timers. . . . .

Page 335

Device Driver Programming6-12

Page 336 - Glossary-12

7Power Hawk 620/640 Hardware EnvironmentSystem Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 337

Device Driver Programming

Page 338 - STREAMS interface 2-6

7-17Chapter 7Power Hawk 620/640 Hardware Environment777The objective of this chapter is to give some background information to address hardwareissues

Page 339

Device Driver Programming7-2Figure 7-1. Elements of an Power Hawk 620 Processor BoardDRAMFLASHPowerPC604L2 Cache33MHz 32/64-BIT PCI LOCAL BUSFalconIS

Page 340

Power Hawk 620/640 Hardware Environment7-3Figure 7-2. Power Hawk 640 System Block DiagramBase BoardClockGeneratorDebug ConnectorMemory Expansion Conn

Page 341

Device Driver Programming7-4Processor Board 7Figure 7-1 and Figure 7-2 give an overview of the main architectural features of the PowerHawk 620/640 pr

Page 342

Power Hawk 620/640 Hardware Environment7-5Another bus on the Power Hawk systems is the local ISA bus, which is used tocommunicate with the serial and

Page 343

Device Driver Programming7-6Byte-Ordering and Alignment 7The byte-ordering convention used in the Power Hawk 620/640 platform is Big Endian.Inthis mod

Page 344

Power Hawk 620/640 Hardware Environment7-7VME Addressing 7The main objective of this section is to help comprehend the characteristics of datatransfer

Commentaires sur ces manuels

Pas de commentaire