TABLE 3-1User Flash Node Properties (Continued) (Continued)

Property

Description/Value

 

 

bank-size

00080000

model

SUNW,370-xxxx

version

version number

name

flashprom

compatible

isa-flashprom

reg

00000002 00000000 00100000

 

 

User Flash Device Files

The user flash device file is /dev/uflash0.

Interface (Header) File

The user flash header file is located in the following path:

/usr/platform/SUNW,Netra-CP2500/include/sys/uflash_if.h

Application Programming Interface

Access to the user flash device from the Solaris OS is through an application or user C program. No command-line tool is available. User programs open this device file and then issue read, write, or ioctl commands to use the user flash device.

The system calls are listed below in TABLE 3-2.

TABLE 3-2System Calls

Call

Description

 

 

read(), pread()

Reads device

pwrite()

Writes device

ioctl()

Erases device, queries device parameters

 

 

Chapter 3 User Flash 45

Page 59
Image 59
Sun Microsystems CP2500 Application Programming Interface, User Flash Device Files, Interface Header File, 2System Calls