Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
English
docs.sun.com Home
>
Driver Developer Site 1.0 AnswerBook
> Writing FCode 3.x Programs
Writing FCode 3.x Programs
Search only this book
Search Help
Contained Within
Driver Developer Site 1.0 AnswerBook
Find More Documentation
Browse Documentation Titles
Browse Product Documentation
Featured Support Resources
Sun Training Courses
BigAdmin System Admininstration Portal
Sun Support Center
Sun Solve
Download this book in PDF (806 KB)
Writing FCode 3.x Programs
Cover
Credits
Contents
Figures
Tables
Preface
1 SBus Cards and FCode
FCode PROM Format
Interpreting FCode
Device Identification
Creating and Executing FCode Definitions
2 PCI FCode Information
PCI FCode PROM Header Format
The PCI Expansion PROM Header Format
PCI Expansion PROM Data Structure Format
Format of Physical Address in " reg " Property
CPU PROM-Generated Properties
Adding a PCI Header to a PROM
3 Elements of FCode Programming
Colon Definitions
Stack Operations
Programming Style
Coding Style
A Minimal FCode Program
FCode Classes
Primitive FCode Functions
System FCode Functions
Interface FCode Functions
Local FCode Functions
4 Debugging and Testing FCode Programs
Packaging PCI FCode
System Flags and FCode Debugging
FCode Source
Tokenizing FCode Source
FCode Binary Format
Testing FCode Programs on the Target Machine
Configuring the Target Machine
Using the Command Line Editor of the Forth Monitor
Using the Forth Monitor to Test FCode Programs
Using dl to Load Forth Over Serial Port A
Using the Forth Monitor to Interpret an FCode Program
Using the Forth Monitor to Browse a Device Node
Using the Forth Monitor to Test a Device Driver
Testing FCode Programs in Source Form
Producing an FCode PROM
Exercising an Installed FCode PROM
select-dev -Generated Errors
5 Helpful Testing and Debugging Hints
Accessing a PCI Device's Configuration Space Registers
Base Address Register Setting
System Cache Line Size
Sun Ultra-30 UPA/PCI-Related Nodes
Finding and Using Physical Addresses
Controlling PCI Slot Probing on an Ultra-30 UPA/PCI System
Using 3.x Tokenizer and 3.x CPU PROMs
PCI Device Configuration Register Access
Boot Software Roles
Enabling Access to a PCI Device's Memory Space Locations
Expansion FCode PROM
Packaging Error with Ethernet FCode
6 Packages
Package Instances
Plug-in Device Drivers
Common Package Methods
Package Data Definitions
Instance Arguments and Parameters
Standard Support Packages
7 Properties
Standard FCode Properties
Detailed Descriptions of Standard Properties
Manipulating Properties
Property-Specific FCodes
8 Block and Byte Devices
Block Devices
Byte Devices
Required Methods
Required Properties
Device Driver Examples
9 Display Devices
Required Methods
Required Properties
Device Driver Examples
Complete Display Device Drive
10 Memory-Mapped Buses
Required Methods
SBus Addressing
SBus Required Properties
Device Driver Examples
11 Network Devices
Required Methods
Required Device Properties
Optional Device Properties
Device Driver Examples
12 Serial Devices
Required Methods
Required Properties
Device Driver Examples
Simple Serial FCode Program
13 PCI FCode Driver Example
14 FCode Dictionary
A FCode Reference
FCode Primitives
FCodes by Function
FCodes by Byte Value
FCodes by Name
B FCode Memory Allocation
C Coding Style
Typographic Conventions
Use of Spaces
if...then...else
do...loop
begin...while...repeat
begin...until...again
Block Comments
Stack Comments
Return Stack Comments
Numbers
D Differences Between FCode 2.x and 3.x
Index
credits_fr
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.