Microchip SXP 12g Firmware User Manual 388661
Microchip SXP 12g Firmware User Manual 388661
Introduction
The PM73206_04 firmware supports the following series of Microchip SXP 12G SAS expanders:
• PM8056 SXP 68x12G
• PM8055 SXP 48x12G
• PM8054 SXP 36x12G
• PM8053 SXP 24x12G
• PM8044 SXP 36Sx12G
• PM8043 SXP 24Sx12G
These devices are 68, 48, 36, 24, 36, and 24-port SAS expanders. The firmware release consists of a single firmware
code base to support the six devices above.
The PM73206_04 firmware is compatible with Microchip’s maxSAS 3 Gbit/s and 6 Gbit/s SAS expanders. The
standard MIPS processor that is integrated into each expander provides a platform for developing your Enclosure
Management Application (EMA).
The following table describes the part family and firmware naming:
Table 1. Part Family/Firmware Naming
This document refers to the PM8056 SXP 68x12G, PM8055 SXP 48x12G, PM8054 SXP 36x12G, PM8053 SXP
24x12G, PM8044 SXP 36Sx12G and PM8043 SXP 24Sx12G devices collectively as the “SXP 12G device”. Any
information that is unique to a device is explicitly stated.
Application
SES
SPC
Device-Specific Transport
Protocols
Signaling
State M achines
Hardware
State M achines
Physical Links
Figure 2 shows the host communicating with the expander device. When the firmware is used with the
PM2513/14/15/16/32-KIT SXP 24/36/48/68/36Sx12G Evaluation Kit [28], the host is represented by a PC. In your
own system, the PC is replaced by your host controller, and the peripherals on the Evaluation Kit are replaced by the
peripherals in the enclosure that you are developing.
The SXP combines the expander and EMA functions within a single-chip SOC unlike traditional EM implementations
where an external processor or a separate Storage Enclosure Processor (SEP) is used. The SXP communicates
with the host through TWI and UART, through SES commands over SAS transport, and on the SXP 12G/6G,
through Ethernet (PM805x devices only). Although the device supports out-of-band reporting, using the SAS
transport reduces the number of communication mechanisms, increases transaction speeds, and provides industry
standardization through SES.
Firmware Overview
The PM73206_04 firmware is extensible and provides a base for developing an Enclosure Management Application
tailored to your peripheral hardware configuration and enclosure control algorithm. The PM73206_04 firmware is
designed, verified, and validated for use in your system.
The PM73206_04 firmware comprises library functions, user-extensible functions, and examples. The following table
summarizes the components of the firmware and how you should use them.
Table 2. How to Use the SXP Firmware
Device Drivers Extensible Develop custom code around the provided drivers
EMA Example Example Develop custom code to meet your system requirements
Application Code Examples Example Develop custom code to meet your system requirements
1. Preface....................................................................................................................................................9
1.1. Scope........................................................................................................................................... 9
1.2. Section Summary......................................................................................................................... 9
1.3. Audience.................................................................................................................................... 10
1.4. Notation...................................................................................................................................... 10
1.5. References................................................................................................................................. 10
1.6. Glossary of Terms and Acronyms...............................................................................................11
2. Functional Description...........................................................................................................................13
2.1. High Speed Serial Interfaces......................................................................................................14
2.2. Processor Subsystem................................................................................................................ 15
2.3. Expander Port Interfaces............................................................................................................17
2.4. Initialization, Management, and Enclosure Services Support.................................................... 18
3. Firmware Architecture........................................................................................................................... 20
3.1. Firmware Modules......................................................................................................................20
3.2. Thread Decomposition............................................................................................................... 24
3.3. Firmware PHY Bitmap Type....................................................................................................... 24
5. Bootloader.............................................................................................................................................39
5.1. Simplified Bootloader................................................................................................................. 40
5.2. Power-On Self-Test (POST)....................................................................................................... 41
5.3. System Recovery in Bootloader................................................................................................. 41
5.4. Reset Event and NMI Handling.................................................................................................. 41
5.5. Bootloader User-Defined Hooks.................................................................................................43
7. Device Drivers.......................................................................................................................................93
7.1. Flash...........................................................................................................................................96
7.2. TWI........................................................................................................................................... 110
7.3. UART........................................................................................................................................125
7.4. SGPIO...................................................................................................................................... 130
7.5. GPIO........................................................................................................................................ 130
7.6. Ethernet....................................................................................................................................133
7.7. Real Time Clock (RTC) Driver..................................................................................................133
7.8. Application Timer Driver........................................................................................................... 134
7.9. MIPS 34Kc Hardware Abstraction APIs................................................................................... 137
Trademarks................................................................................................................................................ 489
1. Preface
1.1 Scope
The PM73206_04 SXP 12G software/firmware product is used with the SXP 12G evaluation kit. The SXP 12G
Firmware User Manual accompanies the SXP 12G firmware and describes peripheral drivers, the transport layer
protocols terminated by the firmware and upper layers of the protocol stack including the SCSI and EMA applications.
Section Summary
SXP Device Function Provides a brief functional overview of the primary blocks in the device.
Description
Firmware Download Introduces the firmware download mechanism and describes changes.
Mechanism
Initialization String Discusses both flash memory and the SEEPROM initialization string.
Run Time Service Library Introduces the watchdog thread, debugging thread, database, SGPIO, and
diagnostics.
Port Manager Component Includes a description of the Port Event Manager, topology discovery and spin up.
Reduced Functionality and Presents RF functionality in the SAS specification and the Microchip NDSR feature.
Non-I/O Disruptive Soft
Reset
Protocol Stack Library Introduces the SSP, SMP, and STP transport and port layer.
PHY and Power Discusses connection management, power management, and EPOW.
Management
Event Logging and Error Presents the event log format and APIs. Also describes the error handling method.
Handling
...........continued
Section Summary
Application Code examples Provides example code like TWImon and sxp_wks_evbd.gpj.
1.3 Audience
This manual is intended for firmware developers familiar with C code development, storage system protocols
including SCSI, and RTOS concepts, and who are using peripheral devices such as temperature sensors, SGPIO
and UARTs. Although this manual gives an overview of how the firmware uses certain protocols and peripherals,
readers should have a working understanding of the protocols shown in the References section.
1.4 Notation
The following are the typographic conventions used in this document.
Table 1-2. Notation
This_is_a_STATE State
1.5 References
The documents listed in this section are referred to throughout this user manual. If you require any of these
documents, contact Microchip.
1. Express Logic, Inc., ThreadX User Guide, Part Number 000-1001, Revision 5.0
2. MIPS Technologies, Inc., Programming MIPS32™ 34K™ Processor Cores Family, Document Number
MD00427, Revision 01.62, Oct 31, 2007
3. American National Standard, Information Technology – Serial Attached SCSI – 1.1 (SAS-1.1). Project
T10/1601-D, Revision 10, 21 September 2005
4. American National Standard, Information Technology – Serial Attached SCSI – 2 (SAS-2). Project T10/1760-D,
Revision 16, 18 April 2009
5. American National Standard, Information Technology – Serial Attached SCSI – 2.1 (SAS-2.1). Project
T10/2125-D, Revision 07, 9 Dec 2010
6. American National Standard, Information Technology – Serial Attached SCSI – 3 (SAS-3). Project T10/2212-D,
Revision 05, 31 Jan 2013
7. American National Standard, Information Technology – SAS Protocol Layer – 2 (SPL-2). Project T10/2228-D,
Revision 05, 10 May 2012
8. SFF Committee, SFF-8448 Specification for SAS Sideband Signal Assignments. Revision 0.5. 2 Sept 2005
9. SFF Committee, SFF-8485 Specification for Serial GPIO (SGPIO) Bus. Revision 0.7. 1 Feb 2006.
10. SFF Committee, SFF-8489 Specification for Serial GPIO IBPI. Revision 0.4 Nov 2011.
11. SFF Committee, SFF-8644 Specification for Mini Multilane 12 Gb/s 8/4X Shielded Connector. Revision 2.9. 9
Aug 2012.
12. Microchip, SXP 12G Endianness-related SDK Changes, PMC-2112390, Issue 1.
13. INCITS SCSI Primary Commands - 3 (SPC-3). Revision 23. May 4, 2005
14. INCITS SCSI Primary Commands - 4 (SPC-4). Revision 36f. March 11, 2013
15. INCITS SCSI Block Commands – 2 (SBC-2). Revision 16. November 13, 2004
16. INCITS SCSI-3 Enclosure Services Command Set 2 (SES-2). Revision 20. May 23, 2008
17. INCITS SCSI-3 Enclosure Services Command Set - 3(SES-3). Revision 05. November 20, 2012
18. INCITS SCSI Architecture Model - 2 (SAM-2). Revision 24. September 11, 2002
19. INCITS SCSI Architecture Model - 4 (SAM-4). Revision 14. May 8, 2011
20. INCITS SCSI Architecture Model - 5 (SAM-5). Revision 14. May 09, 2013
21. Serial ATA Working Group, Serial ATA: High Speed Serial ATA Attachment, Revision 1.0, August 2001
22. Serial ATA Working Group, Serial ATA II: Extensions to Serial ATA, Revision 1.0a, October 2002
23. Microchip, JTAG Application Note, Issue 1, document number PMC-2021518
24. Microchip, Storage Enclosure Processor (SEP) Firmware User Manual, PMC-2041947, Issue 8
25. Intel, Hewlett Packard, NEC, Dell, Intelligent Platform Management Bus Communications Protocol. V1.0.
November 15, 1999.
26. T10/05 – 144r7 SAS-2 zoning, September 7, 2005.
27. Microchip, SXP 24/36x6GSec Release 03 Firmware User Manual, Document Number PMC-2072115, Issue 9
28. Microchip, PM2513/14/15/16/32-KIT Product Brief, Document Number PMC-2120050, Issue 2
29. Microchip, PM8056 and PM8055 SXP 12G Hardware Specification, Document Number PMC-2111573, Issue 5
30. Microchip, SXP 68x12G Revision B - Chip Level Register Descriptions, Document Number PMC-2124090,
issue 2
31. Microchip, SXP 68x12G Engineering Validation Board Document, Document Number PMC-2112045, Issue 2.
Terms/Acronym Definition
BCT Back Channel Training, that is, SAS-3 PHY Transmitter Training
EM Enclosure Management
...........continued
Terms/Acronym Definition
2. Functional Description
This section provides a functional overview of the primary blocks in the device. It indicates what is done in the
hardware and firmware, and what parts of the hardware are programmable by the firmware. The firmware runs in the
MIPS core.
The following figure shows a simplified block diagram of the PM8056 SXP 68x12G device. The PM8056 is part of
Microchip’s 12G SAS expander family featuring SAS 3.0 T10 zoning, self-configuration, table-to-table routing, an
Ethernet port, and an integrated 34Kc MIPS processor with 1024 Kbytes scratchpad RAM for SES and enclosure
management support. For detail, refer to [29]. If there is any disagreement between this section and the Hardware
Specification document [29], the device design document should take precedence.
The block diagrams for the PM8055 SXP 48X12G, PM8054 SXP 36X12G, and PM8053 SXP 24X12G devices vary
by number of ports. PM8044 SXP 36SX12G and PM8043 SXP 24SX12G devices are the same as the device shown
in the block diagram, except port number differences and no Ethernet MAC and Local bus.
Figure 2-1. SXP 68x12G Block Diagram
Within the MIPS34Kc CPU subsystem is a memory controller that provides the logic for internal and external SRAM
and flash memory. The external local bus operates with a 16-bit data width. SXP 12G expanders support a 16-bit
flash memory device with optional inline ECC on the parallel flash. In addition, the memory controller provides a
Serial Peripheral Interface (SPI) to external serial memory. The SPI can operate in three modes:
• SPI (single lane)
• DSPI (dual lane)
• QSPI (four lane)
The SPI does not support inline ECC. The MIPS 34Kc boots from either 16-bit parallel flash or from the serial SPI,
depending on the device bootstrap pins settings.
The CPU subsystem includes four UART ports, one of which is provided for debugging support. Up to 81 GPIOs
are supported. Four serial GPIO interfaces are also provided. An Ethernet MAC with RMII/MII interface provides
management capability.
The SXP 12G expanders provide up to 12 hardware-based multi-master Two-Wire Interfaces (TWIs) for device
configuration and control of peripheral devices such as temperature sensors or NVRAM.
All target ports incorporate the STP bridge function allowing either a SAS or SATA target device to be attached.
The SXP 12G supports table routing of up to 4,096 entries shared across zones, direct routing and subtractive
routing methods. Centralized table routing enables each input port to view all 4,096 table entries for a single zone
configuration. A table-to-table routing feature is also provided. For multiple zones configuration, the per port table
entry visibility is dependent on the actual zoning configuration in ECMR. The SXP 12G non-blocking crossbar in the
data-path allows any port to any port connections including arbitrary wide port configurations within the same zone.
Access security or zoning configuration may be performed by standard SMP/SSP commands from a designated zone
manager or out-of-band through TWI or programmed directly into external flash memory attached to the device. The
SXP 12G supports up to 256 zones.
Statistics counters and performance monitoring logic provide comprehensive diagnostic and performance monitor
functions. Each link of the SXP 12G expanders incorporates line rate PRBS and CJPAT pattern generators and
checkers for link integrity diagnostics. Per link disparity and code error injection capability are also provided.
The remainder of this section describes the hardware platform on which the firmware runs.
DSPRAM 0xBC14_0000 0xBC14_7FFF 32 Kbytes MIPS 34Kc use this space for
DSPRAM
...........continued
Component Start Address End Address Size Description
2.2.4.2 GPIO
The SXP 12G supports up to 81 GPIO ports for PM805x devices and 62 GPIO ports for 804x devices. These ports
are separately configurable as input or output under software control. Some GPIOs share pins with an extra UART,
SGPIO and TWI.
2.2.4.4 RTC
The device implements one real time clock that is a 1 μs counter.
2.2.4.5 SGPIO
The SXP 12G provides four SFF-8485 SGPIO interfaces with timeslots for GPIO expansion over a standard four-
pin interface. Each SGPIO shares its pins with four TWI buses. Its configuration is compliant with the SFF-8448
specification for SAS Sideband Signal Assignments.
2.2.4.6 SPI
The SPI can connect a serial flash device to the SXP 12G. The SXP 12G can boot firmware from the SPI. The SPI
consists of a clock, SPI_CLK, a chip select, SPI_CSB, and SPIDATA [3:0]. The SPI operates in three modes listed as
follows.
• SPI mode (1 data lane)
• DSPI mode (2 data lanes)
• QSPI mode (4 data lanes)
The SPI interface operates at 18.75 MHz, 37.5 MHz, or 75 MHz. At bootup, the SPI interface defaults to SPI mode
and 18.75 MHz operation.
2.2.4.7 TWI
The SXP 12G TWI subsystem consists of a maximum of twelve independent master-slave ports that conform to the
Two-Wire protocol. Each TWI port has its own timing configuration.
Characteristics of this subsystem are:
• TWI hardware is responsible for TWI bus arbitration.
• TWI hardware handles TWI clock stretching.
• Each TWI bus has a dedicated TWI master instance and a dedicated TWI slave instance. The SXP 12G
supports simultaneous master and slave activity enabling efficient inter-expander communication over the TWI
bus.
• Efficient interrupt mechanism. Interrupts are generated when a transaction is completed.
• If a TWI port is configured as a slave, an external master can drive an SRSTB pin to generate a slave reset
interrupt to the SXP 12G TWI driver which performs a slave reset operation.
2.2.4.8 UART
The SXP 12G supports four instances of programmable Universal Asynchronous Receiver/Transmitter (UART)
compatible with the industry-standard 16550 interface. It serially receives and transmits data to a peripheral, modem
or data set. The SXP 12G contains registers to control the character length, baud rate, parity generation and
checking, and interrupt generation and uses standard RTS/CTS flow control.
2. The received OPEN requests are sent to the centralized ECM (Expander Connection Manager) block, which
implements the OPEN arbitration and partial pathway blocking prevention algorithm.
3. The SXP ports generate the arbitration response primitives according to the ECM arbitration status.
4. When the ports are connected, a full-duplex data path is set up to pass data and primitive Dwords (except STP
flow control primitives) between the ports.
5. The STP flow control terminates on each link with a flow control buffer of 32 Dwords of data after that port
transmits HOLD.
SXP ports contain link activity logic that generates link activity indication that firmware uses to drive the SGPIO LED
state machines.
• Disk Qualification
• TCP/IP
A 32-bit checksum field in the initialization stream provides a data integrity check during the writing of the initialization
data to the flash memory. If the checksum fails, the valid inactive initialization string is used. If an invalid configuration
is detected, expander ports are kept in the default ‘disabled’ state until an external host updates a new, valid
initialization string to the flash memory.
Optionally, parts of the initialization string that are expected to vary from one board to the next can be stored in a
serial EEPROM to facilitate the task of configuring the system.
The initialization string can be reliably and flexibly adjusted independently of the firmware image stored in the flash
memory because it resides in a separate partition.
3. Firmware Architecture
The following figure shows an overview of the PM73206_04 firmware. Each block represents a firmware component
except the bottom block which represents the SXP hardware. Shaded blocks represent supplied firmware and green
blocks represent firmware that you must develop or acquire.
The firmware components are briefly described in the following subsections.
Figure 3-1. PM73206_04 Firmware Modules
3.1.1 RTOS
Expresslogic ThreadX provides the services of a Real Time Operating System (RTOS). Express Logic ThreadX5.1-
ST for MIPS34Kc is provided in object form for use with the SXP and licensing of the library is provided through
Microchip Marketing Team.
3.1.5.1 Bootloader
The bootloader and the application code operate as separate applications within the firmware. (In this context,
“application code” means the PM73206_04 firmware components except the bootloader.)
An example bootloader module is provided to help you write your own. It demonstrates the typical tasks that the SXP
12G performs at boot time such as:
• Reset Event Handling (power-on, NMI, and so on)
• Power-on Self Test
• Firmware Application Image Management and Launching
The bootloader can use the features of the OSF if required, although a simple configuration may only require the
services of the startup environment provided by the C runtime library.
The bootloader selects one of two application code images to load. Loading the application code starts system
operation.
and updates its topology view and routing table if necessary. It also updates the routing tables of expanders that are
not self-configuring.
Command Function
satai smart_read_log <log_phy_id> <log_page_addrs> Issue a SMART Read Log command to a drive
#define PHY_MAP_ARRAY_LEN 3
typedef UINT32 PHYMAP_TYPE[PHY_MAP_ARRAY_LEN];
If using the PHY map, replace the application code with the following APIs:
Table 3-1. Bootup Sequence
Function Description
Bit Operations PHY_MAP_BIT_SET Sets corresponding PHY bit to 1 in PHY map
PHY_MAP_BIT_CLR Clears corresponding PHY bit to 0 in PHY map
PHY_MAP_BIT_GET Gets corresponding PHY bit value in PHY map
Map Operations PHY_MAP_AND operation:
phy_map_dst = phy_map_src1 & phy_map_src2;
PHY_MAP_OR operation:
phy_map_dst = phy_map_src1 | phy_map_src2;
PHY_MAP_AND_NOT operation:
phy_map_dst = phy_map_src1 & ~phy_map_src2;
PHY_MAP_CP operation:
phy_map_dst = phy_map_src;
PHY_MAP_AND_CONDITION operation:
(phy_map1 & phy_map2) == TRUE
PHY_MAP_CMP_EQ operation:
(phy_map1 == phy_map2) == TRUE
Can only compare if they are equal or not
PHY_MAP_CMP_G operation:
(phy_map1 > phy_map2) == TRUE
Checks whether phy_map1 is greater than phy_map2
PHY_MAP_BIT_NOT operation:
phy_map_dst = ~phy_map_src;
Header 0 to 7 ASCII Vendor ID The vendor ID is not checked except when the boot partition
is being accessed. In that case, the last four bytes must be
“BOOT” (uppercase only) for the partition to be unlocked.
11[1] HEX Final Image This field indicates whether the image is last image. In
bit combined image this field is set for the last image
11[0] HEX Signed image This field indicates whether the image is signed or not
bit
12 to 15 ASCII Firmware Rev This field is not used but should contain the firmware revision
of the code being downloaded.
16 to 19 HEX Firmware This field is used to check against the size of the destination
Length partition.
If the fw_length plus 8 bytes (for storing the CRC and
the length at the end of a partition) is greater than the
destination partition length, then fwdl_status_ptr is set to
FWDL_STATUS_HDR_INCORRECT.
If the total number of bytes received exceeds
this number, fwdl_status_ptr will be set to
FWDL_STATUS_LENGTH_INCORRECT. The final CRC
check is not to be performed until this exact number of bytes
has been received.
...........continued
Byte Data Field Name Field Description
Offset
Firmware 20 to 23 HEX Firmware This field is used to check the CRC of the data written
CRC32 to flash memory. The CRC is calculated using the same
Data
number of bytes as the specified firmware length (any
padding to the end of the partition is not included).
If the CRC check fails fwdl_status_ptr is set to
FWDL_STATUS_CRC_INCORRECT.
24 to 27 HEX Startup This field is not used, but should contain the value
Routine 0xBF000000.
Address
28 to n HEX Application This field contains the application data as a binary image.
Firmware One way to generate this file is to add the –memory option.
Data
HW_DOWNLOAD_ERR 0x6 Hardware download error – problem programming the flash memory
– download aborted
• On successful firmware download, the image length and 32-bit CRC are written to the last two 32-bit locations in
the flash partition.
• The bootloader reads the length from the partition, calculates the CRC-32 for the image, and compares the
result to the CRC stored in the partition.
...........continued
Flash Memory Logical Logical
Logical Size Description
Partition Start Address End Address
Once running firmware receives firmware image header, it checks whether firmware image authentication feature is
enabled or not. If authentication is enabled and received image is signed, intermediate hash will be calculated. Once
firmware receives all the packets, it calculates final hash value. The last 256 bytes will be the signature, once all the
256 bytes received, running firmware will decrypt the signature and compare the decrypted signature with calculated
hash. If the decrypted signature matches with calculated hash, it completes the firmware download otherwise returns
error.
Figure 4-5. Signed Firmware Image
If the signature verification fails, the downloaded image will not be activated, running firmware returns CRC incorrect
error and signature failure message on UART console.
Firmware authentication tool signimage [refer 4.5.4 Firmware Authentication Tools to Sign Firmware Image] will
modify these bits while signing the firmware image.
Keygen
USAGE: keygen <private key> <public key>
This tool will generate 2048-bit RSA key pair, tool will generate these keys randomly.
Signimage
USAGE: signimage <fw_image> <private key file> <signed_image_file>
This tool will modify byte 11 of firmware image header to indicate image is signed and final image, calculate hash
for entire image including firmware image header and sign calculated hash using RSAES-PKCS1-V1_5 encryption
algorithm.
Verifyimage
USAGE: verifyimage <signed_image>
This tool can be used to verify signed image before we download the image to expander, this helps whether key pair
used in signing and verification are correct.
5. Bootloader
The bootloader is a self-contained MIPS program that resides at the default boot partition for the MIPS processor in
the flash memory. The bootloader is the first software executed when the SXP device comes out of reset. To support
the MIPS34Kc core, the SXP 12G bootloader performs a set of core-level initializations including:
• Instruction cache and data cache initialization
• DSPRAM configuration
• Stack
• Cache
• DPRAM and SPRAM POST
• MMU/TLB initialization
The SDK provides a basic bootloader that you can extend for your application. With one mechanism it manages
two images and initialization strings stored within flash memory during runtime. The bootloader supports MMU/TLB
for enabling a virtual address-based firmware image to run from either of the main firmware image partitions. To
implement this, the 34Kc processor operates in Kernel mode. To avoid TLB miss, which could impact firmware
performance, a TLB entry with a 1M page mask is written into the JTLB. This maps a 2M physical space to a
2M virtual running space in KSEG2. The Bootloader source code can be extended to add more tests or image
downloads.
Options support booting from parallel flash memory with ECC enabled (PM805x devices only) and booting from SPI
flash memory. To speed up the boot procedure, the bootloader supports adjusting the SPI setting with Quad mode
and a 75 MHz SPI clock.
The Bootloader provides a skeleton of operations that brings the device from reset to application image execution.
The Bootloader incorporates user-defined hooks that customize handling of operations such as reset and power-
on-self-test errors. The grayed boxes in the Figure 5-1 show the user-defined hooks. Default examples of these
hooks are provided in the example Bootloader project. You can replace these hooks with your version. See Section
5.5 Bootloader User-Defined Hooks for detail on the user-defined hooks.
is updated for some reason, the bootloader must re-compile and may need to be updated in the device as well. This
may cause a failure when updating the bootloader.
In the SXP 12G, the initialization string updating mechanism is aligned with the main firmware image and uses
the toggle scheme after the initialization string is downloaded. In the bootloader procedure the toggling process is
removed to minimize code sharing with the main firmware. When the bootloader detects the active firmware image
with a CRC error, the bootloader then checks the inactive firmware image. If it is valid, it loads the inactive one and
leaves the boot CFG partition unchanged. The bootloader does not call the flash driver APIs. And the bootloader no
longer checks the initialization string CRC, which is processed in the main firmware now.
The bootloader shares the following code with the main firmware application code.
• The flash partition information, with header files and link scripts
• HAL interfaces
• SXP 12G registers definition
• Common utility code like CRC check, BUSIO functions, and PMCFW_ASSERT.
context and sets up run-time environment for the callback function. When the callback function returns, it restores the
context.
Figure 5-2. NMI Handling Flow
...........continued
NMI Source Description NMI ID NMI Handler Callback
Except WOL, all NMI sources are considered fatal errors. All callback functions are handled by the Customer Fatal
Error Handler. You can modify the handler to meet your specific needs. See section 17.6 Fatal Error Handling for
detail.
Function Description
boot_hook_reset_hdlr_wo_stack Reset handler without using the stack. Should handle reset caused by NMI
during stack POST.
boot_hook_stack_post_hdlr Handler called by stack POST function to handle the POST results.
boot_hook_reset_hdlr_w_stack Reset handler with stack available for use. Should handle all reset causes
not handled by boot_hook_reset_hdlr_wo_stack().
boot_hook_post_hdlr Handler called by memory and cache POST function to handle the POST
results.
boot_hook_image_validate_hdlr Handler called by boot image validation routine to handle the image
validation results.
5.5.1 boot_hook_gen_exc_hdlr
boot_hook_gen_exc_hdlr() is called by the boot-strapped general exception vector. This routine handles all
possible general exceptions when the processor is in boot-strapped mode (Status register BEV bit = 1). For example,
the default example of this hook reads the cause of exception from the Cause register and aborts.
Inputs None
Outputs None
Failure = None
5.5.2 boot_hook_reset_hdlr_wo_stack
boot_hook_reset_hdlr_wo_stack() is called by the reset vector after the cause of reset has been determined,
but before the stack is initialized. This hook handles the cause of reset so that if it returns, the reset sequence
can continue. If the reset is not caused by problems in the stack, the reset handling can be delayed until
boot_hook_reset_hdlr_w_stack().
Inputs reset_type Input value denoting cause of reset (soft reset, hard reset, or NMI)
Outputs None
Failure = None
5.5.3 boot_hook_stack_post_hdlr
boot_hook_stack_post_hdlr() is called by the stack POST routine to handle the results of stack POST so that
when it returns, the reset sequence can continue.
Outputs None
Failure = None
5.5.4 boot_hook_hw_init
boot_hook_hw_init() is called by the reset vector after stack POST. This routine performs the low-level hardware
initialization that must be completed during the reset vector. For example, the default example of this hook configures
the timing of parallel flash and SPI flash memory, and initializes DSPRAM.
Inputs reset_type Input value denoting cause of reset (soft reset, hard reset, or NMI)
Outputs None
Failure = None
5.5.5 boot_hook_reset_hdlr_w_stack
boot_hook_reset_hdlr_w_stack() is called by the reset vector after the cause of reset has
been determined and the stack is initialized. This hook handles the cause of reset not handled by
boot_hook_reset_hdlr_wo_stack() so that if it returns, the reset sequence can continue.
Inputs reset_type Input value denoting cause of reset (soft reset, hard reset, or NMI)
Outputs None
Returns Success = None
Failure = None
Side Effects None
Resource Available Registers, stack
5.5.6 boot_hook_post_hdlr
boot_hook_post_hdlr() is called by the memory and cache POST routine(s) to handle the results of memory
and cache POST when it returns, the reset sequence can continue.
Outputs None
Failure = None
5.5.7 boot_hook_main_start
boot_hook_main_start() is at the beginning of the Bootloader main() routine. This handle performs the
necessary initialization for the Bootloader image validation, image execution, to run.
Inputs None
Outputs None
Failure = None
Resource Available Registers, stack, RAM, global/static data/variables, cache, full C environment
5.5.8 boot_hook_image_validate_hdlr
boot_hook_image_validate_hdlr() is called by the Bootloader image validation routine to handle the results of
image validation. If this function returns, the Bootloader will continue execution by jumping to the start address of the
validated image.
Outputs None
Failure = None
6.1 Overview
The Operating System Functions (OSF) module is a set of wrappers built on top of the ThreadX kernel[1]. The OSF
enhances certain functions and limits the use of RTOS features to those verified and validated with the firmware. The
OSF functionality has two parts:
• OSF run-time services.
• OSF set-up services.
Figure 6-1. OSF Components
Application
OSF Set-Up
Services
Functions Description
System Initialization OSF system initialization. Must be called before any other OSF functions can be used.
User Memory Management Create memory pools, allocate and free buffers.
...........continued
Functions Description
Interrupt Control Enable and disable processor core interrupts; manage call back functions.
Framework
MBIC Interrupt Controller Enable or disable individual interrupts; assign priorities; manage interrupt vectors;
Framework acknowledge interrupts.
osf_sys_init ✓ ✗ ✗ ✗
osf_sys_timestamp_get ✓ ✓ ✓ ✓
osf_sys_timestamp_adj_set ✓ ✓ ✓ ✓
osf_thread_create ✓ ✓ ✗ ✗
osf_thread_sleep ✗ ✓ ✗ ✗
osf_thread_hndl_self ✗ ✓ ✗ ✗
osf_thread_num_max_get ✓ ✓ ✓ ✓
osf_mem_pool_create ✓ ✓ ✗ ✗
osf_mem_pool_alloc ✓1 ✓ ✓1 ✓1
osf_mem_pool_calloc ✓1 ✓ ✓1 ✓1
osf_mem_pool_free ✓ ✓ ✓ ✓
osf_mem_pool_num_free_buf_get ✓ ✓ ✓ ✓
osf_mbx_create ✓ ✓ ✗ ✗
osf_mbx_add ✓ ✓ ✗ ✗
osf_mbx_name_get ✓ ✓ ✗ ✗
...........continued
Function Initialization Threads Timers ISRs
osf_msg_header_fill ✓ ✓ ✓ ✓
osf_msg_send ✓1 ✓ ✓1 ✓1
osf_msg_recv ✓1 ✓ ✓1 ✓1
osf_sem_create ✓ ✓ ✗ ✗
osf_sem_delete ✗ ✓ ✗ ✗
osf_sem_put ✓ ✓ ✓ ✓
osf_sem_get ✓1 ✓ ✓1 ✓1
osf_mtx_create ✓ ✓ ✗ ✗
osf_mtx_delete ✗ ✓ ✗ ✗
osf_mtx_get ✓1 ✓ ✗ ✗
osf_mtx_put ✓ ✓ ✗ ✗
osf_int_global_disable ✓2 ✓ ✓ ✓3
osf_int_global_enable ✓4 ✓ ✓ ✓5
osf_int_global_restore ✓6 ✓ ✓ ✓7
osf_int_isr ✗ ✗ ✗ ✓8
osf_tmr_create ✓ ✓ ✗ ✗
osf_tmr_delete ✗ ✓ ✗ ✗
osf_tmr_start ✓ ✓ ✓ ✓
osf_tmr_stop ✓ ✓ ✓ ✓
osf_tmr_period_change ✗ ✓ ✗ ✓
osf_tmr_period_get ✓ ✓ ✓ ✓
osf_time_ticks_get ✓ ✓ ✓ ✓
osf_time_diff ✓ ✓ ✓ ✓
osf_time_ms_to_ticks ✓ ✓ ✓ ✓
osf_time_ticks_to_ms ✓ ✓ ✓ ✓
osf_time_s_to_ticks ✓ ✓ ✓ ✓
osf_time_ticks_to_s ✓ ✓ ✓ ✓
osf_log_event_filter_set ✓ ✓ ✓ ✓
osf_log_event_filter_clear ✓ ✓ ✓ ✓
osf_log_word1_filter_set ✓ ✓ ✓ ✓
osf_log_word1_filter_get ✓ ✓ ✓ ✓
...........continued
Function Initialization Threads Timers ISRs
osf_log_app_event ✓ ✓ ✓ ✓
osf_log_fatal_event ✓ ✓ ✓ ✓
osf_log_app_ipmi_event ✓ ✓ ✓ ✓
osf_log_app_clear ✓ ✓ ✓ ✓
osf_log_app_read ✓ ✓ ✓ ✓
osf_log_app_raw_write ✓ ✓ ✓ ✓
Notes:
1. Only non-blocking calls allowed (that is, timeout option must be OSF_WAIT_NONE.)
2. Interrupts will stay disabled during initialization regardless of calling this function as the interrupt masks remain
cleared.
3. Interrupts will stay disabled inside an ISR regardless of calling this function as the Status(EXL) bit remains set.
4. Interrupts will stay disabled during initialization regardless of calling this function as the interrupt masks remain
cleared.
5. Interrupts will stay disabled inside an ISR regardless of calling this function as the Status(EXL) bit remains set.
6. Interrupts will stay disabled during initialization regardless of calling this function as the interrupt masks remain
cleared.
7. Interrupts will stay disabled inside an ISR regardless of calling this function as the Status(EXL) bit remains set.
8. This function should be called by exception vectors only.
Function Description
osf_sys_init OSF system initialization. Must be called before any OSF functions can
be used.
6.2.1.1 osf_sys_init
You must call osf_sys_init()before you can use any OSF services. In the case of ThreadX , this function must
be the first OSF function called in tx_application_define(). When you call this function, pass it a pointer to
the system free memory and a user-configured osf_sys_cfg_struct.The osf_sys_cfg_struct contains OSF
system configuration information such as the total number of mailboxes, threads, memory pools, logs and log sizes in
the system. The OSF takes over the system free memory, allocates control structures for all the mailboxes, threads,
and memory pools and logs the application log memory in the system, if needed. See Section 6.2.2 Data Structures
for more information on osf_sys_cfg_struct.
At this point, the object control structures are un-initialized. The object control structures are initialized when you call
the corresponding osf_xxx_create() functions.
Outputs None
6.2.1.2 osf_sys_timestamp_get
The osf_sys_timestamp_get() function returns the current 64-bit system time in terms of the OSF system timer
ticks. osf_time_ticks_to_s() must be used to convert the returned current system time (in system timer ticks)
to the time (in seconds).
Inputs None
Outputs None
Returns Success = Number of timer ticks since reset + constant offset set by user.
Failure =
6.2.1.3 osf_sys_timestamp_adj_set
The osf_sys_timestamp_adj_set() function sets a constant adjustment to the 64-bit system time in terms of the
OSF system timer ticks. osf_time_s_to_ticks() must be used to convert a constant adjustment from the time
(in seconds) to the system timer ticks for use in this function.
Inputs adj Constant adjustment to the 64-bit system time in terms of system timer
ticks
Outputs None
Returns Success =
Failure =
/***************************************************************************
* STRUCTURE: osf_sys_cfg_struct * System structure controlling all OSF configuration
parameters.
*
* ELEMENTS: * app_log_size - Application log size (in number of bytes)
* desired_tmr_period_ms - Desired system timer period in ms.
* num_threads - Total number of threads in the system.
* num_mem_pools - Total number of memory pools in the system.
* num_mbx - Total number of mailboxes in the system.
* log_cfg - Logging configuration for the system
* app_log_addr - Logging saving start address
**************************************************************************/
typedef struct
{
UINT32 app_log_size;
UINT32 desired_tmr_period_ms;
UINT16 num_threads;
UINT16 num_mem_pools;
UINT16 num_mbx;
osf_log_cfg_enum log_cfg;
void *app_log_addr;
} osf_sys_cfg_struct;
6.2.3 Architecture
Each OSF service (messaging, memory, mutexes, and so on.) has one or more system control structures or
parameters. Those structures and parameters are allocated by and are internal to the OSF. These structures and
parameters are statically allocated inside each OSF file.
Some OSF services have object control structures for referencing the OSF object. These object control structures
can be divided into two categories:
1. Control structures for which OSF internally allocates memory, such as memory pools, mailboxes, and threads.
Use handles to reference these OSF objects.
2. Control structures that you allocate, such as timers, mutexes, and semaphores. You determine whether these
OSF control structures are statically or dynamically allocated, and you refer to them directly.
Regardless of how the OSF object control structures are allocated, only the OSF is allowed to modify them.
When you initialize the system using osf_sys_init(), you specify the total number of objects in category 1. The
OSF then allocates memory for the object control structures in category 1 from the system memory.
The system memory is a single block of memory passed into OSF at system initialization. In the ThreadX case, this
memory is the “. free_mem” section defined in the linker command file. ThreadX passes the start address of the “.
free_mem” to tx_application_define(), that passes this address to osf_sys_init(). OSF then takes over
control of its usage.
Memory is allocated sequentially from the system memory block as long as there is sufficient free memory. For
non-aligned address memory allocation, the memory allocated starts at the next free memory address. For aligned
memory allocation, the memory allocated starts at the next free memory address that matches the alignment
requirement.
users. This memory is grouped into memory pools and is reusable. Each memory pool maintains several buffers of
the same size. The buffers can be allocated and freed during program execution and reused by different objects in
the program. Buffer size and the number of buffers may differ from pool to pool and are configured at instantiation.
Currently, the OSF does not support the priority memory allocation feature of ThreadX. All memory allocation is
based on FIFO order.
Function Description
Use osf_sys_init() to specify the maximum number of memory pools in the system. OSF allocates memory for
the corresponding number of memory pool control structures. At this point, the memory pool control structures are
un-initialized.
6.3.1.1 osf_mem_pool_create
After calling osf_sys_init(), call osf_mem_pool_create() to create a memory pool. If there is sufficient system
memory, OSF allocates memory for the number of buffers in the specified size for the pool, and assigns one of the
memory pool control structures allocated by osf_sys_init() for this memory pool. OSF returns a handle to the
memory pool control structure.
The firmware uses osf_mem_pool_create() and osf_mem_pool_alloc() to allocate fixed blocks of RAM
for inter-thread messaging at system start. This ensures that any memory allocation problems occur at system
start-up rather than midway through the application, simplifying error handling and improving the robustness of the
application. During run-time, a message can be sent to another thread only if there is room within the pre-allocated
block. If the destination thread runs out of space in its message block, it is being overloaded. The application must
provide a throttling mechanism to resolve this condition.
Outputs None
Failure = OSF_ERR_FAIL
OSF_ERR_OUT_OF_RESOURCE
6.3.1.2 osf_mem_pool_alloc
Use osf_mem_pool_alloc() and the memory pool handle returned by osf_mem_pool_create() to allocate
buffers from the memory pool. OSF assigns the pointer to the allocated buffer to your input double pointer. If statistics
event logging is enabled, osf_mem_pool_alloc() logs a statistics event if the number of free buffers in a pool
reaches a new minimum after a buffer is allocated from that pool.
Ensure that the buffer size from the specified pool meets the memory allocation requirement. OSF will assert if the
required buffer size is larger than the buffer size for the specified memory pool.
A timeout value is specified for allocating buffers from the memory pool. Valid timeout values are:
• OSF_WAIT_NONE: Attempt to allocate a buffer and return right away.
• OSF_WAIT_FOREVER: Wait until a buffer is allocated. Thread is suspended while waiting.
• Finite value: Wait until the buffer is allocated, or the finite timeout period expires. Thread is suspended while
waiting. The valid timeout period is from OSF_WAIT_MIN to OSF_WAIT_MAX timer ticks.
The firmware uses osf_mem_pool_create() and osf_mem_pool_alloc() to allocate fixed blocks of RAM
for inter-thread messaging at system start. This ensures that any memory allocation problems occur at system
start-up rather than midway through the application, simplifying error handling and improving the robustness of the
application. During run-time, a message can be sent to another thread only if there is room within the pre-allocated
block. If the destination thread runs out of space in its message block, it is being overloaded. The application should
provide a throttling mechanism to resolve this condition.
Note: Each buffer in the pool will be aligned to a sizeof(void *) boundary.
Failure = OSF_ERR_FAIL
OSF_ERR_OUT_OF_RESOURCE
OSF_ERR_TIMEOUT
6.3.1.3 osf_mem_pool_calloc
Similar to osf_mem_pool_alloc()except that the allocated buffers are cleared to 0.
Failure = OSF_ERR_FAIL
OSF_ERR_OUT_OF_RESOURCE
OSF_ERR_TIMEOUT
6.3.1.4 osf_mem_pool_free
Buffers are freed using the osf_mem_pool_free() function. To prevent you from using the buffer after it has been
freed, OSF takes over the buffer by overwriting your double pointer to it.
6.3.1.5 osf_mem_pool_num_free_buf_get
osf_mem_pool_num_free_buf_get() provides the current count of available buffers in the memory pool.
Outputs None
6.3.2.1 osf_mem_pool_hndl
The OSF returns a handle to the memory pool, osf_mem_pool_hndle, when a memory pool has been successfully
created.
typedef void *osf_mem_pool_hndl;
6.3.3 Example
You should use double pointers in allocating and freeing memory. The following example shows the use of the
Memory Management functions for allocating and freeing memory.
void *msg_ptr;
thread1_msg_union *recv_msg_ptr;
rc = osf_mem_pool_alloc(thr_ptr->pool_hndl,
sizeof(thread1_thread2_ping_msg_struct),
&msg_ptr,
OSF_WAIT_FOREVER);
osf_mem_pool_free((void **)&recv_msg_ptr);
6.3.4 Architecture
The following figure shows the memory allocation for the memory pools.
Figure 6-2. Memory Pool Allocation Architecture
array of m em ory pool control structures, one for each Allocated by OSF in
m em ory pool osf_sys_init()
Allocated by OSF in
m em ory pool A, ...... m em ory pool N, osf_m em _pool_create()
m em ory grouped m em ory grouped
into buffers into buffers
6.4 Threads
The OSF module supports preemptive multi-threading. The OSF thread functions are mainly wrappers for the
ThreadX functions. You assign a priority to each thread. The valid range is from OSF_THREAD_PRIO_HIGHEST to
OSF_THREAD_PRIO_LOWEST and each thread must have a unique priority. The time-slicing capability of ThreadX is
not used. All threads are configured to start immediately when the scheduler starts running.
Note that the OSF threads maintain the Status Register (SR) state as part of their thread context. When a thread gets
pre-empted, the SR state is stored. When the thread resumes, the SR is restored to the stored state.
Function Description
osf_thread_create Creates a thread specifying the stack size, entry function and entry function
input.
osf_thread_sleep Suspends the execution of the current task for a given number of ticks.
Use osf_sys_init() to specify the maximum number of threads in the system. OSF allocates the corresponding
number of thread control structures. At this point, the thread control structures are un-initialized.
6.4.1.1 osf_thread_create
After initialization, call osf_thread_create() to create a thread. Each thread has its own stack that is allocated
by OSF during osf_thread_create(). If there is sufficient system memory, OSF allocates the specified amount of
memory for the thread stack, and assigns one of the thread control structures allocated by osf_sys_init() for this
thread. osf_thread_create() returns a handle to the created thread.
*entry_ function (Pointer to) thread entry function. This is the application defined function
called when the thread starts.
Outputs None
6.4.1.2 osf_thread_sleep
While the thread is executing, you can call osf_thread_sleep() to suspend its execution for a given number
of system timer ticks. Use the osf_time_ms_to_ticks() function (see Section 6.7 Timers) to convert a sleep
duration from milliseconds to ticks, as the underlying system timer tick duration may change for different platforms.
Outputs None
6.4.1.3 osf_thread_hndl_self
osf_thread_hndl_self() returns the thread handle of the currently executing thread. If this function is being
called from a non-thread, the handle returned will be that of the last executing thread.
Inputs None
Outputs None
Failure =
6.4.1.4 osf_thread_num_max_get
osf_thread_num_max_get() returns the maximum number of threads in the system. This is the value of the
number of threads in the system passed to OSF in osf_sys_init() by the user.
Inputs None
Outputs None
Failure =
6.4.2.1 osf_thr_hndl
OSF returns a handle to the thread object, osf_thr_hndl, when a thread has been successfully created:
typedef void *osf_thr_hndl;
6.4.3 States
For all normal execution, threads in this system will be in one of these states:
• Thread sleeping, due to osf_thread_sleep().
• Thread blocking, due to a blocking OSF call to currently unavailable OSF resources.
• Thread running.
Note: Currently, OSF does not support the ThreadX thread services of suspension, resumption, termination, deletion,
priority, or preemption threshold changes.
6.4.4 Architecture
The following figure shows the memory allocation for the thread control structures and the thread stacks.
Figure 6-3. Memory Allocation Across Threads
osf system thread control
Statically allocated in the
structures and param eters
osf_thr.c file
Allocated by OSF in
array of thread control structures, one for each thread
osf_sys_init()
Allocated by OSF in
...... osf_thread_create()
thread stack A thread stack N
6.5 Messaging
Threads exchange data and event notifications by sending messages to the mailbox of the recipient thread. For
normal systems, each thread is associated with one mailbox.
Each mailbox supports up to osf_msg_prio_num message priorities. Messages are received first in order of priority,
then in order of arrival.
When a message is sent, it is copied to a mail slot in the mailbox, and copied out when the message is received.
To reduce the amount of copying, each message slot is one word (32 bits) long. The message must be a pointer to
point to an allocated buffer. The sender thread allocates a message buffer, fills the message buffer with its message,
and sends a pointer to point to this message buffer to the recipient’s message queue. Once the message has been
successfully sent to the recipient’s message queue, OSF changes the input pointer to point to NULL to prevent the
sender from modifying the buffer. The recipient thread must free the message buffer.
All messages must be prepended with a standard message header by including osf_msg_header_struct as the
first element of all message structures.
To improve memory efficiency despite variations in message payload sizes, the message buffers should be large
enough for normal message types but insufficient for large amounts of data. For message payloads that include large
amounts of data, allocate a separate data buffer for the data, and put a pointer to it in the message structure that will
reside in the message buffer. See Section 6.3 User Memory Management for more detail on memory buffers.
Function Description
osf_mbx_create Creates a mailbox specifying the message priority and number of messages for this
priority.
Osf_mbx_add Adds a message priority to a previously created mailbox, specifying the number of
messages for this priority.
Osf_msg_header_fill Fills the required information into the input message header structure.
...........continued
Function Description
osf_msg_recv Receives a message from the specified mailbox at priority then arrival order.
Use osf_sys_init() to specify the maximum number of mailboxes in the system. OSF allocates the corresponding
number of mailbox control structures. At this point, the mailbox control structures are un-initialized.
6.5.1.1 Osf_mbx_create
After initialization, call osf_mbx_create() to create a mailbox. If there is sufficient system memory, OSF allocates
the specified amount of memory for the messages at the specified priority for this mailbox, and assigns one of the
mailbox control structures allocated by osf_sys_init() for this mailbox. The function returns a handle to the
created mailbox. Use this handle to add message priority to the mailbox and to send and receive messages from the
mailbox.
Outputs None
Failure = OSF_ERR_FAIL
OSF_ERR_OUT_OF_RESOURCE
6.5.1.2 osf_mbx_add
If you need to implement message priority, call osf_mbx_add() to add a message priority (and the number of
messages for this priority) to the mailbox you created.
Outputs None
6.5.1.3 osf_msg_header_fill
Before sending a message, you must allocate a buffer (see Section 6.3 User Memory Management) and fill out the
header structure using osf_msg_header_fill().
Failure = OSF_ERR_FAIL
OSF_ERR_OUT_OF_RESOURCE
6.5.1.4 osf_msg_send
Once the buffer has been allocated and the header structure filled out, use osf_msg_send() to send messages to
another thread at the thread’s mailbox. To prevent you from using the buffer after the message has been sent, OSF
takes over the buffer by overwriting your double pointer to it. If statistics event logging is enabled, osf_msg_send()
logs a statistics event if the number of free message slots for the specified message priority in the mailbox reaches a
new minimum after a message is sent to the mailbox at that priority.
A timeout value is specified for sending messages from the queue. Valid timeout values are:
• OSF_WAIT_NONE: Send and return right away. 1
• OSF_WAIT_FOREVER: Wait indefinitely until the message is sent. Thread is suspended while waiting.
• Finite value: Wait until the message is sent, or the finite timeout period expires. Thread is suspended while
waiting. The valid timeout period is from OSF_WAIT_MIN to OSF_WAIT_MAX timer ticks.
Outputs msg_pptr Pointer to message buffer updated to NULL if message is sent successfully
Pointer unchanged if message send failed
Failure = OSF_ERR_TIMEOUT
Assert and never return if wait_option = OSF_WAIT_NONE.
Note: For PM73207 B005 and earlier releases, osf_msg_send() aborts if the message send or receive fails with this
non-blocking option.
6.5.1.5 Osf_msg_recv
The recipient thread reads the messages from its associated mailbox by using osf_msg_recv(). The messages
are read first in order of priority, then in order of arrival. After processing the information in the message, the recipient
must free the buffer allocated for the message.
A timeout value is specified for receiving messages from the queue. Valid timeout values are:
• OSF_WAIT_NONE: Send or receive and return right away.
• OSF_WAIT_FOREVER: Wait until the message is sent or a message is received. Thread is suspended while
waiting.
• Finite value: Wait until the message is sent or a message is received, or the finite timeout period expires. Thread
is suspended while waiting. Valid timeout period is from OSF_WAIT_MIN to OSF_WAIT_MAX timer ticks.
Failure = OSF_ERR_TIMEOUT
6.5.2.2 osf_msg_header_struct
All message structures in the system must have osf_msg_header_struct as their first element.
/***************************************************************************
* STRUCTURE: osf_msg_header_struct
* Structure defining the first elements of all application
* inter-task messages.
*
* ELEMENTS:
* msg_type - Message type.
* recipient - Recipient message queue information.
* sender - Sender message queue information.
**************************************************************************/
typedef struct
{
UINT32 msg_type;
osf_mq_info_struct recipient;
osf_mq_info_struct sender;
} osf_msg_header_struct;
osf_msg_header_struct contains all the information required to send and decode a message. If the message is
sent from a thread with a valid mailbox, the recipient can use the sender information to reply to the sender.
6.5.2.3 Osf_mq_info_struct
The sender and recipient information are defined in osf_mq_info_struct:
/***************************************************************************
* STRUCTURE: osf_mq_info_struct
* Structure containing information to identify a message queue.
*
* ELEMENTS:
* mbx_hndl - Handle to mailbox
* msg_prio - Message priority
*
* NOTE:
* - “=” is going to be used to copy sender info to recipient info and
* vice versa.
* - Elements must NOT be an array, have an incomplete type, or be a function.
****************************************************************************/
typedef struct
{
osf_mbx_hndl mbx_hndl;
osf_msg_prio_enum msg_prio;
} osf_mq_info_struct;
6.5.2.4 msg_type
Use this macro to define the message type, msg_type:
OSF_MSG_TYPE_CREATE(module_id, msg_suffix)
Use the following two macros to extract the module and message suffix information from a message type:
OSF_MSG_MODULE_GET(msg_type)
OSF_MSG_SUFFIX_GET(msg_type)
6.5.3 Architecture
ThreadX does not support priority messaging. To implement priority messaging, OSF creates multiple message
queues in each mailbox. One message queue corresponds to a message priority. The message queues are read
based on priority order.
The following figure shows the memory allocation for the thread control structures and the thread stacks.
To create a mailbox, call osf_mbx_create()first to initialize the mailbox control structure. OSF allocates a
message queue at the specified priority (one of osf_msg_prio_enum) if there is sufficient system memory. If the
mailbox must support more than one message priority, call osf_mbx_add() specifying a different message priority
than that specified in osf_msg_prio_enum. If there is sufficient system memory, OSF allocates memory for the
second message queue and associates it with the previously-created mailbox.
6.6 Logging
OSF provides logging capability with an OSF log and an optional application log. Event logging in the OSF wrapper
APIs is enhanced with logging ThreadX error codes in Microchip Application logs. The logs are circularly indexed so
that the oldest log entries are replaced by the newest log entries.
Log entries include OSF transactions such as message send and receive, buffer allocation, statistics events such as
memory pool reaching new minimum headroom, and fatal events logged before the firmware asserts.
The log entry format is listed as follows.
Table 6-7. Format of Event Log Entry
16-bit 4-bit log event type 9-bit log sub-type 3-bit num words in log
TX_EL_USER_EVENT (osf_log_event_enum) entry
(osf_log_sub_type_enum
(= 4)
)
32-bit currently executing thread pointer (if logging from an interrupt, the thread pointer will be that of the last
executing thread)
32-bit log word 1 (must be in the format [16-bit module ID | 16-bit user defined field])
3 SEQUENCE NUMBER
5 LOG WORD 2
6 LOG WORD 3
7 LOG WORD 4
At compile time, configure the system to use only the OSF log or both the OSF and application logs by calling
osf_sys_init() (log_cfg in osf_cfg_struct). The OSF log size is determined by the size of the “.
Eventlog” section in the linker directive files. Configure the application log size by calling osf_sys_init()
(app_log_size in osf_cfg_struct).
At runtime, enable or disable logging for both logs by configuring the log filters.
OSF provides configuration capability for log filtering based on the event type and log_word1 (applicable to
application log only).
The known set of log words in the system is listed as follows.
Table 6-9. Known Event Logging Codes
Code Description
...........continued
Code Description
Function Description
osf_log_event_filter_set Sets filter for the specified log event(s). The specified event(s) will not
be logged.
Osf_log_event_filter_clear Clears filter for the specified log event(s). The specified event(s) will be
logged.
osf_log_word1_filter_set Sets filter base on log_word1 (for use with application events only).
When you initialize the system using osf_sys_init(), specify whether the optional application log is enabled in
addition to the OSF log (in osf_log_cfg_enum). If the application log is supported, OSF will allocate the specified
amount of memory for the application log if it is available.
6.6.1.1 Osf_log_event_filter_set
Call osf_log_event_filter_set()with the OSF_LOG_FILTER_XXX combinations (defined in osf. H) as required
to configure which events will be logged.
Outputs None
Failure = None
6.6.1.2 osf_log_event_filter_clear
Call osf_log_event_filter_clear() with the OSF_LOG_FILTER_XXX combinations (defined in osf. H) as
required to configure which events will be logged.
Outputs None
Failure = None
6.6.1.3 osf_log_app_sev_filter_level_set
Set the global application severity level.
Outputs None
Failure = None
6.6.1.4 osf_log_app_sev_filter_level_get
Get the global application severity level.
Outputs None
Failure = None
6.6.1.5 osf_log_word1_filter_set
Additional filtering based on log words 1 (for application events only) is provided through
osf_log_word1_filter_set().
Mask Mask applied to log_word1 and pattern defining the portion of log_word1
used in the filtering.
type Type of filter defining whether a match in the masked pattern and masked
log_word1 means filtering the entry in, out or does not matter.
Outputs None
Failure = None
6.6.1.6 osf_log_word1_filter_get
Returns a copy of the bank of filters for log word 1.
Outputs None
Failure = None
6.6.1.7 osf_log_app_event
Use osf_log_app_event() to log application events.
Outputs None
6.6.1.8 osf_log_fatal_event
Use osf_log_fatal_event() to log fatal error events. If the number of log words (num_words) exceeds the
maximum allowable log words, this function saturates num_words to the maximum number of allowable log words
before logging the event.
Outputs None
Failure = None
6.6.1.9 osf_log_app_ipmi_event
Use osf_log_app_ipmi_event() to log application IPMI events.
sensor_type Sensor Type Code for sensor that generated the event.
Event_data1 Per IPMI Event Request Message Event Data Field Contents for Data 1.
Event_data2 Per IPMI Event Request Message Event Data Field Contents for Data 2.
Event_data3 Per IPMI Event Request Message Event Data Field Contents for Data 3.
Outputs None
6.6.1.10 osf_log_app_clear
Call osf_log_app_clear() to clear the application log.
Inputs None
Outputs None
Failure = None
6.6.1.11 osf_log_app_read
Use osf_log_app_read() to read an entry from the application log.
The read is “destructive”, that is, an entry can only be read once.
Inputs None
Num_missed_entr Number of unread entries missed since the last read, if read is successful.
ies_ptr
Failure = OSF_ERR_LOG_EMPTY
6.6.1.12 osf_log_app_raw_write
Use osf_log_app_raw_write() to write a raw entry to the application log.
A raw entry means that the entry will be written as is, with no additional formatting or information added. Make sure
that the raw entry conforms to the application log format.
Outputs None
Failure = None
6.6.1.13 osf_log_get_entry_params
Get the application log parameters.
Start_entry
entry_ptr
entry_size
max_entries
Outputs None
Failure = None
6.6.2 States
The OSF logging can be in two states:
• Enabled – Events that are not filtered out will be logged; or
6.6.3 Architecture
The OSF log uses the ThreadX Event Analyzer log. All ThreadX-generated log entries are logged into the Event
Analyzer log. OSF-added entries are logged as user-inserted events.
If the application log is enabled, it is allocated by OSF in osf_sys_init(). If you have enabled the application log,
application events (including application IPMI events) that are not filtered out will be directed to both the OSF log and
the application log.
Both logs are a memory block used as a circular buffer where the oldest entries will be overwritten by newer entries.
6.7 Timers
OSF provides the system time and the ability to create, set, change and delete the application timers. The system
time is a 32-bit value which reflects the number of system hardware timer ticks since power up. System time wraps
around when it reaches its maximum. See Section 6.7.3 System Hardware Timer Operation for more detail on
system hardware timer operation and guidelines on setting up the system timer period.
Application timers can be one-shot timers or period timers. The expiration characteristics of a timer include an initial
expiration tick count and a reschedule tick count. When a timer is first started, the first expiry is the initial expiration
tick count. If the reschedule tick count is 0, this is a one-shot timer and the timer will not go off again. If the
reschedule tick count is non-zero, the timer will be reloaded with the reschedule tick count and expire periodically.
The timer expiration characteristics are specified in terms of system timer ticks. However, use the time-to-timer-tick
conversion functions provided by OSF as the underlying system timer resolution may change.
You must manage the memory yourself for timer control structures and for timer creation and deletion.
Note that if you want to restart a one-shot timer, you must perform the following sequence:
1. Stop the timer using osf_tmr_stop().
1. Refresh the timer period through osf_tmr_period_change().
2. Restart the timer again using osf_tmr_start().
Function Description
Osf_tmr_period_change Changes the expiration characteristics of a previously created and stopped timer.
Osf_time_diff Calculates the time difference between the two input times. Can handle one
wrap-around between the two times.
Osf_time_ms_to_ticks Converts the input time in milliseconds to the equivalent number of system timer
ticks
osf_time_ticks_to_ms Converts the input system timer ticks to the equivalent time in milliseconds.
...........continued
Function Description
Osf_time_s_to_ticks Converts the input time in seconds to the equivalent number of 64-bit system
timer ticks
osf_time_ticks_to_s Converts the input 64-bit system timer ticks to the equivalent time in seconds.
6.7.1.1 osf_tmr_create
To create an application timer, allocate a timer control structure, osf_tmr_struct, and pass a pointer to it to
osf_tmr_create(). The timer is in non-active state after creation. User must call osf_tmr_start() to start the
timer.
Note that the initial timer expiry will be (initial_ticks - 1) to (initial_ticks) from the current time. This
is because the next timer expiry will be (initial_ticks) away from the current time but we may be (0) to
(one system timer period) away from the next timer tick. If the initial expiry must be at least N timer ticks away,
initial_ticks should be N+1. E. g. use
osf_time_ms_to_ticks(required time in ms) + 1
instead of
osf_time_ms_to_ticks(required time in ms)
to ensure that the initial timer expiry will be at least (required time in ms) away.
Outputs None
6.7.1.2 osf_tmr_delete
Use this function to delete an application timer.
Outputs None
6.7.1.3 osf_tmr_start
OSF does not support auto-activation of ThreadX timers. All OSF timers created by osf_tmr_create() are in the
non-active state. You must call osf_tmr_start() to start a timer.
Outputs None
6.7.1.4 osf_tmr_stop
Use this function to stop a timer.
Outputs None
Failure = None
6.7.1.5 osf_tmr_period_change
Once a timer is created, only the timeout period can be changed. If you want to change a timer expiry function, you
must delete the timer, and create a new one with the new timer expiry function.
Note that the initial timer expiry will be (initial_ticks - 1) to (initial_ticks) from the current time. This is
because the next timer expiry will be (initial_ticks) from the current time but we may be (0) to (one system
timer period) away from the next timer tick. If the initial expiry must be at least N timer ticks away, initial_ticks
should be N+1. For example, use
osf_time_ms_to_ticks(required time in ms) + 1
instead of
osf_time_ms_to_ticks(required time in ms)
to ensure that the initial timer expiry will be at least (required time in ms) away.
Outputs None
Failure = None
6.7.1.6 osf_time_period_get
Outputs None
Failure =
6.7.1.7 osf_time_ticks_get
The osf_time_ticks_get() function returns the current system tick count.
Inputs None
Outputs None
Failure =
6.7.1.8 osf_time_diff
Use osf_time_diff()to calculate the time difference between the two 32-bit input times. It can handle one wrap-
around between the two times but cannot differentiate between multiple wrap-arounds and a single wrap-around.
Outputs None
Failure =
6.7.1.9 osf_time_ms_to_ticks
osf_time_ms_to_ticks()converts time duration from milliseconds to system timer ticks. Use the time-to-timer-
tick conversion functions provided by OSF as the underlying system timer resolution may change.
This number of ticks returned by this function is rounded up to the next tick so that the ticks will always be greater
than or equal to the time specified.
Outputs None
Failure =
6.7.1.10 osf_time_ticks_to_ms
osf_time_ticks_to_ms()converts time duration from system timer ticks to milliseconds. Use the time-to-timer-
tick conversion functions provided by OSF as the underlying system timer resolution may change.
Outputs None
Failure =
6.7.1.11 osf_time_s_to_ticks
osf_time_s_to_ticks()converts time duration from milliseconds to 64-bit system timer ticks. Use the time-to-
timer-tick conversion functions provided by OSF as the underlying system timer resolution may change.
Outputs None
Failure =
6.7.1.12 osf_time_ticks_to_s
osf_time_ticks_to_s()converts time duration from system timer ticks to seconds. Use the time-to-timer-tick
conversion functions provided by OSF as the underlying system timer resolution may change.
Outputs None
Failure =
6.7.2.1 osf_tmr_struct
You must allocate a timer control structure, osf_tmr_struct, to create a timer. The structure is used by OSF
internally.
/***************************************************************
* STRUCTURE: osf_tmr_struct
* OSF timer structure.
*
* ELEMENTS:
* tmr_obj - ThreadX timer structure
* tmr_id - Timer ID, assigned by OSF at creation.
*
***************************************************************/
typedef struc
{
osf_tmr_obj_struct tmr_obj;
UINT16 tmr_id;
} osf_tmr_struct;
6.8 Semaphores
OSF provides 32-bit counting semaphores including the ability to create, delete, put and get the semaphores.
The semaphore functions are mainly wrappers of the ThreadX semaphores except that getting semaphores with
non-blocking calls and putting semaphores are not expected to fail.
Threads suspended on a semaphore are resumed in FIFO order.
You must manage the memory for the semaphore control structures yourself.
Function Description
6.8.1.1 osf_sem_create
To create a counting semaphore, allocate a semaphore control structure, osf_sem_struct, and pass a pointer
to it to osf_sem_create(). You can then get and put the semaphore using the osf_sem_get() and
osf_sem_put() functions.
Outputs None
6.8.1.2 osf_sem_delete
Outputs None
6.8.1.3 osf_sem_get
A timeout value is specified for getting semaphores. Valid timeout values are:
• OSF_WAIT_NONE: Get semaphore and return right away.
• OSF_WAIT_FOREVER: Wait until an instance of the semaphore is available. Thread is suspended while waiting.
• Finite value: Wait until an instance of the semaphore is available, or the finite timeout period expires. Thread is
suspended while waiting. Valid timeout period is from OSF_WAIT_MIN to OSF_WAIT_MAX timer ticks.
Outputs None
Failure = OSF_ERR_TIMEOUT
6.8.1.4 osf_sem_put
Outputs None
6.8.1.5 osf_sem_count_get
Outputs None
6.8.2.1 osf_sem_struct
You must allocate a semaphore control structure, osf_sem_struct, to create a semaphore. The structure is used
by OSF internally.
/***************************************************************
* STRUCTURE: osf_sem_struct
* OSF semaphore structure.
*
* ELEMENTS:
* sem_obj - ThreadX semaphore structure
* sem_id - Semaphore ID, assigned by OSF at creation.
*
***************************************************************/
typedef struct{
osf_sem_obj_struct sem_obj;
UINT16 sem_id;
} osf_sem_struct;
6.9 Mutexes
OSF provides the ability to create, delete, put and get mutexes. The mutex functions are mainly wrappers of the
ThreadX mutexes except that getting mutexes with non-blocking calls and putting mutexes are not expected to fail.
OSF mutexes support priority inheritance provided by ThreadX to avoid potential priority inversion. A lower-priority
thread A that owns a mutex will have its priority temporarily raised to that of a higher-priority thread B that wants this
mutex. The priority of thread A will be reverted to the lower priority once thread A releases the mutex.
Threads suspended on a mutex will be resumed by priority resumption. This means the highest priority thread will be
resumed first, and the remaining threads will be resumed in FIFO order.
You must manage the memory for the mutex control structures yourself.
Function Description
6.9.1.1 osf_mtx_create
To create a counting mutex, allocate a mutex control structure, osf_mtx_struct, and pass a pointer to it to
osf_mtx_create(). Use the osf_mtx_get() and osf_mtx_put() functions to get and put the mutex.
Outputs None
6.9.1.2 osf_mtx_delete
Outputs None
6.9.1.3 osf_mtx_get
A timeout value is specified for getting mutexes. Valid timeout values are:
• OSF_WAIT_NONE: Get mutex and return right away. Abort if mutex get fails with this non-blocking option.
• OSF_WAIT_FOREVER: Wait until an instance of the mutex is available. Thread is suspended while waiting.
• Finite value: Wait until an instance of the mutex is available, or the finite timeout period expires. Thread is
suspended while waiting. Valid timeout period is from OSF_WAIT_MIN to OSF_WAIT_MAX timer ticks.
Outputs None
Failure = OSF_ERR_TIMEOUT
Assert and never return if wait_option = OSF_WAIT_NONE.
6.9.1.4 osf_mtx_put
Outputs None
/********************************************************************
* STRUCTURE: osf_mtx_struct
* OSF mutex structure.
*
* ELEMENTS:
* mtx_obj - ThreadX mutex structure
* mtx_id - Mutex ID, assigned by OSF at creation.
*
*********************************************************************/
typedef struct
{
osf_mtx_obj_struct mtx_obj;
UINT16 mtx_id;
} osf_mtx_struct;
...........continued
SI_INT[5:0] Vector EXT_INT EXT_INT connectivity
Val
14 EXT_INT [111 :104 ] EXT_INT [109: 104] = {ECMR_INT, SLICE1, SLICE0, CSU2,
CSU1, CSU0}
...........continued
Interrupt Source Description INT ID Interrupt Service Routine
Function Description
osf_int_global_restore Restores the interrupt enable bit (IE) status to the corresponding bit value of the input.
Use with osf_int_global_disable() to create a critical section.
6.10.3.1 osf_int_global_enable
osf_int_global_enable() performs atomic writes to the Status(IE) bit to enable all 34Kc core interrupts.
Inputs None
Outputs None
6.10.3.2 osf_int_global_disable
osf_int_global_disable()performs atomic writes to the Status(IE) bit to disable all 34Kc core interrupts.
Notice that the system clock will slip if the system is blocked for longer than a system timer period. See Section
6.7.3 System Hardware Timer Operation for detail.
Inputs None
Outputs None
6.10.3.3 osf_int_global_restore
osf_int_global_restore() performs atomic writes to the Status(IE) bit to enable or disable all 34Kc core
interrupts based on the input value.
Note
If you use osf_int_global_disable() and osf_int_global_restore()to create a critical section, DO NOT
make any OS calls within the critical section.
Outputs None
void cicint_init(void)
void cicint_sw_int_clear(UINT8 int_num) Clears the specified interrupt that was set by software.
6.11.2.1 cicint_int_set
This function provides a mechanism for application-level code to register an interrupt service routine (ISR) to handle
one of the 120 possible interrupt sources (EXT_INT [0~119]).
Outputs None
Returns None
6.11.2.2 cicint_int_enable
This function enables the given interrupt in the CIC.
Outputs None
Returns None
6.11.2.3 cicint_int_disable
This function disables the given interrupt in the CIC. It does not remove the previously installed interrupt handler, if
one was installed.
Outputs None
Returns None
6.11.2.4 cicint_vec_priority_set
This function provides a mechanism for application-level code to change the default priority level assigned to any one
of the 15 interrupt vectors. One interrupt vector is the summary of 8 number of external interrupt (EXT_INT).
Outputs None
Returns None
6.11.2.5 cicint_int_status_get
For a given vector number, this function returns its corresponding interrupt status.
Outputs None
6.11.2.6 cicint_init
This function is the top-level interrupt controller initialization. It registers the vector handler routines with the default
and sets up the default controller vector priority level, hardware and software masking levels, and creates a database
that can handle up to 120 user-registered interrupt service routines.
Inputs None
Outputs None
Returns None
6.11.2.7 cicint_sw_int_set
This function will trigger the interrupt by software.
Outputs None
Returns None
6.11.2.8 cicint_sw_int_clear
This function clears the given interrupt that was triggered by software.
Outputs None
Returns None
7. Device Drivers
The device drivers provide basic functions for controlling external peripherals. The driver APIs described in this
section are fully tested by Microchip. Use them as-is in your custom code development. Software described in this
section as “examples” may require rework before they can be integrated into your application. The PM73206_04
firmware release provides drivers for:
• FLASH
• TWI
• UART
• GPIO/SGPIO
• Ethernet
• RTC
• Hardware Application Timer
• SPI
This package contains no dedicated GPIO port. Several functional pins are overloaded with GPIO functionality and
can be used in primary function mode or in GPIO mode through firmware control.
Table 7-1. Function-Multiplex Mapping of Peripheral Pins
...........continued
GPIO Main Function Description Default
Port ID
...........continued
GPIO Main Function Description Default
Port ID
...........continued
GPIO Main Function Description Default
Port ID
NOTES:
• GPIO Pins 40-43 (muxed with UART3) and 63-66 (muxed with UART2) support GPIO Interrupt mode. Each
group (GPIO Pins 40-43 or GPIO Pins 63-66) of the GPIO interrupt inputs is consolidated into a single interrupt
line connected to the MBIC interrupt controller.
• GPIO Pin 43 (UCTSB[3]) can be configured as AC_GOOD_L signal input when the pin is configured as a GPIO
input and EPOW feature is enabled by setting EPOW_EN bit in EPOW Control Register 0 to the logical one.
• On PM804x devices, GPIO Pins 44-62 (muxed with MAC) are removed, and GPIO APIs will return errors when
accessing GPIO pins 44-62.
These drivers are described in detail in the following sections.
7.1 Flash
The flash driver erases and programs flash memory. The parallel flash driver supports AMD Standard and Intel
Standard CFI command sets. The flash driver defaults to the AMD Standard command set if the flash device does
not support CFI. The SPI flash driver supports Numonyx SPI flash used in the Evaluation Kit.
The firmware download handler (FWDL) controls the piece-wise download of data to the flash in the firmware update
mechanism. It also:
• parses the firmware image header
• calls FLM APIs to erase partitions, to write partition and to compute CRC, write CRC, and image lengths to the
end of a partition.
The Flash Module (FLM) performs initialization, erasing and writing. The FLM only provides write and erase
interfaces since reading from the flash does not require a special sequence. Each function is blocking and does
not return until the operation is complete, or an error has occurred. Any code that requires the flash to be in a state
that is not directly readable is put into a critical section; specifically, initialization, sector-erase and word-write. The
time elapsed within each critical section depends on the specific flash device. In the case of writes, the FLM puts
each word write within a critical section; in this case the priority of the calling thread should be considered if large
writes are expected. Configure the watchdog timer to accommodate sector-erase time as this is typically much longer
than a word-write time.
The FLM data structure is private to the module and supports a single flash device and a single user of the FLM
module. During initialization, writes, and erases of the flash, ensure that no other threads access the flash and that
no code is run from the flash since unexpected results may occur. If an unexpected result occurs FLM attempts to
recover by resetting the flash memory using its reset sequence and by performing a hardware reset if provided by the
user.
The FLM data structure stores a copy of the partition map as set by the user. The partitions must contain an integer
number of flash sectors. The partition map is defined in the linker command file and its values are passed to FLM
through global variables. The variable names in the linker command file must match those found in flm_device_data.
c. Similarly, these variables and their order must match the partition IDs described by flm_partition_enum. Access
to the flash is restricted to these partitions. The partitions may be write protected by setting the read-only flag of
the partition. By default, they are all writable. Ensure that write protection is enabled in one of the EMA initialization
routines. The Bootloader and the Application Code use two different instantiations of FLM. The Bootloader cannot be
relied upon to set the write protection for the flash partitions.
If a non-CFI parallel flash memory part is being used, the initialization code cannot access the flash sector
information from the device itself. In this case, the parallel flash driver searches through a list of explicitly supported
devices. If it finds one that matches the device, it uses it. Otherwise, it uses a default sector map. This map
consists of 256 x 4096-byte sectors. If very large partitions are set in the linker command file, the erase time will
be extremely long since each sector may be erased multiple times. For example, a 64 Kbytes sector would be
erased 16 times rather than once. The solution is to add the device to the supported devices list. This requires
adding a device data file flm_xxx_data. c and then adding the device to the declarations in flm_loc. h and the
flm_supported_flash_devices_array in flm_device_data. h. Any build and linker files will also need to be updated. A
new file is also required if the flash used is larger than one Mbyte.
Since the FLM module will set the flash into an unreadable state during programming, the FLM code must reside in
RAM, rather than on the flash itself.
Table 7-2. Flash Driver Requirements
Support multiple flash Yes Existing code supports programming/updating multiple partitions
partitions in the flash device.
Support AMD and Intel CFI Yes Supports AMD Standard and Intel Standard CFI command sets.
flash AMD Spansion S29GL128 Flash is used in Microchip Evaluation
kit
Support SPI Numonyx flash Yes Numonyx N25Q128 SPI flash is used in the Microchip Evaluation
Kit
Support Winbond SPI flash Yes Supports Winbond W25Q128FW and W25Q32DW parts.
Optional ECC support Yes Supports inline ECC for parallel flash. ECC enabling requires the
support of the Flash Buffer Program command.
Erase Flash Partitions Yes Partition erase currently supported. Flash is allocated in
partitions that can each be erased as a whole (partial partition
erasure is not supported).
Flash download Yes The flash driver operates on buffers supplied through the host-to-
SXP communications path (using SES or other frame formats).
...........continued
Requirement Supported Comments
EMA execution environment Partial Active flash partitions should only be erased and programmed
(critical regions, interrupts, by the Boot Kernel. EMA flash operations should only write
watchdogs) to the scratch partitions of the flash, and only require small
critical regions around the flash word programming sequence.
Exceptions that occur during flash critical regions must not
access flash for instructions or data (For example, exception
code must be locked in cache or be running from SRAM.).
The following table shows the timing settings for the FLM flash programming/erase operations.
Table 7-3. Timing Settings for Flash Module
Flash memory sector erase operations take an extremely long time and depend on the device used. During an erase
cycle, the erase operation is interrupted by flash suspend/resume commands every flm_erase_poll_period_ms, so
that data can be read from any non-suspended sector and high priority tasks have a chance to execute. The timing
flm_erase_poll_period_ms is set to 5 ms in the initialization string by default.
• Calculating the physical flash sectors to be erased and handling the flash sector erase sequence when erasing
a sector;
• Translating the logical address to the physical address and handling the flash programming sequence on the
flash driver level when programming.
Note
• Logical-to-physical address translation with parallel flash enabled introduces the Flash Partition Map change.
• When programming the flash with ECC enabled, the starting address must be aligned to a 24-byte address
boundary.
Function Description
flm_partition_erased_verify Checks that each word within a partition has the erased value
...........continued
Function Description
flm_board_device_reset A user-defined hook that performs a hardware reset of the flash device.
7.1.2.1 flm_init
Initializes the FLM config structure. flm_init must be called before any other FLM functions are called. Perform the
one time flash module setup, configuration verification, and data initialization for parallel flash or SPI flash based on
the boot device type. Once this is complete the FLM 'object' is constructed and any of the functions to control the
flash can be used. This function can be called multiple times with the same handle without affecting the operation.
Inputs None
Warning = FLM_ERR_NSUP_FLASH_CMD_INTERFACE
7.1.2.2 flm_partition_erase
Erases the specified flash partition. If the specified partition is not already erased, each sector of the partition is
erased in succession. Once the process has completed, the erase is verified by calling flm_partition_erased_verify()
again. This function is blocking and will not return until the erase and verify are complete or there has been an error.
Any valid partition may be erased.
When ECC is enabled, it needs to perform address remapping.
Outputs None
Failure = FLM_ERR_SECTOR_ERASE_TIMEOUT
FLM_ERR_SECTOR_ERASE_FAILED
Side Effects None Either failure return code could indicate a partially erased partition.
7.1.2.3 flm_partition_write
Writes data to the flash device. Writes to a flash device are only capable of bringing bits low so the device must
be erased to bring all of the bits high before any writes are performed. It is up to the user to erase the partition
before writing it. Any single valid partition may be written with any data using this function. If the data spans multiple
partitions FLM_ERR_BAD_LENGTH is returned without writing anything. Writes must be an integer number of flash
words (the size of the flash e.g., 16 bits), but can be any number less than or equal to the size of the partition. There
is no checking of the destination partition to see if it has been erased, writes will occur as long as the source data
length fits within the partition. After each word has been written to the flash it is read back for verification. If it does not
match the source word, FLM_ERR_PROG_FAILED is returned.
When ECC is enabled, it needs to do address remapping.
src_data_ptr Pointer to the source data buffer. This data must be aligned to 16-bit
boundaries.
Outputs None
Failure = FLM_ERR_BAD_LENGTH
FLM_ERR_PROG_FAILED
7.1.2.4 flm_partition_erased_verify
Checks to see if a partition is erased. This function checks each word of the specified partition to ensure that it
matches the erase word (typically 0xFF).
When ECC is enabled, it needs to do address remapping.
Outputs None
Failure = FLM_ERR_SECTOR_ERASE_FAILED
7.1.2.5 flm_partition_info_get
Get information about a particular partition. This function accesses the private FLM data structure and performs some
calculations to return information about a particular partition.
Outputs None
Returns None
7.1.2.6 flm_board_device_reset
A hook that can be used to perform a hardware reset of the flash. Typically this is board dependent and will use one
of the hardware drivers (e. g., GPIO) to toggle the reset pin of the flash device.
Inputs None
Outputs None
Returns None
7.1.2.7 flm_partition_read_only_get
This function returns the read-only flag for a particular partition.
Outputs None
7.1.2.8 flm_partition_read_only_set
This function sets the read-only flag for a particular partition.
Outputs None
Returns None
7.1.2.9 fwdl_hdlr
This function handles piecewise firmware download. The firmware download handler expects data to arrive in
contiguous (consecutive) packets. Each packet is accompanied by data_offset_bytes. The first packet is indicated by
an offset of zero and serves to reset the download process whenever it occurs. The first packet contains the firmware
download header that consists of the 28 bytes of information described in Table 4-1. Once the header is verified,
the destination partition is erased, and the packet data is written to the partition. After each packet is processed,
fwdl_hdlr updates and returns fwdl_status_ptr. This can then be used by upper layer processing to indicate status
and error conditions to the host.
Subsequent packets must have an offset that matches the one expected by fwdl_hdlr or the download is aborted.
After writing the final packet to flash, the CRC is computed by reading the partition up to the expected firmware
length. This value is then compared to the value sent in the firmware download header. If it matches the length of the
image and the CRC are written to the last eight bytes of the partition. After a successful download the partition will be
as shown in the following figure.
Firm ware
IMAG E DATA Download Header
is NO T written
PARTITIO N_XXX
32 bits
To switch over to the new image, a reboot must occur to re-invoke the Bootloader image selection code.
Inputs ref_file_hdr_ptr (pointer to) the reference file header byte array.
data_ptr (pointer to) the firmware data to write. This pointer should be
aligned on a 16-bit boundary. If data_offset_bytes = 0 this will
also include the firmware download header.
Returns PMC_SUCCESS
7.1.2.10 fwdl_init_hook
Hook to handle the return code from flm_init() called inside fwdl_hdlr().
Outputs None
Returns None
7.1.3.1 flm_partition_info_struct
The flm_partition_info_struct contains information on a particular partition. The start_addr and end_addr fields are set
in the linker command file.
/***************************************************************************
* STRUCTURE: flm_partition_info_struct
* This structure contains information regarding a logical FLASH
* partition. It is populated using flm_partition_info_get().
*
* ELEMENTS:
* offset - Base offset of the partition relative to the start of the
* FLASH. This is the byte offset and is computed by
* subtracting the flash base offset address from start_addr.
* num_words - Number of FLASH words in the partition. Here a FLASH word
* depends on the FLASH device in use. This value is computed
* using (end_addr - start_addr) / sizeof(FLM_WORD).
* start_addr - Start address of the partition relative to the AHB. This
* address is obtained from the linker command file.
* end_addr - End address of the partition relative to the AHB. This
* address is obtained from the linker command file.
* read_only - Read only flag used for partition protection.
*
****************************************************************************/
typedef struct
{
UINT32 start_addr;
UINT32 end_addr;
UINT32 offset;
UINT32 num_words;
BOOL read_only;
} flm_partition_info_struct;
It is recommended to use memory-mapped mode for write operations and hardware-assisted mode for other
operations.
Table 7-5. SPI Bus Interface Functions
Function Description
7.1.4.2 spi_hw_assisted_write
Sends data in hardware-assisted mode. Asserts and deasserts CLK to send each bit in TX_DATA.
Outputs None
SPI_ERR_TIMEOUT TIMEOUT
7.1.4.3 spi_hw_assisted_read
Receives data in hardware-assisted mode. Poll RX_DONE to receive each byte.
Outputs None
Returns
PMC_SUCCESS SUCCESS
SPI_ERR_TIMEOU TIMEOUT
T
7.1.4.4 spi_mem_mapped_write
Sends data in memory-mapped mode.
Outputs None
Returns None
7.1.4.5 spi_mem_mapped_write_write
Sends data in hardware assisted mode. Data is in two buffer sources. Specifically, data1 is the command opCode
and data2 is real data.
Outputs None
Returns
PMC_SUCCESS SUCCES
S
SPI_ERR_TIMEOU TIMEOUT
T
7.1.4.6 spi_mem_mapped_write_read
Sends and receives data in hardware assisted mode.
Outputs None
Returns
PMC_SUCCESS SUCCES
S
SPI_ERR_TIMEO TIMEOUT
UT
7.1.4.9 How to customize SPI Flash Driver to support the new model of SPI Flash Memory
Firmware supports Numonyx N25Q128 SPI flash, and Winbond W25Q128FW and W25Q32DW flash parts, refer to
Table 7-2. To support a new SPI flash chip, the following steps should be taken into consideration:
1. Add Flash operation APIs such as get device id, erase sector, write word, write buffer, and chip reset, and so
on. Refer to the corresponding functions in flm_NumonyxSPI.c.
2. Define the corresponding data structures for the new SPI Flash Memory. Refer to structures in
flm_N25Q128_data.c., especially, the following key elements that must be configured properly. See the
instructions in the SPI Flash datasheet:
– device_size -Device Size = 2^N in bytes
– max_multi_byte_write -Maximum number of bytes in a multi-byte program = 2^N
– num_erase_blocks -Number of Erase Block Regions within device
– erase_block_array -Erase Block Region Information
3. Add the device into flm_supported_spi_flash_devices_array[].
4. If a new SPI flash is being used and firmware could not detect it in supported SPI flash device array, firmware
will use N25Q128E SPI flash driver by default. This may cause flash programming error or booting failure.
Make sure the new device is N25Q128E compatible (sector layout/timing/commands/etc), otherwise add new
SPI driver into firmware as described by the above steps.
7.2 TWI
The TWI driver configures the TWI hardware and performs individual TWI transactions. The TWI driver also directly
supports access to peripheral devices and supports the necessary transactions for constructing a complex data-link
protocol for communicating between intelligent TWI-capable systems. The SXP 12G TWI is hardware-based. TWI
hardware is responsible for bus arbitration, handling clock stretching, and performing transactions and interrupts. The
TWI driver needs to initiate transactions, check status, and handle interrupts and bus recovery.
The TWI device driver supports a configurable number of TWI Ports with each port operating either as a master
or slave. In addition, the SXP 12G TWI supports both 10-bit and 7-bit slave addresses and supports corresponding
read/write operations.
Function Description
twi_master_write_10bit Performs a master write transaction with a 10-bit or 7-bit address slave device.
twi_master_read_10bit Performs a master read transaction with a 10-bit or 7-bit address slave device.
twi_master_writeread_10bit Performs a master write and read transaction with a 10-bit or 7-bit address
slave device.
twiss_init Initializes the TWI subsystem. Must be called once before any other TWI
functions can be used.
...........continued
Function Description
twi_slv_offset_width_set Sets the slave offset width for a SXP12G TWI Slave port.
twi_mst_stretch_time_set Sets the extra time that a master must wait before a transaction timeout.
twiss_slv_state_machine TWI slave event handler for both ThreadX version and non-ThreadX version
Access to device resources such as transmit and receive buffers is serialized using semaphores shared between
the caller of these API and the TWI ISR. The transmit and receive operations block the thread if the appropriate
semaphore is not available.
7.2.1.1 twi_master_write_10bit
Performs a TWI Master Write transaction with up to 256 bytes of write data. It supports both 7-bit addresses and
10-bit addresses.
Outputs None
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.2 twi_master_read_10bit
Performs a TWI Master Read transaction recovering up to 256 bytes of read data. The calling thread is blocked until
the read operation has completed. It supports both 7-bit addresses and 10-bit addresses.
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.3 twi_master_writeread_10bit
Performs a TWI Master Write-Read transaction writing up to 256 bytes of data and recovering up to 256 bytes of read
data. The calling thread is blocked until the write/read operation has completed. It supports both 7-bit addresses and
10-bit addresses.
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.4 twiss_init
Performs TWI subsystem initialization. This is called once for the entire TWI subsystem.
Inputs twiss_div_ ptr (pointer to) configuration data for the TWI, On SXP 12G, this parameter
is not used.
Outputs None
Returns None
7.2.1.5 twi_mst_init
Initializes a TWI Master port and allocates system resources used by the TWI driver. This function is called once and
only once for each physical TWI master interface. It must be called before the TWI Master functions can be called.
mst_ctl Master port control. On the SXP 12G, this parameter is not used.
mst_cfg Master port configuration. On the SXP 12G, this parameter is not used.
mst_int_enb Master port interrupt configuration. On the SXP 12G, this parameter is
not used.
Failure = None
7.2.1.6 twi_slv_init
Initializes a TWI Slave interface. This is called once for each physical TWI interface.
slv_int_enb Slave port interrupt configuration. On the SXP 12G, this parameter is
not used.
Returns None
7.2.1.7 twi_slv_offset_width_set
Sets the slave offset width of a SXP12G TWI Slave. This should be called before twi_slv_init() if the slave offset width
needs to be changed.
Returns None
7.2.1.8 twi_mst_stretch_time_set
Sets the extra time that a master must wait before a transaction timeout. The default value is 5ms and is set in the
initialization string. This function can be called at any time after twi_mst_init().
stretch_time The extra time that the master must wait before a transaction timeout.
The unit is ms. The default value is 5.
Outputs None
Returns None
7.2.1.9 twi_master_write
Performs a TWI Master Write transaction with up to 256 bytes of write data. The calling thread is blocked until the
write operation has completed.
Outputs None
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.10 twi_master_read
Performs a TWI Master read transaction recovering up to 256 bytes of read data. The calling thread is blocked until
the read operation has completed.
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.11 twi_master_writeread
Performs a TWI Master write-read transaction writing up to 256 bytes of data and recovering up to 256 bytes of read
data. The calling thread is blocked until the write/read operation has completed.
Returns PMC_SUCCESS
TWI3_ERR_MTX_TIMEOUT
TWI3_ERR_UNEXPECTED_INT_SRC
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.12 twi_nonthreadx_init
Performs top level TWI initialization.
Inputs glb_cfg TWISS global configuration register setting. On the SXP 12G, this
parameter is not used.
Outputs None
Returns None
7.2.1.13 twi_nonthreadx_master_init
Performs per-TWI master port initialization. This is called once for each physical TWI master interface.
Mst_ctl Master port control was obsoleted for the SXP 12G. Set to 0 for backward
compatibility.
Mst_cfg Master port configuration was obsoleted for the SXP 12G. Set to 0 for
backward compatibility
mst_int_enb Master port interrupt configuration was obsoleted for the SXP 12G. Set to 0
for backward compatibility.
Outputs None
Returns None
7.2.1.14 twi_nonthreadx_master_write
Performs a TWI Master Write transaction with up to 32 bytes of write data.
Outputs None
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.15 twi_nonthreadx_master_read
Performs a TWI Master read transaction recovering up to 32 bytes of read data.
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.16 twi_nonthreadx_master_writeread
Performs a TWI Master write-read transaction writing up to 32 bytes of data and recovering up to 32 bytes of read
data.
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.17 twi_nonthreadx_master_write_10bit
Performs a TWI Master Write transaction with up to 32 bytes of write data. It supports both 7-bit address and 10-bit
addresses.
Outputs None
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.18 twi_nonthreadx_master_read_10bit
Performs a TWI Master Read transaction recovering up to 32 bytes of read data. It supports both 7-bit and 10-bit
addresses.
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.19 twi_nonthreadx_master_writeread_10bit
Performs a TWI Master Write-Read transaction writing up to 32 bytes of data and recovering up to 32 bytes of read
data. It supports both 7-bit and 10-bit addresses.
Returns PMC_SUCCESS
TWI3_ERR_MST_TIMEOUT_RECOVERED
TWI3_ERR_MST_TIMEOUT_UNRECOVERED
TWI3_ERR_TXABRT_7ADDR_NOACK
TWI3_ERR_TXABRT_10ADDR1_NOACK
TWI3_ERR_TXABRT_10ADDR2_NOACK
TWI3_ERR_TXABRT_DATA_NOACK
TWI3_ERR_TXABRT_SBYTE_ACKDET
TWI3_ERR_TXABRT_ARB_LOST
7.2.1.20 twi_nonthreadx_slv_init
Initializes a TWI Slave interface. This is called once for each physical TWI interface.
slv_int_enb Slave port interrupt configuration. On the SXP 12G, this parameter is
not used.
Returns None
7.2.1.21 twiss_slv_state_machine
This function decodes and dispatches handlers for one TWI slave interrupt. It is for both ThreadX and non-ThreadX
functions. TX data and RX data are saved in buffer twi_slv_ptr->data_ptr. Call twi_slv_data_put() to put data into the
buffer. Call twi_slv_data_get() to get RX data from the twi slave buffer. The TWI slave callback function is invoked
when STOP is detected and the trigger flag is TRUE, or when ABORT is detected.
Outputs none
Returns none
7.3 UART
The UART driver configures the serial port hardware and performs read and write transactions. It supports a
configurable number of UART ports, each of which is controlled independently. For the number of UARTs on the
SEP device you are using, refer to the device-specific Firmware User Manual.
Function Description
uart_nonthreadx_rx Reads a single character from the specified UART (Non-ThreadX version)
7.3.1.1 uart_init
Identifies and initializes the operational capabilities of the UART.
stop_bits Number of stop bits to generate when transmitting. The following data bit
and stop bit combinations are allowed:
data_bits stop_bits
5, 6, 7, 8 1
6, 7, 8 2
Outputs None
Returns None
7.3.1.2 uart_tx
Writes a single character to the specified UART. If the UART has not completed transmitting the previous character,
the calling thread is blocked until the character is transmitted.
Outputs None
Failure = UART_STAT_ERR_BAD_PARAM
UART_STAT_ERR_GENERAL
7.3.1.3 uart_tx_mult
Writes a string of characters to the specified UART. The calling thread is blocked until the entire string is transmitted.
Outputs None
Failure = UART_STAT_ERR_BAD_PARAM
UART_STAT_ERR_GENERAL
7.3.1.4 uart_rx
Reads a single character from the specified UART. The API returns the character if it is available; otherwise, it
blocks the calling thread for a period defined by UART_RX_FIFO_EMPTY_TIMEOUT_TICKS in uart. h for a received
character to become available. If a character is not available, this function returns a non-zero failure code.
Failure = UART_STAT_ERR_BAD_PARAM
UART_STAT_ERR_GENERAL
OSF_ERR_TIMEOUT
7.3.1.5 uart_nonthreadx_init
This function initializes the selected UART device to send and receive data under non–ThreadX conditions.
stop_bits Number of stop bits to generate when transmitting. The following data
bit and stop bit combinations are allowed:
data_bits stop_bits
5, 6, 7, 8 1
6, 7, 8 2
Outputs None
Returns None
7.3.1.6 uart_nonthreadx_tx_mult
This function sends multiple bytes simultaneously to the selected UART device under non-ThreadX conditions.
Outputs None
Failure = UART_STAT_ERR_BAD_PARAM
UART_STAT_ERR_GENERAL
7.3.1.7 uart_nonthreadx_rx
This function retrieves one byte from the selected UART device under non-ThreadX conditions. The API returns the
character if it is available; otherwise, it returns UART_STAT_ERR_GENERAL.
Failure = UART_STAT_ERR_BAD_PARAM
UART_STAT_ERR_GENERAL
7.4 SGPIO
The SXP 12G device provides four SFF-8485 compliant four-pin SGPIO interfaces for GPIO expansion. The firmware
configures each SGPIO output timeslot as a static output, an LED flash output with eight programmable LED flash
patterns, or a link activity status indicator that is generated by the port interface logic. Each SGPIO input timeslot can
also be configured to generate an interrupt.
The length of the bit stream is programmable in units of three timeslots. The firmware also configures the order of
assignment of the slots to the PHYs. These two features provide enough flexibility to support different applications
(e.g., they allow for the exclusion of PHYs attached to initiators and other expanders from the bit stream if needed).
See Section 9.4 LED Control through SGPIO for a complete description of this interface.
7.5 GPIO
In the SXP 12G, all 81 GPIO ports are dual function with other I/O ports. These can be configured as GPIO or main
function ports, see Table 7-1 and Table 8-25. The firmware configures each GPIO pin as input or output.
The GPIO firmware driver provides functions to set up and control the GPIO hardware, and for general GPIO register
read/write operations.
Function Description
gpio_port_func_selection_cfg Makes the function selection between a GPIO and a main function
7.5.1 gpio_reg_write
Performs a read-modify-write to the specified GPIO register.
Outputs None
Failure = None.
7.5.2 gpio_reg_read
Performs a read from the specified GPIO register.
Failure = None.
7.5.3 gpio_port_func_selection_cfg
Selects between the GPIO function and the main function.
Inputs gpio_cfg_ptr (Pointer to) the GPIO configuration parameters that are retrieved from the
initialization string.
Outputs None
Returns None
7.5.4 gpio_port_cfg
Dynamically configures the GPIO port attributes.
gpio_mode 0: output,
1: input;
2: rising edge interrupt (only valid for specific GPIO ports)
3: falling edge interrupt(only valid for specific GPIO ports)
4: high level interrupt(only valid for specific GPIO ports)
5: low level interrupt(only valid for specific GPIO ports)
gpio_output TRUE for high or FALSE for low, when port works as output
Outputs None
Returns PMC_SUCCESS
7.5.5 gpio_port_write
Writes the high/low value to the GPIO port once the GPIO mode is output.
Outputs None
Returns PMC_SUCCESS
7.5.6 gpio_port_read
Reads the GPIO port once the GPIO mode is input.
Returns PMC_SUCCESS
7.6 Ethernet
Except for the PM8044 and PM8043 devices, the SXP devices provide a 10/100M MAC interface for connecting an
external Ethernet PHY device. The Ethernet driver provides the basic hardware interfacing and packet management
for receiving and transmitting packets. The processing of the actual packets is done by the TCP/IP stack that runs as
a separate thread.
There are APIs for querying MAC statistics and supporting the Micrel Ethernet PHY KSZ8051 used for the SXP 12G
Evaluation Kit.
Function Description
7.7.1 rtc_reset
This function resets the RTC and loads the clock count load value in the control register.
Inputs None
Outputs None
Returns None
7.7.2 rtc_set
This sets the RTC clock count load value in the RTC Control register.
Inputs time_us Clock count. Only the lower 50 bits are valid.
Outputs None
Returns None
7.7.3 rtc_get
This function gets the RTC clock count.
Inputs None
Outputs time_us_ptr (Pointer to) clock count in us. Only the lower 50 bits are valid.
Returns None
OSF timer. The timer driver provides the APIs for creating hardware timers, start/stop timers, and timing expiration
callbacks.
Upon system reset, all timers are disabled. The software timer can be enabled though the control registers. Once
enabled, the software timer starts counting down. When it reaches 0, it loads one of two values depending on the
timer-operating mode. By default, the timer is in the free-running mode, where the counter wraps to 0xFFFF_FFFF
to allow time to reprogram or disable the timer before another interrupt occurs. In user-defined count mode, the timer
loads the current value of the TimerNLoadCount register.
The user-defined count mode generates a fixed-timed interrupt. The free-running mode generates a single-timed
interrupt.
Select the user-defined count mode by writing 1 to bit 1 of the timer control register.
Select the free-running mode by writing 0 to Bit 1 of the timer control register.
Normal operation of the timer is as follows:
Disable the timer and program its operating mode by writing to its control register.
Load the Timer N LoadCount register – the period in us
Enable the timer.
In both the free-running and user-defined count modes, a timer generates an interrupt when its count changes from
0 to its maximum count value. The interrupt is not generated if the timer is disabled. If the actual interrupt is set, it is
cleared when the timer is disabled.
Table 7-10. Application Timer Driver Functions
Function Description
app_timer_obj_deregister Deregisters one application timer instance from one hardware timer.
7.8.1 app_timer_obj_register
Registers one timer instance to one hardware timer.
time_us Time in us
Outputs None
7.8.2 app_timer_obj_deregister
Deregister one timer instance from one hardware timer.
Outputs None
Returns PMC_SUCCESS
7.8.3 app_timer_obj_start
Starts one registered timer instance.
Outputs None
Returns PMC_SUCCESS
7.8.4 app_timer_obj_stop
Stop one timer instance which has been registered.
Outputs None
Returns PMC_SUCCESS
Function Description
hal_int_global_restore Restores the interrupt enable bit (IE) status to the corresponding bit
value of the input. Should be used with hal_int_global_disable() to
create a critical section.
hal_time_diff Calculates the time difference between the two input times. Can handle
one wrap-around between the two times.
7.9.1.1 hal_int_global_enable
hal_int_global_enable() performs atomic writes to the Status(IE) bit to enable all 34Kc core interrupts.
Inputs None
Outputs None
7.9.1.2 hal_int_global_disable
hal_int_global_disable()performs atomic writes to the Status(IE) bit to disable all 34Kc core interrupts.
Inputs None
Outputs None
7.9.1.3 hal_int_global_restore
hal_int_global_restore() performs an atomic write to the Status(IE) bit to enable or disable
all 34Kc core interrupts based on the input value. If you use hal_int_global_disable() and
hal_int_global_restore()to create a critical section, avoid making any operating system calls within the critical
section.
Outputs None
Failure = None
7.9.1.4 hal_reg_write
Outputs None
Failure = None
7.9.1.5 hal_reg_read
Outputs None
Failure =
7.9.1.6 hal_time_diff
Use hal_time_diff()to calculate the time difference between the two 32-bit input times. It can handle one wrap-
around between the two times but cannot differentiate between multiple wrap-arounds and a single wrap-around.
Outputs None
Failure =
7.9.1.7 hal_time_us_to_sysclk
hal_time_us_to_sysclk()converts time duration from microseconds to system clock counter increments. Use
the time-to-system-clock-count conversion functions provided by HAL, as the underlying system clock resolution may
change from platform to platform.
Outputs None
Failure =
7.9.1.8 hal_time_busy_wait_us
You can call hal_time_busy_wait_us() to perform a busy wait for a given number of microseconds.
Outputs None
Failure = None
7.9.1.9 hal_sys_freq_get
Inputs None
Outputs None
Failure =
7.9.1.10 hal_sys_clk_get
The hal_sys_clk_get() function returns the current system clock count.
Inputs None
Outputs None
Failure =
7.9.1.11 m34khal_mem_cache_line_create
The m34khal_mem_cache_line_create () function creates the cache line.
Inputs start_addr
num_lines
Outputs None
Failure = None
7.9.1.12 m34khal_mem_cache_line_wb_inv
The m34khal_mem_cache_line_wb_inv () function writes back and invalidates the cache line.
Inputs start_addr
num_lines
Outputs None
Failure = None
8. Initialization String
The initialization string is a data structure that defines the operational configuration for the firmware. The SXP 12G
device provides several sources for the initialization information.
Byte Allocation
0x0100 – 0x01FF PHY & SGPIO Mapping Configuration Block (Table 8-8)
0x0200 – 0x112F PHY Configuration Block (Table 8-9 and Table 8-2)
0x1130 – 0x127F PHY Connector Configuration Block (Table 8-17 Table 8-11)
0x1280 – 0x129F Additional PHY Event Source Configuration Block ( Table 8-18)
0x1320 – 0x132F CMDSVR Configuration and SPS Configuration (Table 8-23 ) and TWI Blocks (Table 8-24)
0x1910 – 0x191F Redundant Virtual SSP Link Configuration Block (Table 8-38)
0x1920 – 0x192F Disk Qualification, SIA and SAHA Configuration Block (Table 8-39)
0x19E0 – 0x19EF Non-I/O Disruptive Soft Reset (NDSR) Configuration Block (Table 8-46)
0x1A40 – 0x1A8F Zoning PHY Group ID Mapping Configuration Block (Table 8-48)
...........continued
Byte Allocation
0x0230 – Reserved Break Reply Async Invert TX Invert RX No SATA Disable 0x00 Bit Fields
0x025F Enable Recovery PHY
(L_PHY0 Disable
Info)
Max SATA Rate PHY Rate 0x4F PHY rate {1,
2, 3, 4, 6,
7,8,10,11,12,14,15}
TX_ID_FRAME_GAP RX 3 ID TX 3 ID 0xC0
FRAMES FRAMES
Power Disable Broad-cast Reserved STP Align Density SAS Align Density 0x00 STP/SAS ALIGN
Disable Advance change Suppress density {0, 1, 2}
Supported SATA Sync
Forward
Reserved 0x00
RX PEAK RX PEAK RX PEAK SATA 6G[5:3] RX PEAK SATA 1G5 3G[2:0] 0x29
ENB SATA ENB SATA
3G 1G5
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0 Default Value Range
TRS TXCLK SEL SATA 1G5 POSTCURSOR SATA 1G5 [5:0] 0x00
SSC
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0 Default Value Range
Reserved 0x00
Reserved 0x00
Reserved 0x00
0x0260 – Structure content is the same as that for L_PHY0 Info Same as
0x028F L_PHY0
(L_PHY1
Info)
0x0290 – … …
0x0EBF
(L_PHY3
–
L_PHY66
Info)
0x0EC0 – Structure content is the same as that for L_PHY0 Info Same as
0x0EEF L_PHY0
(L_PHY67
Info)
Detailed descriptions of each of the blocks within the initialization string table are provided in the following table.
Table 8-3. Initialization String Table—Identification Configuration
Bit/Byte 7 6 5 4 3 2 1 0 Default
0x0001 Table Version – Major (Microchip) Table Version - Minor (Microchip) 0x47
Non- Use
strict Default
0x0002 Reserved 0xC0
Check- Ident-
ing ification
...........continued
Bit/Byte 7 6 5 4 3 2 1 0 Default
Vendor ID “Microchip”
Product ID “SXP 24x12G” “SXP 36x12G” 24-port 12G expander 36-port 12G expander
“SXP 48x12G” “SXP 68x12G” 48-port 12G expander 68-port 12G expander
“SXP 24Sx12G” 24-port 12G expander (PM8043)
“SXP 36Sx12G” “Unknown 36-port 12G expander (PM8044)
device”
Unknown device
...........continued
Manufacturer Information Default Value Notes
Field
Byte \
7 6 5 4 3 2 1 0 Default Value Range
Bit
ADDRES
0x0037 TWI Serial EEPROM ADDR [7:1] 0xA0
S VALID
TWI Serial
EEPROM Port ID: 0x00 –
0x0038 Reserved TWI Serial EEPROM Port ID 0x00
Offset 0x0B
Width
Zone
Saved
0x003A Reserved Serial Zone Saved Serial EEPROM Port ID 0x10
EEPROM
Offset
Width
0x003
SAS_BASE_ADDR [55:48] 0x0E
C
0x003
SAS_BASE_ADDR [47:40] 0x00
D
Reserv (PHY_COUNT+
0x0043 SMP SAS address LSB [N:0] 0x7F
ed 1) – 0x7F
Reserv PHY_COUNT –
0x0044 SSP SAS address LSB [N:0] 0x7E
ed 0x7E
Reserv
0x0045 SAS base address LSB[N:0] Mask 0x7F
ed
...........continued
Byte \
7 6 5 4 3 2 1 0 Default Value Range
Bit
0x004
Logical SUB_PHY_FLAG [39:32] 0x00 Bit fields
C
0x004
Logical SUB_PHY_FLAG [31:24] 0x00 Bit fields
D
[SAS_BASE_ADDR, 0x00] SAS address of the STP Bridge in PHY 0 of the SXP 12G device
[SAS_BASE_ADDR, 0x01] SAS address of the STP Bridge in PHY 1 of the SXP 12G device
[SAS_BASE_ADDR, 0x02] SAS address of the STP Bridge in PHY 2 of the SXP 12G device
: :
: :
[SAS_BASE_ADDR, 0x43] SAS address of the STP Bridge in PHY 67 of the SXP 12G device
SAS address of the SSP virtual port in the SXP 12G device as seen by the
ECMR. By default, the SSP SAS address LSB [N:0] is set to:
[SAS_BASE_ADDR, SSP SAS 0x7E for the PM8056
address LSB [N:0]]
0x3E for the PM8055/PM8054/PM8044
0x1E for the PM8053/PM8043
SAS address of the SXP 12G device. This address also addresses the SMP
function in the SXP. By default, the SMP SAS address LSB [N:0] is set to:
[SAS_BASE_ADDR, SMP SAS 0x7F for the PM8056
address LSB [N:0]]
0x3F for the PM8055/PM8054/PM8044
0x1F for the PM8053/PM8043
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0 Default Value Range
0x01 – PHY_
0x0056 Topology Thread Instances 0x01
COUNT
0x005A Application Level SMP Initiator Maximum Retry Count 0x0A 0x00 – 0xFF
Legacy
Bad Open
Global Disk NSCFG Route Expander Wide-port Loop
Destination Reject
0x005C Zoning Qualification Table Compression Route Policing Detect-ion 0x13 Bit Fields
Primitive Retry
Enable Enable Enable Index Enable Enable
Disabled Enable
Disabled
Phy Reset No BC
Report
If Zone FWD if
0x005D Reserved (7:3) Partial 0x05
Phy Info TOPD no
RT(0)
Change change
0x005E –
Reserved (for topology and zoning configuration expansion) 0x00
0x00FF
Route Table Entries for expander PHYs discovered beyond the number defined in this field cannot be added into the
host expander route table.
• The PHY is subtractive, but there is an existing PHY with the subtractive attribute that is not in a wide port with
this PHY.
• To isolate PHYs, the ECMR entries of the subtractive ports, or non-subtractive ports, or both, upon which the
PHYs had been ready, is invalidated and the LEDs for these PHYs are lit red. Users should remove the cables
immediately if any LEDs are lit red. The PHY can come back after removing the cable. If a PHY is invalidated,
then firmware will report 'no device attached' for the SMP discover request.
Note: Wide-Port Policing is only effective for the PHYs that are connecting expanders.
Byte \
7 6 5 4 3 2 1 0 Default Value Range
Bit
1 – [24, 36, 48 or
0x0100 PHY_COUNT 0x44
68]
Logical
PHY 0
Reserve 0 – [23, 35, 47 or
map Physical PHY_ID (P_PHY_ID) 0x00
d 67]
(0x010
2)
Logical
PHY 1
Reserve 0 – [23, 35, 47 or
map Physical PHY_ID (P_PHY_ID) 0x01
d 67]
(0x010
3)
Logical
PHY
Reserve 0 – [23, 35, 47 or
67 map Physical PHY_ID (P_PHY_ID) 0x43
d 67]
(0x014
5)
0x0146
– Reserved 0x00
0x0151
...........continued
Byte \
7 6 5 4 3 2 1 0 Default Value Range
Bit
0x01D
A– Reserved 0x00
0x01FF
STP OPEN
0x0203 Reserved 0x01
REJECT AWT Clear
...........continued
DP FFE M
0x020A PRELOAD SAS3 Reserved DP FFE M PRELOAD SAS3 12G 0x1F
12G Global Disable
Test Threshold
0x020B – 0x020F Reserved 0x00
Enable
• The “STP OPEN REJECT AWT Clear” field, when set to 1, tells the expander device to clear the arbitration
wait timer every time it receives an OPEN_REJECT(RETRY) primitive, rather than incrementing the value as it
normally would. This setting is only valid when the PHY is in the STP mode of operation.
• TX BCT Cx MAX and TX BCT Cx MIN(x=1 or 3) fields define the limit (maximal or minimal value) for transmitter
Cx (Cx is coefficient x, x=1 or 3). TX BCT Cx MAX is the product of the Cx maximal value (defined in SAS-3
specification) multiplied by 64, and rounded to the nearest integer. TX BCT Cx MIN is the product of the Cx
minimal value (defined in SAS-3 specification) multiplied by 64, and rounded to the nearest integer.
• TX BCT VPP MAX fields define the maximal peak-to-peak voltage to constrain |C1|+|C2|+|C3|<= TX BCT VPP
MAX
• TX BCT VMA MIN fields define the minimal voltage modulation amplitude to constrain C1+C2+C3>= TX BCT
VMA MIN
• DP FFE M PRELOAD SAS3 12G field defines the preload value for DP_FFE_M_PRELOAD_SAS3_12 when the
initial string field “SAS12G PGA BOOST EN” is set to 1.
Byte \ Bit 7 6 5 4 3 2 1 0 Default Value Range
G1
G4 WITH G4 WITHOUT G3 WITHOUT G2 WITH G2 WITHOUT G1 WITH
G3 WITH SSC WITHOUT 0xFF
SSC SSC SSC SSC SSC SSC
SSC
RX 3 ID TX 3 ID
TX_ID_FRAME_GAP 0xC0
FRAMES FRAMES
TX SSC
Down-
Reserved 0x00
Spread
Type
...........continued
Reserved 0x00
RX PEAK
RX PEAK ENB
ENB SAS1 Reserved RX PEAK SAS[2:0] 0x01
SAS1 1G5
3G
RX PEAK
RX PEAK ENB
ENB SATA RX PEAK SATA 6G[5:3] RX PEAK SATA 1G5 3G[2:0] 0x29
SATA 1G5
3G
T PISO
PRE2 SEL AMPLITUDE SAS 1G5 [6:0] 0x36
SAS 1G5
T PISO
PRE2 SEL AMPLITUDE SAS 3G [6:0] 0x36
SAS 3G
T PISO
PRE2 SEL AMPLITUDE SAS2 6G [6:0] 0x40
SAS2 6G
T PISO
PRE2 SEL AMPLITUDE SATA 1G5 [6:0] 0x1C
SATA 1G5
T PISO
PRE2 SEL AMPLITUDE SATA 3G [6:0] 0x1C
SATA 3G
T PISO
PRE2 SEL AMPLITUDE SATA 6G [6:0] 0x30
SATA 6G
T PISO
EDGE T PISO EDGE
POSTCURSOR SAS 1G5 [5:0] 0xC0
DELAY SEL DELAY SEL SAS 1G5
SATA 1G5
T PISO
EDGE T PISO EDGE
POSTCURSOR SAS 3G [5:0] 0xC0
DELAY SEL DELAY SEL SAS 3G
SATA 3G
T PISO
EDGE T PISO EDGE
POSTCURSOR SAS2 6G [5:0] 0x0D
DELAY SEL DELAY SEL SAS2 6G
SATA 6G
TRS TXCLK SEL SATA 1G5 SSC POSTCURSOR SATA 1G5 [5:0] 0x00
T PISO PRE2
Reserved PRECURSOR SAS2 6G [5:0] 0x40
MODE1 SAS2 6G
T PISO PRE2
Reserved PRECURSOR SATA 6G[5:0] 0x40
MODE1 SATA 6G
...........continued
SAS12G
TX Cx BCT PRST
PGA Reserved TX BCT EN SAS3 12G Reserved 0x44
DFLT
BOOST EN
SAS/
SATA
Reserved 0x00
Buffering
Enable
6G/3G
SAS 12G Connection
SAS Buffering SAS
Buffering Connection Management
Reserved OAF Early SAS Buffering 6G Buffering 0x02
Snoop TMF Management
Accept Enable Enable 3G
Enable
Enable
Reserved 0x00
SATA
Reserved Reserved SATA Buffering 6G Buffering 0x02
3G
Reserved 0x00
Reserved 0x00
0x0290 – 0x0EBF
(L_PHY3 – L_PHY66 … …
Info)
PHY reset
timeout
0x020C PHY reset in progress timeout 0x0F
handling
Enable
• DP FFE M PRELOAD SAS3 12G Global Disable field determines if the value of “DP FFE M PRELOAD SAS3
12G” (Table 47) would be used as a global configuration or on a per PHY configuration basis; Value should be
set to ‘1’ for setting this on a per PHY configuration; Value should be set to ‘0’ for global configuration.
• Test Threshold Enable field determines whether to use the “Test Threshold” field (Table 47) in the per PHY
configuration. Value 1 means using the “Test Threshold” field in the per PHY configuration area; Value 0 means
not using it.
• PHY reset handling enable and PHY reset in progress timeout: When ‘PHY reset handling’ is enabled, firmware
starts the PHY reset timer when it receives Link Reset or Hard Reset commands. Firmware monitors the timer
value in port manager to check whether link is ready after Link Reset or Hard Reset. If the link is not ready
within the 'PHY Reset in progress timeout' value, then firmware changes the PHY state to 'UNKNOWN' in SMP
discover response. By default, PHY reset handling is disabled.
• TMF Tag0 is used by SSSF to issue TMF with this tag if it detects that TMF Tag0 is not used by the host.
• TMF Tag1 is used by SSSF to issue TMF with this tag if it detects that TMF Tag 1 is not used by the host
already.
Note: Host shall not use TMF Tag0 or TMF Tag1 to send the TMF frame to the buffering SAS device. If the host uses
TMF Tag0 or TMF Tag1 to send TMF frame to the buffering SAS device, the RESPONSE of the TMF from host will
have a CRC error.
• The SAS Buffering Initiator Retry Timeout field is used by SSSF to retry connections to the host when SSSF
cannot open the host to send out the frames received from the drive. All frames in the SSSF buffer are dropped
when the retry timeout timer expires. This parameter’s unit is 2 ms.
• Note: The default value should ensure there is enough time for OPENs to be retried in a long cascade of
expanders. You can tune this value based on the actual topology.
• The “STP open control disable” field is used to control whether every STP open request from host is processed
by the SSSF firmware or the hardware. When this bit is set to 0, all STP open requests from the host will be
processed by SSSF firmware. In this mode, hosts could be dynamically switched. When it is set to 1, STP open
requests from the host will be processed by SSSF hardware. In this mode, hosts could be dynamically switched
only when the host issues SMP hard reset to the SATA drives after the host is connected into the system. SATA
performance would be improve in this mode.
• The SATA Buffering Link Reset Error PHY Enable field is used to enable/disable a link reset on a SATA PHY
when a retry timeout occurs or when an I/O timeout is detected by SSSF.
• Set this field to “0” to disable this feature. SSSF resets the PHY when it detects the errors mentioned above.
Set this field to “1” to enable this feature. SSSF waits for the host to detect the situation and to complete the proper
error handling. For example, the host performs a link reset on the drive PHY when it detects an I/O timeout.
• The “Xopen Detect En” field, when set to 1 will enable the xopen deadlock detection and recovery logic. Setting
to 0 will disable the logic.
• The “Multi-LUN En” field when set to 1 will enable the SSSF error handling for multi-LUN devices.
Table 8-10. SXP 12G Initialization String Table—PHY Configuration Per PHY
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
Async
Reserved Break Reply Enable Recovery Invert TX Invert RX No SATA Disable PHY 0x00 Bit Fields
Disable
PHY rate
0x0230 – 0x025F {1, 2, 3, 4,
(L_PHY0 Info) 6,
7,8,10,11,
Max SATA Rate PHY Rate 0x4F
12,14,15}
Max SATA
rate {0, 1,
2, 4}
G4
G3 WITHOUT G2 WITH G2 WITHOUT G1 WITH G1 WITHOUT
G4 WITH SSC WITHOUT G3 WITH SSC 0xFF
SSC SSC SSC SSC SSC
SSC
RX 3 ID TX 3 ID
TX_ID_FRAME_GAP 0xC0
FRAMES FRAMES
TX SSC
Down-Spread Reserved 0x00
Type
0x00–
STP Bridge AWT MSB 0x00
0xFF
0x00–
STP Bridge AWT LSB 0x00
0xFF
0x00 –
Connection Policing Timer 0x00
0xFF
Disable STP/SAS
Power Disable Advance Broad-cast change ALIGN
Reserved STP Align Density SAS Align Density 0x00
Supported SATA Sync Suppress density
Forward {0, 1, 2}
Reserved 0x00
...........continued
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
RX PEAK
RX PEAK
ENB SAS1 Reserved RX PEAK SAS[2:0] 0x01
ENB SAS1 3G
1G5
RX PEAK
RX PEAK
ENB SATA RX PEAK SATA 6G[5:3] RX PEAK SATA 1G5 3G[2:0] 0x29
ENB SATA 3G
1G5
T PISO PRE2
AMPLITUDE SAS 1G5 [6:0] 0x36
SEL SAS 1G5
T PISO PRE2
AMPLITUDE SAS 3G [6:0] 0x36
SEL SAS 3G
T PISO PRE2
AMPLITUDE SAS2 6G [6:0] 0x40
SEL SAS2 6G
T PISO PRE2
SEL SATA AMPLITUDE SATA 1G5 [6:0] 0x1C
1G5
T PISO PRE2
AMPLITUDE SATA 3G [6:0] 0x1C
SEL SATA 3G
T PISO PRE2
AMPLITUDE SATA 6G [6:0] 0x30
SEL SATA 6G
T PISO EDGE
T PISO EDGE DELAY
DELAY SEL POSTCURSOR SAS 1G5 [5:0] 0xC0
SEL SAS 1G5
SATA 1G5
T PISO EDGE
T PISO EDGE DELAY
DELAY SEL POSTCURSOR SAS 3G [5:0] 0xC0
SEL SAS 3G
SATA 3G
T PISO EDGE
T PISO EDGE DELAY
DELAY SEL POSTCURSOR SAS2 6G [5:0] 0x0D
SEL SAS2 6G
SATA 6G
TRS TXCLK SEL SATA 1G5 SSC POSTCURSOR SATA 1G5 [5:0] 0x00
SAS12G PGA
TX Cx BCT PRST DFLT Reserved TX BCT EN SAS3 12G Reserved 0x44
BOOST EN
SAS/SATA
Reserved Buffering 0x00
Enable
...........continued
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
SAS
6G/3G 12G Connection
Buffering SAS Buffering
Management SAS Buffering
Reserved Snoop Connection Management OAF Early SAS Buffering 6G 0x02
3G
TMF Accept Enable Enable
Enable
Enable
Reserved 0x00
SATA
Reserved Reserved SATA Buffering 6G 0x02
Buffering 3G
Reserved 0x00
Reserved 0x00
0x0290 – 0x0EBF
(L_PHY3 – … …
L_PHY66 Info)
PHY reset
timeout
0x020C PHY reset in progress timeout 0x0F
handling
Enable
Each of the PHYs contains the following parameters that can be configured individually.
Note: The values in the tables reflect the hardware reset default and do not necessarily specify any particular
signaling levels.
• The “Disable PHY” field configures PHY n to startup in a disabled state. Normally, the PHY tries to establish a
serial connection. By defaulting to the disabled state, the PHY must be enabled under SMP control for the link to
start.
• The “No SATA” field prevents PHY n from negotiating with a SATA drive. This configures the SSPL
SATA_BRIDGE register bit to logic 0 so that it only uses SAS OOB. No SATA OOB is completed.
• The “Invert TX” field inverts the serial transmit data sent on the transmitter differential pair of PHY n.
• The “Invert RX” field inverts the serial receive data received on the receiver differential pair of PHY n.
• The “Async Recovery Disable” field tells the expander not to support SATA asynchronous signal recovery. When
Async Recovery is enabled, the expander transmits a COMRESET OOB signal after it receives an unexpected
COMINIT OOB signal from a device PHY. When disabled, no COMRESET OOB signal is transmitted when the
expander receives an unsolicited COMINIT OOB sequence.
• The “Break Reply Enable” field controls the PHY capability of responding to received BREAK primitive
sequences with a BREAK_REPLY primitive sequence. When set to:
– 0: Break Reply is disabled
– 1: Break Reply is enabled.
• The “PHY Rate” field specifies the rate that PHY n supports. This field prevents speed negotiation at link rates
not defined in this field. This field is also used by the firmware to report the minimum and maximum rates of the
PHY. The supported PHY Rates are shown in the following table.
Table 8-11. PHY Rate Setting
1 1.5G only
...........continued
PHY Rate Setting Description
2 3.0G only
4 6.0G only
8 12.0G
Note:
• This field controls SAS 1.1 and the SATA link rate, and controls the SAS 2.0/2.1 link rate with SNW PHY
capability field (initialization string 0x0232 field).
• The “Max SATA Rate” field limits the SATA speed negotiation to the maximum rate as shown in the following
table. If the “Max SATA Rate” exceeds the capability of “PHY Rate”, “Max SATA Rate” is not valid, and the actual
connection PHY rate with SATA drive will be configured by the “PHY Rate” setting only.
• When “PHY Rate” is configured to both 3G and 6G support, and “Max SATA Rate” is configured to 3G, the
firmware does not support the attachment of a 1.5G-only SATA drive.
Table 8-12. Maximum SATA Rate Limit
0 The maximum rate is controlled by the PHY Rate Setting and the attached disk
drive
1 up to 1.5G
2 up to 3.0G
4 up to 6.0G (default)
8 TBD
The “G1/G2/G3/G4_WITH_SSC” and “G1/G2/G3/G4_WITHOUT_SSC” fields work with the PHY Rate field to
determine SAS 2/3 spread spectrum clocking support for PHYn in SAS operation mode at PHY rates G1/G2/G3/G4.
Table 8-12 lists the most frequent settings for the supported SAS 2.0/2.1 link rates. For unsupported link rates, the
related SNW3 PHY Capability fields are ignored by firmware and are highlighted in the following table.
G2 with/
Supported Link Bit 0 Bit 1 Bit 2 Bit 0 without
Rate (1.5G) (3G) (6G) (1.5G) Bit 1 (3G) SSC Bit 0 (1.5G) Bit 1 (3G)
1.5G 1 0 0 0 1[1]
3G 0 1 0 0 1[1]
6G 0 0 1 0 1
12G 0 0 0 1 1
1.5G/3G/6G 1 1 1 0 1 1 1
1.5G/3G/6G/12G 1 1 1 1 1 1 1 1
3G/6G 0 1 1 0 1 1
3G/6G/12G 0 1 1 1 1 1 1
6G/12G 0 0 1 1 1 1
• Note [1]:
– For connecting the legacy SAS1 device, the corresponding bits in SNW3 PHY Capabilities are optional.
• The “TX_ID_FRAME_GAP” fields specify the number of SYSCLK cycles between transmissions of two ID
frames. This is only valid when TX_3_ID_FRAMES is set to ‘1’.
• The “TX_3_ID_FRAMES” field specifies whether to enable to transmit 3 identify frames. The value of ‘1’
indicates to enable to transmit three identify frames.
• Notes: When SSSF buffering or connection management is enabled, changing this field will not change the SXP
behaviour.
• The “RX_3_ID_FRAMES” field specifies whether to enable to receive up to 3 identify frames. The value of ‘1’
indicates to enable to receive up to three identify frames.
• The “TX SSC Down-Spread Type” is used to configure the TX SSC TYPE in SNW-3 PHY Capabilities. When set
to:
– 1: Use down-spreading SSC
– 0: Use center-spreading SSC (default)
• The “STP Bridge AWT” field specifies the arbitration wait time to use for the OPEN frame request when
operating the STP bridge mode.
• The “Connection Policing Timer” field specifies the minimum amount of time in milliseconds before BREAK
primitives are sent to the two PHYs comprising the current connection if the link is idle. A value of zero disables
the timer and the sending of the BREAK primitives.
• The “Broadcast change Suppress” field specifies if BROADCAST(CHANGE) primitives are detected only in a
selected number of link states. When this bit is set to 1, the primitives are only detected in a number of states.
When set to 0, it enables the state machine to detect primitives in each state. This bit should be left disabled (0).
• The “Disable Advance SATA Sync Forward Mode” controls how SATA SYNCs are forwarded by the expander.
The expander device contains an algorithm that drops subsequent SATA SYNC primitives in a sequence of two
or more received primitives. This mode should always be enabled and the bit should be set to 0.
• The “Power Disable Supported” controls if expander supports Power disable feature defined in SPL3r6:
– 0: Power disable not supported
– 1: Support power disable
• Notes, if the “Power Disable Supported” is enabled:
Note:
• The “STP Align Density” field controls the STP Align Density Mode which correspondingly determines the Align
Density in the SXL_6G STP link. The default STP Align Density Mode is 0 which means High Align Density
disabled and 2 ALIGN every 256 Dwords in the STP link.
Table 8-15. STP Align Density Mode
STP Align Density Mode STP Align Density Field in SXL Description
Align Density Register
– 1: Maximal delay
• The “POSTCURSOR SAS 1G5/SAS 3G/SAS2 6G/SATA 1G5/SATA 3G/SATA 6G” field controls post-cursor
de-emphasis.
• The “PRECURSOR SAS 1G5/SAS 3G/SAS2 6G/SATA 1G5/SATA 3G/SATA 6G” field is used to adjust TX edge
rate when the “T PISO PRE2 SEL x” field = 0.
• The “T PISO PRE2 MODE1 SAS2 6G/SATA 6G” field set to '1' to invert polarity of pre-cursor pre-emphasis.
Effective only when T PISO PRE2 SEL x is 1.
• The “TX BCT EN SAS3 12G” field enables the Tx back-channel negotiation in SAS-3 12G mode
• The “TRS TXCLK SEL SATA 1G5/3G/6G SSC” field selects SATA SSC for the corresponding SATA rate. When
set to:
– 0: No SSC (Default)
– 1: SSC Down-spread
– 3: SSC Center-spread (normally for SAS-2 only)
• The “SAS12G PGA BOOST EN” field provides the per-PHY PGA boost option:
– 1: Enable PGA boosting, DP_FFE_M_PRELOAD_SAS3_12 preload read from the initial string field “DP
FFE M PRELOAD SAS3 12G” in Table 8-10.
– 0: Disable PGA boosting, DP_FFE_M_PRELOAD_SAS3_12 preload is hardware default value(39).
• The “TX Cx BCT PRST DFLT” field is the default Tx coefficient setting for back channel training. The
recommended default preset is SAS Reference 2 regardless of cable length.
Table 8-16. Tx Coefficient Settings
TX_Cx_BCT_PRST_DFLT Description
• The “TX C1 NON BCT” field is set for pre-cursor tap for optical or active cable environments
• The “TX C2 NON BCT” field is set for main tap for optical or active cable environments
• The “TX C3 NON BCT” field is set for post-cursor tap for optical or active cable environments.
• The “TX C1 BCT START POINT” field is the default TX C1 when TX Cx BCT PRST DFLT is set to 0.
• The “TX C2 BCT START POINT” field is the default TX C2 when TX Cx BCT PRST DFLT is set to 0.
• The “TX C3 BCT START POINT” field is the default TX C3 when TX Cx BCT PRST DFLT is set to 0.
Notes:
For legacy operation, AMPLITUDE, PRECURSOR and POSTCURSOR names are used. For SAS3
operation, names changed for C1, C2 and C3, and these are normally automatically adapted unless overridden
by the user.
You can translate the AMP, PRE, POST values into C1, C2, C3 values as follows:
• PRECURSOR = -C1
• AMPLITUDE = -C1+C2-C3
• POSTCUSOR = -C3
Notice how C1 and C3 are negative values:
Where, C1=[-32,0], C3=[-32,0] and C2 = [0,64+C1+C2]
In terms of PRE, AMP and POST, these ranges become:
PRECURSOR=[0,32], AMPLITUDE=[PRECUSOR+POSTCURSOR,64] and POSTCURSOR=[0,32]
• The SAS/SATA buffering enable field is used to enable or disable the SAS/SATA buffering feature of the PHY
attached to the drive. Setting this field to “0” disables this feature and setting it to “1” enables this feature.
For SATA buffering, it improves the bandwidth utilization only for NCQ commands, but it does not block non-NCQ
commands. SATA buffering should be disabled on PHYs attached to SATA drives that do not support NCQ, as well as
PHYs that are attached to expanders or host HBAs.
Notes: SAS buffering is not supported on subtractive PHYs or to wide port targets.
• The SAS buffering 3G/6G fields are used to enable or disable SAS buffering on 3G/6G drive link rates. Setting
this field to “0” disables SAS buffering on this drive link rate and setting it to “1” enables SAS buffering on this
drive link rate.
Notes:
In SAS buffering mode, if the transfer size of the XFER_RDY frame received from the drive is larger than the effective
SSSF_BUFFER_SIZE, the SSSF splits the frame into several XFER_RDY frames before sending them to the host.
Each frame has a transfer size smaller than or equal to the effective SSSF_BUFFER_SIZE.
• If the attached SAS drive is 6G, the effective SSSF_BUFFER_SIZE is 22K. If the attached SAS drive is 3G, the
effective SSSF_BUFFER_SIZE is 16K.
• The SAS Buffering OAF Early Accept Enable field, when enabled, allows SSSF to accept the OPEN frame
directly from the host instead of waiting for the OPEN_ACCEPT from the drive.
– Set this field to “0” to disable this feature when using multi-initiator environments because the target device
may reject incoming connections when it already has outstanding I/Os for another host.
– Set this field to “1” to enable this feature in single initiator environments for better performance because
this allows SSSF to accept the connection request from the host while it forwards the request to the target
device at the same time.
• The SAS Buffering Snoop TMF field, if enabled, allows SSSF to drop frames in its buffer that are received from
the host when TMF is received, and sends out TMF to the drive in the next connection. Setting this field to
“0” disables this feature and setting it to “1” enables this feature. SSSF snoops the TMF for the following task
management functions:
– ABORT TASK SET
– CLEAR TASK SET
– I_T NEXUS RESET
– LOGICAL UNIT RESET
• The 12G connection management enable field is used to enable or disable the 12G connection management
feature of the PHY attached to a negotiated 12G target. Setting this field to “0” disables this feature and setting it
to “1” enables this feature.
• The 6G/3G connection management enable field is used to enable or disable the connection management
feature of the PHY attached to a negotiated 6G/3G target. Setting this field to “0” disables this feature and
setting it to “1” enables this feature. This functionality will ensure that no more than 25/19 data frames are sent
in the connection from the 6G/3G target to the initiator.
• The SATA buffering 3G/6G fields are used to enable or disable SATA buffering on 3G/6G drive link rates. Setting
this field to “0” disables this feature and setting it to “1” enables SATA buffering on this link rate.
• The maximum frame count field only takes effect if the 12G connection management feature is enabled and the
attached SAS target has negotiated to 12G. For Read data, the value in Maximum frame count field controls
the amount of data that can be transferred during a connection opened by SSSF. The actual transferred frame
count within one connection will not exceed (maximum frame count + 2).For write data, the value specifies
the maximum amount of data that SSSF requests through a XFER RDY frame. If the XFER RDY frame count
requested by the target is less than the value of the maximum frame count, SSSF will use the requested size
from the drive instead. The valid range for this field is from 10 to 64.
• The DP FFE M PRELOAD SAS3 12G field defines the value of “DP FFE M PRELOAD SAS3 12G” based on per
PHY configuration. Only valid when “DP FFE M PRELOAD SAS3 12G Global Disable” set to 1 and “SAS12G
PGA BOOST EN” to 1;
• The Test Threshold field defines the value of “Test Threshold” based on per PHY configuration. Only valid when
“Test Threshold Enable” set to 1;
0x1133-
0x00
0x113F Reserved
PHY 0
PHY 0 Unmanaged
0x1143 Reserved for PHY 0 Connector Info Managed 0x00
Connector Type
Type
PHY 67 PHY 67
0x124F Reserved for PHY 67 Connector Info Unmanaged Managed 0x00
Connector Type Type
0x1250 -
0x00
0x127F Reserved
• FIRST ENCLOSURE CONNECTOR ELEMENT INDEX indicates the first index value of connectors that have
CONNECTOR TYPE fields set to 20h to 2Fh. The default is 0.
• TOTAL NUMBER OF ENCLOSURE CONNECTOR indicates the total number of supported drive connectors
and wide connectors.
• FIRST VIRTUAL CONNECTOR ELEMENT INDEX indicates the index value of the first virtual connector (type
2Fh). This index should be one plus the index value of the last internal connector that has CONNECTOR TYPE
fields set to 20h to 2Eh. If there are no internal connectors configured, the default value is one plus the index
value of the last external connector of type 05h. Refer to the Connector Element Index Example in Figure 21 for
the connector element structure. Currently, the SXP12G device is configured to only have one virtual connector.
• The initialization string also includes a provision to support the reporting of SES-3 SAS Connector Elements
on a per PHY basis. The connector elements are described in the SCSI Enclosure Specification [17] while its
SMP reporting structure is documented in the SAS standard [3]. The initialization string table for reporting the
connector information is arranged in ascending order according to the logical PHY ID. Information for up to 68
PHYs may be defined.
• PHY Connector Type indicates the mechanical interface type such as SFF-8644, the value is constant since the
interface is definitive after board design.
• PHY Connector Element Index indicates which connector is to be indexed. The index value depends on the
number of connectors. The Connector Element Index should obey three rules,
– The index value of all connectors, including virtual connector, should be contiguous, and starts from 0.
– The index value of internal connectors that have CONNECTOR TYPE fields set to 20h to 2Eh should be
contiguous.
– The index value of virtual connector should be one plus the index value of last internal connector that have
CONNECTOR TYPE fields set to 20h to 2Eh.
The following figure shows an example of connector element index settings.
Figure 8-1. Connector Element Index Example
PHY Connector Physical Link indicates the physical link in the connector represented by this element. A
CONNECTOR PHYSICAL LINK field set to FFh indicates that the element represents the entire connector, not just
one physical link in the connector. Physical links in a connector must be numbered starting with zero. If a connector
has only one physical link, the CONNECTOR PHYSICAL LINK field should be set to 00h rather than FFh.
Unmanaged Connector Type field indicates four cable types can be connected, the field is valid when manage type is
set to zero.
10 Reserved
11 SAS-2.1/3 optical
Managed Type field supports the statically managed mode when set to 0 and the dynamically managed through TWI
when set to 1.
Table 8-18. SXP 12G Initialization String Table—Additional PHY Event Source Configuration Block
Byte \ Value
Bit 7 6 5 4 3 2 1 0 Default Range
0x1284 -
Reserved 0x00
0x129F
• The additional PHY Event 0 selector selects a pre-configuration PHY Event source 0. It impacts the PHY
identifiers.
• The additional PHY Event 1 selector selects a pre-configuration PHY Event source 1. It impacts the PHY
identifiers
• The additional PHY Event 2 selector selects a pre-configuration PHY Event source 2. It impacts the PHY
identifiers
• The additional PHY Event 3 selector selects a pre-configuration PHY Event source 3. It impacts the PHY
identifiers
• Notes: When buffering or connection management is enabled, these events will not be used.
Table 8-19. SXP 12G Initialization String Table—SGPIO Configuration
Byte \ Bit 7 6 5 4 3 2 1 0 Default Value Range
SGPIO
SGPIO
Cascade SGPIO PHY Ready
Cascade Enable
0x12A0 SGPIO Cascade General Purpose Slave Load Pattern Master Indication 0x12
0x12A6 SGPIO Cascade General Purpose Output Offset Timeslot (LSB) 0x00A0
IBPI Enable
0x12A9 Reserved Blink Rate C Flag GPIO Enable 0x01
0x12AE SGPIO PHY Ready Update Rate (in units of 10ms) 0x0A 0x00 – 0xFF
0x12B0 SGPIO Update Rate (in units of us) (LSB) 0x3D09 0x3D09 – 0xFFFF
0x12B3 –
0x12BF Reserved (for SGPIO expansion)
...........continued
0x12C0 –
0x131F Reserved for more 3 configuration instances (customer could use this space to configure) 0x00
SGPIO PHY Ready Indication Setting SGPIO Bit that Indicates PHY Ready Condition
0 No indication
1 Activity bit
2 Locate bit
3 Error bit
Byte \ Value
7 6 5 4 3 2 1 0 Default
Bit Range
Disable
Fatal Error
CMDSVR UART
0x1324 Handler Reserved(6-3) Expander 0x80 0x00 – 0x03
ID
Enable(7)
phy
...........continued
Byte \ Value
7 6 5 4 3 2 1 0 Default
Bit Range
Non-
Threadx Interface: 0-1
0x1325 Nonthreadx CMDSVR TWI Port ID 0x04 TWI port ID:
CMDSVR
0-11
Interface
CMDSVR UART Baud Rate Field Value CMDSVR UART Baud Rate Field
Value
0 9600 baud
1 19200 baud
2 28800 baud
3 38400 baud
4 57600 baud
5 115200 baud
6–15 Reserved
Set to 0 for seconds; Set to 1 for minutes; Set to 2 for hours and 3 is reserved.
Byte \ Value
7 6 5 4 3 2 1 0 Default
Bit Range
SPS Bit
0x1328 Reserved 0x00
Aware Fields
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x05
0x1329 TWI Master Stretch Time(ms) 0xFF
0x132B –
Reserved 0x00
0x132F
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1340 -
0x134f Reserved 0x00
8.3.1.79 TWI_SPI_ON_SPGIO_UART_MUXING_CONTROL[31:0]
These fields indicate current function of the GPIO. Value of these fields is written to the EXTSS_APB_PCBI –
TWI_SPI_ON_SGPIO_UART_MUXING_CONTROL register (0xA9000000). Refer to [30] for details.
Bit 10 – EN_EMIP_UART_ON_UART_PORT. 1 for EMIP_UART, 0 for NORMAL_UART.
Bit 9:4 – EN_SPI_ON_UART_PIN. 1 for SPI, 0 for UART.
Bit 3:0 – EN_TWI_ON_SGPIO_PORT. 1 for TWI, 0 for SGPIO.
8.3.1.80 GPIO_PIN_MUXING_CONTROL0[31:0]
These fields indicate the Functional Pin acts as GPIO or Functional Pin. Value of these fields is written to the
EXTSS_APB_PCBI – GPIO_PIN_MUXING_CONTROL0 register (0xA900004C). Refer to [30] for details.
1: Functional Pin act as GPIO.
0: Functional Pin acts as Functional Pin.
8.3.1.81 GPIO_PIN_MUXING_CONTROL1[31:0]
These fields indicate the Functional Pin acts as GPIO or Functional Pin. Value of these fields is written to the
EXTSS_APB_PCBI – GPIO_PIN_MUXING_CONTROL1 register (0xA9000050). Refer to [30] for details.
1: Functional Pin act as GPIO.
0: Functional Pin acts as Functional Pin.
8.3.1.82 GPIO_PIN_MUXING_CONTROL2[31:0]
These fields indicate the Functional Pin acts as GPIO or Functional Pin. Value of these fields is written to the
EXTSS_APB_PCBI – GPIO_PIN_MUXING_CONTROL2 register (0xA9000054). See [30] for details.
1: Functional Pin acts as GPIO.
0: Functional Pin acts as Functional Pin.
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
MISC_OUTPUT TWI_DRIVE_MOD
Reserved
0x1350 S E 0x00 Bit fields
0x1352 -
Reserved 0x00
0x135F
8.3.1.83 MISC_OUTPUTS
These 2 bits control the mode pins for outputs or bi-directionals such as INTOB, MIPS_RDY and AVS_ENB.
8.3.1.84 TWI_DRIVE_MODE
These 2 bits control the mode pins for the TWI & SGPIO interface.
8.3.1.85 UART_DRIVE_MODE
These 2 bits control the mode pins for the UART interface.
8.3.1.86 SPI_DRIVE_MODE
These 2 bits control the mode pins for the SPI interface.
8.3.1.87 ETHERNET_DRIVE_MODE
These 2 bits control the mode pins for the Ethernet interface.
8.3.1.88 LBI_DRIVE_MODE
These 2 bits control the entire Local Bus Interface.
Table 8-27. Drive Strength Modes
00 3mA
01 7mA
10 15mA
11 18mA
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x1360 DHCP ON/OFF 0x00
0x01
0x00 –
0x1361 Local IP[0] 0x0A
0xFF
0x00 –
0x1362 Local IP[1] 0xBC
0xFF
...........continued
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x1363 Local IP[2] 0x75
0xFF
0x00 –
0x1364 Local IP[3] 0x50
0xFF
0x00 –
0x1365 Net Mask [0] 0xFF
0xFF
0x00 –
0x1366 Net Mask [1] 0xFF
0xFF
0x00 –
0x1367 Net Mask [2] 0xFC
0xFF
0x00 –
0x1368 Net Mask [3] 0x00
0xFF
0x00 –
0x1369 Gate Way [0] 0x0A
0xFF
0x00 –
0x136A Gate Way [1] 0xBC
0xFF
0x00 –
0x136B Gate Way [2] 0x74
0xFF
0x00 –
0x136C Gate Way [3] 0x01
0xFF
0x00 –
0x136D MAC Addr [0] 0x00
0xFF
0x00 –
0x136E MAC Addr [1] 0xE0
0xFF
0x00 –
0x136F MAC Addr [2] 0x04
0xFF
0x00 –
0x1370 MAC Addr [3] 0xFE
0xFF
0x00 –
0x1371 MAC Addr [4] 0xDC
0xFF
0x00 –
0x1372 MAC Addr [5] 0xBA
0xFF
0x00 –
0x1374 Ethernet PHY ID 0x01
0x1F
0x00-0x0
0x1375 KEEPALIVE ENABLE 0x00
1
...........continued
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
0x137B –
Reserved 0x00
0x13DF
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x13E1 -
Reserved 0x00
0x13EC
… 0x00
… 0x00
8.3.1.89 POLARITY
This bit selects the polarity for the AC_GOOD_L signal.
When this bit is set to 0, the AC_GOOD_L signal is active low.
When the bit is set to 1, the AC_GOOD_L signal is active high.
8.3.1.90 EPOW_EN
This bit enables the EPOW feature.
8.3.1.91 Q_PHY
Q_PHY bitmap is used to qualify the EPOW condition. When the EPOW trigger condition is met, at least one of the
PHYs identified by the Q_PHY bitmap is in a PHY ready state.
8.3.1.92 N_PHY
N_PHY bitmap is used to specify the PHYs that transmit NOTIFY (POWER LOSS EXPECTED) when EPOW
conditions are met.
Table 8-30. SXP 12G Initialization String Table—Error LOG Configuration Block
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
LOG
Flash
Runtime LOG Filter
0x1400 Reserved Saving LOG Filter Count 0x08
Saving Count: 0~16
Enable
Device
Filter Level:
0x1401 LOG Entry Count [19:16] LOG Global Filter Level 0x02
0~5
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x140D External RAM LOG Saving Base Address [23:16] 0x10 Address in
External
0x140E External RAM LOG Saving Base Address [15:8] 0x00 RAM
0x1410 External RAM SCFG LOG Saving Base Address [31:24] 0x98
0x1411 External RAM SCFG LOG Saving Base Address [23:16] 0x1C Address in
External
0x1412 External RAM SCFG LOG Saving Base Address [15:8] 0x00 RAM
0x1413 External RAM SCFG LOG Saving Base Address [7:0] 0x00
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
Type:
0x00~0x02
LOG Filter Level Reserved LOG Filter Type 0x31
Level:
0x01~0x05
0x1421 –
LOG Filter 1~15 Block, same as LOG Filter 0
0x14A7
0x14A8-
Reserved 0x00
0x14BF
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
Bit
Reserved WOL/WOS enabling 0x00
0x14C0 Fields
WOS_UPSTREAM_PHY_MAP
0x14C3 (Reserved) WOS_UPSTREAM_PHY_MAP [67:64] 0x00
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
…… …… 0x00
…… …… 0x00
0x14D5-0
x14D7 Reserved 0x00
…… …… 0x00
0x14DC-
Reserved
0x14DF 0x00
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
Hard-
ware Heart-
Watch- beat
dog LED
0x1830 Reserved Enable Enable 0x03 Bit Fields
0x00 –
0xFF (0
implies
every
0x1831 SAS Thread Watchdog Kick Interval (in units of 10 messages per interval) 0x64 message)
0x00 –
0xFF (0
disables
0x1832 EMA Thread Peripheral Polling Interval (in units of seconds) 0x01 polling)
0x02 –
0x1835 Watchdog Block Timeout (in seconds) 0x1C 0x39
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1846 –
0x184F Reserved 0x00
0x00 –
0x1850 Command Server Thread Priority 0x0D 0x1F
0x00 –
0x1851 EMA Thread Priority 0x0C 0x1F
0x00 –
0x1852 Port Manager Thread Priority 0x04 0x1F
0x00 –
0x1853 SAS Thread Priority 0x02 0x1F
0x00 –
0x1854 SCSI Thread Priority 0x05 0x1F
0x00 –
0x1855 SGPIO Thread Priority 0x06 0x1F
0x00 –
0x1856 SMP Initiator Thread Priority 0x03 0x1F
0x00 –
0x1857 Watchdog Thread Priority 0x0B 0x1F
0x00 –
0x1858 Serial ATA Host Application Thread Priority 0x09 0x1F
0x00 –
0x1859 SCSI Initiator Application Thread Priority 0x08 0x1F
0x00 –
0x185A Disk Qualification Thread Priority 0x0A 0x1F
0x00 –
0x185B PHY Reset Timer 0x00 0x50
0x00 –
0x185C TCPIP Telnet Server Thread Priority 0x0D 0x1F
0x00 –
0x185D TCPIP Timer Task Thread Priority 0x0A 0x1F
0x00 –
0x185E TCPIP Receive Task Thread Priority 0x0D 0x1F
0x00 –
0x185F SAS connector manager thread priority 0x07 0x1F
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1860 –
0x186F Reserved (for OS configuration expansion) 0x00
Watchdog Block Timeout Parameter Value Actual Hardware Watchdog Timeout Period
2 s to 3 s 3.6 s
4 s to 7 s 7.2 s
8 s to 14 s 14.3 s
15 s to 28 s 28.6 s
29 s to 57 s 57.3 s
For example, with a default setting of 28 s, the hardware timeout period used is 28.6 s. This is when the first
watchdog interrupt is asserted if it is not kicked (reset) in time. Firmware then enters Customer Fatal Error Handler.
Refer to section 17.6.1 Customer Fatal Error Handler for details.
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
TLR CONTINU
0x1885 Reserved 0x01
CTRL E AWT
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x188A SSP MAXIMUM CONNECT TIME LIMIT [15:8] (100 us) 0x27
0x188B SSP MAXIMUM CONNECT TIME LIMIT [7:0] (100 us) 0x10
0x188E STP Max Connect Limit time [15:8] (100 us) 0x00
0x188F STP Max Connect Limit time [7:0] (100 us) 0x00
0x1894 Reject to Open Limit Time on Retry Open: Reserved [15:8] 0x00
Reject to Open Limit Time on Retry Open: Reserved [7:6] | Path way block [5] |
0x1895 0x3b
Time out [4] | Break[3] | Reserved [2] | No Dest [1] | Retry [0]
0x1898 –
Reserved 0x00
0x18AF
Note
It is recommended to configure this timer with a value larger than 1ms since there is an expected tolerance caused
by firmware delay.
Value
Byte/Bite 7 6 5 4 3 2 1 0 Default
Range
...........continued
Value
Byte/Bite 7 6 5 4 3 2 1 0 Default
Range
0x18B9 –
Reserved 0x00
0x18BB
0x18BC –
SES-3 Supported Pages 0x7FFFFF
0x18BF
0x18C0
Disk Drive Slot 0~15 0x08~0x17
-0x18CF
0x18D0 –
Disk Drive Slot 16~47 0x18~0x37
0x18EF
0x18F0 -
Disk Drive Slot 48 ~ 67 0x00~ 0x00
0x1903
0x1904
Reserved 0x00
-0x190F
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x18BD 0xF4 0xF3 0xF1 0xF0 0x91 0x90 0x86 0x84 0xFF
0xFF
0x00 –
0x18BE 0x83 0x82 0x81 0x80 0x3f 0x0f 0x0e 0x0d 0xFF
0xFF
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x18BF 0x0a 0x07 0x05 0x04 0x03 0x02 0x01 0x00 0xFF 0x000xFF
Note:
1. Page 0x00 (Supported Diagnostic Pages diagnostic page) is always supported. Bit 0 in 0x18BF is ignored.
2. If firmware is configured to support page 0x02 (Enclosure Control/Status diagnostic page) , then page 0x01
(Configuration diagnostic page) should also be supported..
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
Bit
0x1912 Redundant Virtual SSP Link Map [63:56] 0x00 Fields
Bit
0x1913 Redundant Virtual SSP Link Map [55:48] 0x00 Fields
Bit
0x1914 Redundant Virtual SSP Link Map [47:40] 0x00 Fields
Bit
0x1915 Redundant Virtual SSP Link Map [39:32] 0x00 Fields
Bit
0x1916 Redundant Virtual SSP Link Map [31:24] 0x00 Fields
Bit
0x1917 Redundant Virtual SSP Link Map [23:16] 0x00 Fields
Bit
0x1918 Redundant Virtual SSP Link Map [15:8] 0x00 Fields
Bit
0x1919 Redundant Virtual SSP Link Map [7:0] 0x00 Fields
0x191A –
0x191F Reserved (for redundant virtual SSP link configuration) 0x00
A side B side
SAS
1 1
HBA-A 4
Exp-A1 Exp-B1 4
HBA-B
1 1
SPS
SATA
Subtractive Subtractive
SAS
1 1
Exp-A2 Exp-B2
1 1
SPS
SATA
In this example, the two HBAs can be set up to detect the presence of the virtual SSP ports on both branches of the
tree and use this redundant (fallback) link to perform enclosure management operations, if required.
Table 8-39. SXP 12G Initialization String—Disk Qualification, SIA, and SAHA Configuration
0x1922 SIA Thread Maximum Simultaneous Application Requests 0x05 0x01 – 0xFF
0x1924 SAHA Thread Maximum Simultaneous Application Requests 0x01 0x01 – 0xFF
0x192A SIA Thread Maximum Simultaneous Requests from DSQ 0x01 0x01 – 0xFF
0x192B SAHA Thread Maximum Simultaneous Requests from DSQ 0x01 0x01 – 0xFF
0x192C
– Reserved
0x192F
The maximum number of simultaneous requests from DSQ = Min (SIA Thread Maximum Simultaneous Requests
from DSQ, SAHA Thread Maximum Simultaneous Requests from DSQ).
Table 8-40. Initialization String Table—Disk Spin-Up Configuration
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
No
SATA SATA Power
Hier-
FIS Spin-up SATA SATA SAS SAS Bit
0x1930 archical Control 0xCB
Broad- Hold Spin-Up Hold Spin-Up Notify Fields
Spin-Up
cast Broad- Enable
cast
0x00 –
0x1931 Reserved Spin-Up Group 0x03
0x03
0x00 –
0x1932 Reserved Spin-Up Initial Delay 0x01
0x07
0x00 –
0x1933 Reserved Spin-Up Interval Delay 0x00
0x07
0x00 –
0x193E Reserved SSU Mode 0x00
0x02
0 No delay
1 500 milliseconds
2 1 second
3 2 seconds
4 4 seconds
5 8 seconds
6 16 seconds
7 32 seconds
Notes:
When Spin-up Initial Delay is set to 0, 1, or 2 and Spin-up Interval Delay set to 1 second , it may be observed that the
PHY Ready LEDs of several PHYs are being turned ON at the same time instead of 1s interval delay between them.
This is due to delayed refresh of LED status. The Disk Spin-up control however, does function as expected and the
disks are spun-up at the right time slot.
0 500 milliseconds
1 1 second
2 2 seconds
3 4 seconds
4 8 seconds
5 16 seconds
6 32 seconds
7 64 seconds
1 SSU is enabled. The SSU functionality is initialized based on the configuration data and then
put in standby, awaiting a user-programmable enable call in the firmware to start the spin-up
sequence.
2 SSU is enabled. The functionality is initialized and started the moment the firmware comes out of
a reset. In this mode, the Hierarchical Spin-Up Field must be 0.
3 Reserved
0x01 –
0x1941 Power Branch 0 PHY Count 0x00 PHY_COUNT
0x01 –
0x1942 Power Branch 1 PHY Count 0x00 PHY_COUNT
0x01 –
0x194A Power Branch 9 PHY Count 0x00 PHY_COUNT
0x194B–
0x194D Reserved (for SSU) 0x00 0x00
0x00 –
(PHY_COUNT-
0x1950 Combined PHY List Entry 0 0x00 1)
0x00 –
(PHY_COUNT-
0x1951 Combined PHY List Entry 1 0x00 1)
0x00 –
(PHY_COUNT-
0x1993 Combined PHY List Entry 67 0x00 1)
0x1994-0
x199F Reserved
0x19A0 Power Branch 0 Configuration: Peak Power (in Watts) (MSB) 0x00
0x19A1 Power Branch 0 Configuration: Peak Power (in Watts) (LSB) 0x00 0x01 – 0xFFFF
0x19A2 Power Branch 0 Configuration: Per Drive Spin-Up Power (in Watts) 0x00 0x01 – 0xFF
0x19A3 Power Branch 0 Configuration: Per Drive Running Power (in Watts) 0x00 0x01 – 0xFF
0x19A4 Power Branch 0 Configuration: Spin-Up Drive Count Limit 0x00 0x01 – 0xFF
...........continued
Byte/Bit 7 6 5 4 3 2 1 0 Default Value Range
0x19D2 –
0x19DF Reserved (for SSU) 0x00 0x00
Value
Byte \ Bit 7 6 5 4 3 2 1 0 Default
Range
NDSR RF Bit
0x19E0 Reserved 0x00
Enable Enable Fields
0x00
0x19E1 INITIAL TIME TO REDUCED FUNCTIONALITY 0x14
-0xFF
0x00 –
0x19E2 MAXIMUM REDUCED FUNCTIONALITY TIME 0x06
0xFF
0x00 –
0x19E3 Flash Erase Poll Period (in units of 1ms) 0x05
0xFF
port that is not accessible during expander device reduced functionality. This NDSR/RF max waiting timer starts after
the reduced functionality delay timer expires.
For NDSR mode, this field indicates how much time, in seconds, is required to complete a soft reset provided in the
SMP Report General command. However, there is no such timer after a soft reset is actually triggered, since software
timer is invalid after the system is reset.
… … … …
… … … …
0x1A34 –
Reserved 0x00 0x00
0x1A3F
Each byte starting at offset 0x19F0 contains the configuration for one PHY. Although up to 68 PHYs can be
configured, 80 entries are allocated.
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1A40
-
0x00 –
0x1A47 PHY 0 ~ 7’s group ID 0x01 0xFF
0x1A48
-
0x00 –
0x1A4B PHY 8 ~ 11’s group ID 0x00 0xFF
0x1A4C
-
0x00 –
0x1A4F PHY 12 ~ 15’s group ID 0x08 0xFF
0x1A50
-
0x00 –
0x1A53 PHY 16 ~ 19’s group ID 0x09 0xFF
0x1A54
-
0x00 –
0x1A57 PHY 20 ~ 23’s group ID 0x0A 0xFF
0x1A58
-
0x00 –
0x1A5B PHY 24 ~ 27’s group ID 0x0B 0xFF
0x1A5C
-
0x00 –
0x1A5F PHY 28 ~ 31’s group ID 0x0C 0xFF
0x1A60
-
0x00 –
0x1A63 PHY 32 ~ 35’s group ID 0x0D 0xFF
0x1A64
-
0x00 –
0x1A67 PHY 36 ~ 39’s group ID 0x0E 0xFF
0x1A68
-
0x00 –
0x1A6B PHY 40 ~ 43’s group ID 0x0F 0xFF
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1A6C
-
0x00 –
0x1A6F PHY 44 ~ 47’s group ID 0x10 0xFF
0x1A70
-
0x00 –
0x1A73 PHY 48 ~ 51’s group ID 0x11 0xFF
0x1A74
-
0x00 –
0x1A77 PHY 52 ~ 55’s group ID 0x12 0xFF
0x1A78
-
0x00 –
0x1A7B PHY 56 ~ 59’s group ID 0x13 0xFF
0x1A7C
-
0x00 –
0x1A7F PHY 60 ~ 63’s group ID 0x14 0xFF
0x1A80
-
0x00 –
0x1A83 PHY 64 ~ 67’s group ID 0x15 0xFF
0x1A84 -
0x1A8F Reserved 0x00 0x00
Table 8-49. SXP 12G Initialization String—Zone Manager Password and Saving Support Configuration
Value
Byte/bit 7 6 5 4 3 2 1 0 Default
Range
Zone Enable
Zone Zone Zone
PHY Disable
Zoning Manager Permission Manager Zone Information
0x1A90 Reserved Informat Zoning 0x01 Bit Fields
Enable Password Table Save Password Load
ion Save Save
Save Enable Enable Disable
Enable Enable
… … … …
0x1AB1 –
Reserved 0x00 0x00
0x1ACF
By default, the ‘zoning enable’ field is used to enable/disable zoning in an expander device on which zoning capability
is enabled.
Value
Byte/bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x1AD0 Virtual SSP/SMP PHY’s Group ID 0x01
0xFF
0x1AD1 –
Reserved 0x00 0x00
0x1AFF
Note: Ensure that all the PHYs in an expander port have the same zone PHY information configuration including:
• Requested Inside ZPSDS
• Inside ZPSDS Persistent
• Group ID Persistent
• Group ID
Table 8-51. SXP 12G Initialization String—Zoning Permission Table
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default Range
0x1B00 – Bit
0x1B1F Group 0 Permission Entry Fields
0x1B20 – Bit
0x1B3F Group 1 Permission Entry Fields
… …
0x1C00 –
0x1C1E Group 8 Permission Entry
0x1C1F –
0x1C3D Group 9 Permission Entry
0x1C3F –
0x2B7C Group 10 to Group 252 Permission Entry
Bit
0x2B7D Group 253 Permission Entry Fields
0x2B80 -
0x2BFF Reserved
Byte/B Value
7 6 5 4 3 2 1 0 Default
it Range
0x1B00 Group 0 Permission Entry: groups 7 – 0, P[0, 7-0] 0x02 Bit Fields
0x1B01 Group 0 Permission Entry: groups 15 – 8, P[0, 15-8] 0x00 Bit Fields
0x1B02 Group 0 Permission Entry: groups 23 – 16, P[0, 23-16] 0x00 Bit Fields
0x1B03 Group 0 Permission Entry: groups 31 – 24, P[0, 31-24] 0x00 Bit Fields
0x1B04 Group 0 Permission Entry: groups 39 – 32, P[0, 39-32] 0x00 Bit Fields
0x1B05 Group 0 Permission Entry: groups 47 – 40, P[0, 47-40] 0x00 Bit Fields
0x1B06 Group 0 Permission Entry: groups 55 – 48, P[0, 55-48] 0x00 Bit Fields
...........continued
Byte/B Value
7 6 5 4 3 2 1 0 Default
it Range
0x1B07 Group 0 Permission Entry: groups 63 – 56, P[0, 63-56] 0x00 Bit Fields
0x1B08 Group 0 Permission Entry: groups 71 – 64, P[0, 71-64] 0x00 Bit Fields
0x1B09 Group 0 Permission Entry: groups 79 – 72, P[0, 79-72] 0x00 Bit Fields
0x1B0
A~
Group 0 Permission Entry: groups 247 – 80, P[0, 2477-80] 0x00 Bit Fields
0x1B1
E
0x1B1
Group 0 Permission Entry: groups 255 – 248, P[0, 255-248] 0x00 Bit Fields
F
Since the zoning group is extended to 256, the normal entry number is 256*256/8 bytes = 8 Kbytes. This occupies
the initialization string space by half. Considering that the zoning permission table is symmetric as described.
The fields in gray can be removed in the firmware initialization string reducing the initialization string space by about
half. Now, Group 0 ~ 7 needs 32 bytes, Group 8~15 needs 31bytes, … Group 247~255 needs 1 bytes. The total
number is (32+31+..+1)*8 bytes = 4224 bytes.
Table 8-53. Zoning Symmetric
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 32
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 32
2 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 32
3 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 32
4 0 1 R R R R R R R R R R R R 32
5 0 1 R R R R R R R R R R R R 32
6 0 1 R R R R R R R R R R R R 32
7 0 1 R R R R R R R R R R R R 32
8 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 31
9 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 31
10 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 31
… 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP …
254 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 1
255 0 1 ZP ZP R R R R ZP ZP ZP ZP ZP ZP 1
0x3802 –
Reserved 0x00
0x380F
FW Me-
0x3810 – Device ID Entry
Reserved mory 0x00 Bit Fields
0x3822 Option Enable
Enable
(Patch
Entry 0 Device ID [15:8]
Info) 0x0000 0x8056,
Device ID [7:0]
Revision ID
Reserved Revision ID 0x00 Bit Fields
Option
Address [31:24]
Address [7:0]
Mask [31:24]
Mask [23:16]
0x00000000 Any
Mask [15:8]
Mask [7:0]
Value [31:24]
Value [23:16]
0x00000000 Any
Value [15:8]
Value [7:0]
0x3823 –
0x3835 Same as
Same as
(Patch Structure content is the same as that for Patch Entry 0 Patch Entry
Patch Entry 0
Entry 1 0
Info)
...........continued
Byte/Bit 7 6 5 4 3 2 1 0 Default Value Range
0x3836 –
0x3848 Same as
Same as
(Patch Structure content is the same as that for Patch Entry 0 Patch Entry
Patch Entry 0
Entry 2 0
Info)
0x3849 –
0x3FC7
0x3FC8
–
0x3FDA Same as
Same as
Structure content is the same as that for Patch Entry 0 Patch Entry
(Patch Patch Entry 0
0
Entry 104
Info)
0x3FDB
–
0x3FED Same as
Same as
Structure content is the same as that for Patch Entry 0 Patch Entry
(Patch Patch Entry 0
0
Entry 105
Info)
0x3FEE
Reserved 0x00
– 0x3FF7
The Initialization String Patch Table lets you patch any address location accessible by the MIPS processor. This
includes the address range 0x80000000 – 0xFFFFFFFF.
1 Apply patch entry to only the device matching the value in the Device ID field
Revision ID Condition
Option
1 Apply patch entry to only the device matching the value in the Revision ID field
2 Apply patch entry to revisions greater than the revision specified by the Revision ID field
3 Apply patch entry to revisions less than the revision specified by the Revision ID field
Byte \ 7 6 5 4 3 2 1 0 Default
Bit
0x0000 Table Size Byte 1 (MSB) 0x01
0x0001 Table Size Byte 0 (LSB) 0x00
0x0002 Table Revision– Major (Microchip) Table Revision– Minor (Microchip) 0x00
0x0003 Table Revision (vendor-specific) 0x00
–
0x0006
0x0007 Reserved 0x00
0x0008 SAS_BASE_ADDR [63:56] 0x50
0x0009 SAS_BASE_ADDR [55:48] 0x0E
0x000A SAS_BASE_ADDR [47:40] 0x00
0x000B SAS_BASE_ADDR [39:32] 0x4A
0x000C SAS_BASE_ADDR [31:24] 0xAA
0x000D SAS_BASE_ADDR [23:16] 0xAA
0x000E SAS_BASE_ADDR [15:8] 0xAA
0x000F SAS_BASE_ADDR [7:N+1] (the bits masked by SAS base address LSB[N:0] Mask must be 0) 0x00
...........continued
Byte \ 7 6 5 4 3 2 1 0 Default
Bit
0x0010 Reserve SMP SAS address LSB [N:0] 0x7F
d
0x0011 Reserve SSP SAS address LSB [N:0] 0x7E
d
0x0012 Reserve SAS base address LSB[N:0] Mask 0x7F
d
0x0013 Reserved 0x00
0x0014 Logical SUB_PHY_FLAG (reserved) 0x00
0x0015 Logical SUB PHY FLAG (reserved) Logical SUB_PHY_FLAG[67:64] 0x00
0x0016 Logical SUB_PHY_FLAG [63:56] 0x00
0x0017 Logical SUB_PHY_FLAG [55:48] 0x00
0x0018 Logical SUB_PHY_FLAG [47:40] 0x00
0x0019 Logical SUB_PHY_FLAG [39:32] 0x00
0x001A Logical SUB_PHY_FLAG [31:24] 0x00
0x001B Logical SUB_PHY_FLAG [23:16] 0x00
0x001C Logical SUB_PHY_FLAG [15:8] 0x00
0x001D Logical SUB_PHY_FLAG [7:0] 0x0F
Byte\Bit 7 6 5 4 3 2 1 0 Default
0x001E Reserved Ethernet SES Redundant SGPIO Spin-Up Topology 0x00
Info Enclosure VSSP Map
Logical ID
0x001F Reserved 0x00
Disable Route
Table to Obsolete Self-Configuring
0x0020 SSP Table Fan-out Expander Reserved 0x91 Bit Fields
table Enable (Reserved) Expander
Target Port Clean-up
0x01 –
0x0025 Topology Thread Instances 0x01 PHY_
COUNT
0x0029 Application Level SMP Initiator Maximum Retry Count 0x0A 0x00 – 0xFF
SGPIO SGPIO
SGPIO PHY Ready
0x0040 SGPIO Cascade General Purpose Slave SLoad Pattern Cascade Cascade 0x12
Indication
Master Enable
...........continued
GPIO Enable
0x0049 Reserved 0x01
flag
0x004E SGPIO PHY Ready Update Rate (in units of 10ms) 0x0A 0x00 – 0xFF
0x0052 –
Reserved (for SGPIO expansion) 0x00
0x0055
Detailed information for each field can be referenced to the description in Table 8-7.
Table 8-62. Serial EEPROM Initialization String Table—Redundant Virtual SSP Link Configuration
Redundant Virtual SSP Link Map Redundant Virtual SSP Link Map
0x0057 0x00 Bit Fields
(Reserved) [67:64]
0x0058 Redundant Virtual SSP Link Map [63:56] 0x00 Bit Fields
0x0059 Redundant Virtual SSP Link Map [55:48] 0x00 Bit Fields
0x005A Redundant Virtual SSP Link Map [47:40] 0x00 Bit Fields
0x005B Redundant Virtual SSP Link Map [39:32] 0x00 Bit Fields
0x005C Redundant Virtual SSP Link Map [31:24] 0x00 Bit Fields
0x005D Redundant Virtual SSP Link Map [23:16] 0x00 Bit Fields
0x005E Redundant Virtual SSP Link Map [15:8] 0x00 Bit Fields
0x005F Redundant Virtual SSP Link Map [7:0] 0x00 Bit Fields
Detailed information for each field can be referenced to the description in Table 8-38
Table 8-63. Serial EEPROM Initialization String Table—SES-3 Enclosure Logical Identification Configuration
Byte/bit 7 6 5 4 3 2 1 0 Default
0x0068–
Reserved 0x00
0x007B
Detailed information for each field can be referenced to the description in Table 8-36.
Table 8-64. Serial EEPROM Initialization String Table—Ethernet Configuration
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x0080 DHCP ON/OFF 0x00
0x01
0x00 –
0x0081 Local IP[0] 0x0A
0xFF
0x00 –
0x0082 Local IP[1] 0xBC
0xFF
0x00 –
0x0083 Local IP[2] 0x75
0xFF
0x00 –
0x0084 Local IP[3] 0x50
0xFF
0x00 –
0x0085 Net Mask [0] 0xFF
0xFF
0x00 –
0x0086 Net Mask [1] 0xFF
0xFF
0x00 –
0x0087 Net Mask [2] 0xFC
0xFF
0x00 –
0x0088 Net Mask [3] 0x00
0xFF
0x00 –
0x0089 Gate Way [0] 0x0A
0xFF
0x00 –
0x008A Gate Way [1] 0xBC
0xFF
...........continued
Value
Byte/Bit 7 6 5 4 3 2 1 0 Default
Range
0x00 –
0x008B Gate Way [2] 0x74
0xFF
0x00 –
0x008C Gate Way [3] 0x01
0xFF
0x00 –
0x008D MAC Addr [0] 0x00
0xFF
0x00 –
0x008E MAC Addr [1] 0xE0
0xFF
0x00 –
0x008F MAC Addr [2] 0x04
0xFF
0x00 –
0x0090 MAC Addr [3] 0xFE
0xFF
0x00 –
0x0091 MAC Addr [4] 0xDC
0xFF
0x00 –
0x0092 MAC Addr [5] 0xBA
0xFF
0x00 –
0x0094 Ethernet PHY ID 0x01
0x1F
0x0095 –
Reserved for Microchip 0x00 0x00
0x00BF
0x00C0 –
Reserved for Customers 0x00 0x00
0x00FB
0x00FC – 0x00 –
CRC for offset 0x0000 ~ 0x00FB 0x00
0x00FF 0xFF
Detailed information for each field can be found in the description in Table 8-38.
Table 8-65. Serial EEPROM Initialization String Table—SES-3 subenclosure nickname
Byte/Bit 7 6 5 4 3 2 1 0 Default
...........continued
Byte/Bit 7 6 5 4 3 2 1 0 Default
Byte/Bit 7 6 5 4 3 2 1 0
Zoning
0 Reserved
Enable
2 Reserved
4 - -
Zone Manager Password
35 - -
36
CRC of Zone Manager Password and Zoning Enable
39
… …
… - -
Zone PHY Information Descriptor for PHY m (=68)
40+69*2 = 178 - -
179
CRC of Zone PHY Information Descriptor and Number of PHYs
182
183 Reserved
184
Number of Zone Groups (n=256)
185
… …
… - -
8378
CRC of Zone Permission Table and Number of Zone Groups
8381
8382 Reserved
Byte/Bit 7 6 5 4 3 2 1 0
1 ZONE GROUP
The definitions of the fields in Table 8-66 and Table 8-67 are consistent with the definitions in [4].
Table 8-68. Permission Policy Table for a source group (i.e., s)
Byte/Bit 7 6 5 4 3 2 1 0
0 ZP(s, n-1) ZP(s, n-2) ZP(s, n-3) ZP(s, n-4) ZP(s, n-5) ZP(s, n-6) ZP(s, n-7) ZP(s, n-8)
… …
Yes
Yes
No
If the watchdog thread does not have enough real time to run, or if one or more users do not respond with pong
messages within a hardware watchdog timeout period, the watchdog thread will not reload the hardware watchdog
timer and allow it to expire. The hardware watchdog timer expiry has two stages.
• After the first hardware timeout period without being reloaded, the watchdog timer NMI interrupt is triggered. The
hardware watchdog timer interrupt service routine calls the watchdog NMI handler or PMCFW_ASSERT macro
which executes the user hook (wdg_nmi_hndl_hook() or pmcfw_assert_function()).
• After another hardware timeout period without being reloaded. The generic watchdog reset sequence is shown
in Figure 9-2.
tim e
interrupt(NM I)
hw wdg tim er
system reset
wdg tim er
Executes:
wdg thread pings all users.
wdg NM I handler
Not all wdg users repond
with pong m essages
In the wdg NMI handler, your firmware may service the hardware watchdog timer interrupt by signaling through an I/O
device and/or save a specific context, before allowing the system reset to take place.
Function Description
wdg_hw_kick Restarts (kicks) the hardware watchdog and clears the hardware watchdog timer
interrupt.
9.1.1.1 wdg_parms_get
wdg_parms_get() generates a structure of configurable watchdog parameters and initializes it with default values.
It also specifies the OSF resources required by watchdog. See Section 9.1.2 Data Structures for further information
on wdg_parms_struct.
Calling sequence restrictions:
• This function should be called in tx_application_define().
• It must be called before any watchdog functions can be used.
Outputs osf_cfg_ptr Pointer to OSF system parameter structure, updated with resources
required by watchdog.
9.1.1.2 wdg_create
wdg_create()creates the OSF resources required by the watchdog.
Calling sequence restrictions:
• This function should be called in tx_application_define().
• It must be the last xxx_create() function called, where xxx_create() is the equivalent creation function for
other threads that use the watchdog service.
• It must be called after wdg_parms_get() and any user modifications on the returned wdg_parms_struct,
before the call to wdg_init().
Outputs None
Failure = None
9.1.1.3 wdg_init
wdg_init() performs any post creation configuration for the watchdog module.
Calling sequence restrictions:
• This function must be called in tx_application_define().
• It must be called after wdg_create().
• It must be called after all users have been registered with the watchdog using the wdg_user_register()
function. Since wdg_user_register() must be called in the watchdog users’ xxx_init() functions,
wdg_init() must be called after all xxx_init() functions are called.
Outputs None
Failure = None
9.1.1.4 wdg_user_register
Use wdg_user_register() to register your mailbox with the watchdog service allowing you to be pinged by the
watchdog.
Calling sequence restrictions:
• This function must be called in the users’ xxx_init() functions after calling wdg_create() and before calling
wdg_init() in tx_application_define().
Outputs None
Failure = None
9.1.1.5 wdg_user_msg_hdlr
Use wdg_user_msg_hdlr() to handle ping messages from the watchdog by responding with a pong message. To
prevent you from using the received watchdog message buffer after it has been processed, this function lets OSF
take over the buffer by overwriting your double pointer to it.
Outputs None
9.1.1.6 wdg_lowest_cnt_get
Use wdg_lowest_cnt_get() to get the lowest hardware watchdog timer count since reset.
Inputs None
Outputs None
Failure =
9.1.1.7 wdg_hw_kick
Use wdg_hw_kick() to restart the hardware watchdog timer and clear the hardware watchdog timer interrupt. This
prevents the watchdog induced system reset.
Inputs None
Outputs None
Failure = None
9.1.2.1 wdg_parms_struct
The wdg_parms_struct contains the configurable parameters for the watchdog. wdg_parms_get() allocates and
initializes it with default values. You can overwrite the default values before the call to wdg_create(). The default
values are:
• max_block_duration_ms: Maximum time that a thread may be blocked from servicing the watchdog ping by
all other threads/interrupts in the system. The hardware watchdog timeout “hw wdg timeout period” is set by
rounding up to the next higher timeout that the watchdog timer supports. The hardware timeouts are shown in
register document for the SEP being utilized and are based on operating frequency of the device.
For example, for the watchdog running at 75 MHz, if this value is set to 6000 for a watchdog timeout and the next
higher watchdog period is 7.2 seconds.
thread_prio = 16
hw_enabled = TRUE if the preprocessor symbol WDG_ENABLE is defined; FALSE otherwise.
/********************************************************************
* STRUCTURE: wdg_cfg_struct
* ___________________________________________________________________
*
* DESCRIPTION:
* Structure defining user-configurable parameters of watchdog that
* can only be modified before call to wdg_create().
*
UINT32 thread_stack_size;
UINT16 thread_prio;
BOOL hw_enabled;
} wdg_config_struct;
/********************************************************************
* STRUCTURE: wdg_parms_struct
* ___________________________________________________________________
*
* DESCRIPTION:
* Structure defining user-configurable parameters of watchdog.
*
* ELEMENTS:
* config - User configurable parameters that can only be modified
* before call to wdg_create().
*
*********************************************************************/
typedef struct
{
wdg_config_struct config;
} wdg_parms_struct;
0x00000000:0x01>menu
menu Menu of commands
help Alias of menu
prompt Prompt on/off
reset Reset MIPS
rd_32 32-bit Read : rd_32 <address> <# of 32 bit words>
wr_32 32-bit Write : wr_32 <address> <data> [<address> <data>, . . . ]
rd_16 16-bit Read : rd_16 <address> <# of 16 bit words>
wr_16 16-bit Write : wr_16 <address> <data> [<address> <data>, . . . ]
rd_8 8-bit Read : rd_8 <address> <# of 8 bit words>
wr_8 8-bit Write : wr_8 <address> <data> [<address> <data>, . . . ]
rd_seeprom 8-bit Read : rd_seeprom <port_id> <device_addr> <offset> <offset_width>
<num of 8 bit words>
wr_seeprom 8-bit Write : wr_seeprom <port_id> <device_addr> <offset> <offset_width>
<data> [<data>, ...]
dwld Download : dwld -fl | -se <offset> <data> [<data>, ...]
log_sev Log severity : log_sev [severity]
(Get/Set: 0 - disable, 1 - highest, 2 - high, 3 - medium, 4 - low, 5 -
lowest)
log_filter Log filter : log_filter [<idx> <mask> <pattern> <type> <severity>]
rd_log Log retrieve : rd_log -fl | -ra <-p | -n <num of entries, default:40>>
dbs Database Read: dbs <page>
ipconfig Show/Config IP : ipconfig [[help]|[dhcp 0 | 1 [ip ip_addr] [nm netmask] [gw
gateway]]]
tftp_dwld TFTP download : tftp_dwld <host> <filename> [a - to activate]
emip EMIP control : emip [[help]|[log emip_id]]
mirror Port mirroring : mirror <on/off> <src_phy_id> [tx_dst_phy_id rx_dst_phy_id]
qinfo Query flash partition information. For internal debug use only
hash_tbl_map_get Retrieve indices of non-zero hash table entries
rd_ecbi ECBI read : rd_ecbi <addr> [<addr>, ...]
wr_ecbi ECBI write : wr_ecbi <addr> <data> [<addr> <data>, ...]
ind_sel Indirect select : ind_sel <table> <data>
ind_ecbi_rd Indirect read : ind_ecbi_rd <addr> [<addr>, ...]
rd_see Read SEEPROM : rd_see <offset> <num of bytes>
update_see Update SEEPROM : update_see [[help]|<cmd> <data> [<data>, ...]]
smp SMP command : smp <data> [<data>, ...]
vhist Vhist capture : vhist <Protocol> <Phy#_List> <capture_length>
<#bin_per_UART_line>
cinfo Cable information : cinfo <connector_id>
version Display firmware versions
status Display status : [sas_phy | sas_link | sas_clr_phy | sas_clr_link]
ssp SSP command : ssp <cmd> [<data>, ...]
logrt_info Retrieve logrt : logrt_info [display | undisplay | dump | undump | list]
phy_mapping Dump logical to physical phy mapping
rx_para_get Capture SAS Rx Parameters : rx_para_get <Phy#_List>
tx_para_get Capture SAS Tx Parameters : tx_para_get <Phy#_List>
err_cnts Dump error counters : err_cnts <Phy#_List> <read/clear>
0x00000000:0x02>prompt
prompt
0x00000000:0x04>
The prompt returned by the command server indicates which server the console is talking to, as well as an
incrementing command number. The server number, 0 in the previous figure, is best defined by a unique number
assigned to your running application. In a SAS expander processor this might be the SAS address assigned to the
SAS expander, which is known to be world-wide-unique.
The prompt is useful when a human user is entering commands. But often the console is at the bottom of a set of
test or diagnostic scripts, in which case the prompt can be disabled making it easier to extract the results of each
command.
The CLI command ‘ind_ecbi_rd’ is expected to be used with the ‘ind_sel’ CLI command to display the table type and
table entry. The following table provides the valid entries for ind_ecbi_rd and ind_sel.
Table 9-2. Valid Entries for Indirect Register Access Through CLI
...........continued
Table Type Valid Entry Valid Register Offsets
Number
{0, 0, 0}
};
PMCFW_ASSERT(args, PMCFW_ERR_INVALID_PARAMETERS);
SES pages are a more robust mechanism for retrieving information from the embedded processor. This is the
expected path for passing information between an EMA and the host. cmdsvr provides a simple backdoor for
querying the status of the embedded processor, but has been designed and verified as a debug tool only.
} /* tx_application_define() */
9.3 Database
A basic database is provided that can be used to store data that is required during run-time. The SES module would
be the main user of this database; however, any other service in the system can define database pages and access
this resource.
Function Description
9.3.1.1 dbs_parms_get
Generates a parameter structure and initializes it with default values.
Outputs None.
9.3.1.2 dbs_create
Allocates the database memory and initializes database structures.
Outputs None.
Returns None.
9.3.1.3 dbs_init
Initializes the database using the parameters provided.
Outputs None.
Returns None.
9.3.1.4 dbs_page_lock
Locks a database page for exclusive read/write access.
Outputs None.
Returns PMC_SUCCESS The database lock could be acquired in the time limit set.
OSF_ERR_TIMEOUT The database lock could not be acquired in the time limit set.
The dbs_page_lock function needs to be called before any database read or write access should be performed on
the database to ensure the data integrity.
Several wait options are available for obtaining the lock. Refer to osf_mutex_lock for a list of possible values. Setting
the wait option to OSF_WAIT_FOREVER will not return until the page lock could be acquired.
9.3.1.5 dbs_page_unlock
Unlocks a database page to release exclusive access rights.
Outputs None.
Returns None.
The dbs_page_lock function needs to be called after the database read or write access is completed. If between
the last call of the dbs_page_lock function and the call of the dbs_page_unlock function, at least one write
access took place, the timestamp on the database page is being updated before the page gets unlocked.
9.3.1.6 dbs_entry_read
Reads an entry in a database page.
Returns None.
Before calling this function, the dbs_page_lock function should be called to ensure an exclusive database access.
9.3.1.7 dbs_entry_write
Writes an entry in a database page.
Returns None.
Before calling this function, the dbs_page_lock function should be called to ensure an exclusive database access.
9.3.1.8 dbs_timestamp_get
Reads the database page timestamp.
Returns None.
9.3.1.9 dbs_timestamp_equal
Checks if the timestamp on a database page has been updated.
Outputs None.
Returns TRUE If the provided timestamp and internally stored timestamp are equal.
FALSE If the provided timestamp and internally stored timestamp are not equal.
9.3.1.10 dbs_page_length_get
Returns the length of the database page.
Returns None.
This function returns the allocated size of the database page in bytes.
9.3.1.11 dbs_page_data_valid_flag_set
Writes the data valid flag on a database page.
Outputs value The value to write to the data valid flag on the database page.
Returns None.
The data valid flag on the database page is provided to indicate whether data on a database page has been properly
initialized or not. It is up to you to use this flag and to properly update it.
9.3.1.12 dbs_page_data_valid_flag_check
Checks the data valid flag on a database page.
Outputs value_ptr A pointer to a buffer to keep the value of the data valid flag.
Returns None.
9.3.1.13 dbs_page_valid_check
Checks for a valid database page code.
Outputs None.
An SGPIO initiator generates the SClock, SLoad, and SDataOut. The signal SClock is the SGPIO system clock
signal. It runs at 100 kHz. The initiator uses the rising edge of SClock to transmit changes in SLoad and SDataOut.
The target uses the rising edge of SClock to transmit changes in SDataIn and the falling edge of SClock to latch
SLoad and SDataOut. The initiator uses the falling edge of SClock to latch SDataIn.
The signal SLoad acts as a control signal, indicating the beginning and end of a bit stream. The clock period during
which SLoad is asserted is the last clock period of a bit stream.
SDataOut carries output bits associated with disk drives. It is intended to control LEDs (for example, activity, locate,
and error LEDs). There are three bits per drive on SDataOut, known as activity, locate and error, as shown in Figure
9-8. You cannot change the order of these three bits within one drive.
The SGPIO target transmits SDataIn. The SDataIn signal carries input bits associated with disk drives. It is intended
to report information such as drive presence detection. There are three bits per drive on SDataIn. Unlike SDataOut,
the meaning of these three bits is undefined in the standard and they are vendor specific.
The following figure shows an example of the four signals on the SGPIO bus. This example shows the information
being transmitted for four drives’ on SDataOut (from initiator to target) and SDataIn (from target to initiator). The
mapping between the logical drives and SGPIO time slots is determined by configurable settings in the initialization
string.
Figure 9-8. SGPIO Bus Signal Timing
SClock ...
SLoad L0 L1 L2 L3 L0 L1 L2 L3
...
SDataO ut X 0.0 0.1 0.2 1.0 1.1 1.2 2.0 2.1 2.2 3.0 3.1 3.2 0.0 0.1 0.2 ...
SG PIO SG PIO SG PIO SG PIO SG PIO
Drive 0 Drive 1 Drive 2 Drive 3 Drive 0
SDataIn X 0.0 0.1 0.2 1.0 1.1 1.2 2.0 2.1 2.2 3.0 3.1 3.2 0.0 0.1 0.2 ...
SG PIO SG PIO SG PIO SG PIO SG PIO
Drive 0 Drive 1 Drive 2 Drive 3 Drive 0
The PM73206 firmware supports the following most relevant SGPIO features:
• Periodic blinking patterns and activity blinking patterns. By default, the state of the LEDs is updated every 1/64
s.
• SMP functions
• Both normal drive-by-drive basis access and general-purpose bit-by-bit access
• Mapping between logical drives and SGPIO drives, which are then mapped to SGPIO buses and time slots.
9.4.1 Architecture
The firmware that controls the LED blinking patterns over the SGPIO interface consists of two components: LED and
SGPIO.
• The LED component implements the periodic and activity blinking patterns and specifies the mapping of each
LED to a given blinking pattern.
• The SGPIO module provides interfaces to the SGPIO hardware.
Figure 9-9. Structure of the SGPIO Component
SG PIO
Array of
Hardware
Activity
Control
Blinking
O bjects
Array of Array of
Periodic LED
Blinking Mask
O bjects O bjects
The SGPIO component consists of the following sub-components, as shown in Figure 9-9:
• The SGPIO Hardware Control block configures the SGPIO hardware, both at startup and while the system is
running. This object also provides functions for register read/write access.
• An array of periodic blinking objects handles the periodic blinking patterns. There is one object per blinking
pattern. There are three periodic blinking objects:
– pblink object 0 is used for blink generator A,
– pblink object 1 is used for blink generator B and
– pblink object 2 is used for permanent off. Note that to provide the “inverted” blinking pattern (that is, ON
becomes OFF and OFF becomes ON), we don’t need to create a new periodic blinking object. Instead we
use the “inverted” mask provided by the LED mask object to generate the inverted blinking pattern.
• An array of activity blinking objects handles activity blinking. There is one object per PHY.
• An array of LED mask objects is used to map each SGPIO timeslot to a blinking object, either periodic or activity.
There is one LED mask object for every periodic blinking object and for every activity blinking object.
Example 2: To have the LED permanently turned off, use the following settings:
offset = period = any unsigned non-zero integer
duty = 0
Example 3: To have a 50% duty cycle, on for the first half, period = 3/8 sec, use the following settings:
offset = 0
duty = 0.5 * period
period = (3 / 8) * 64 = 24
The state machine implements the periodic blinking patterns as shown in Figure 9-11.
Figure 9-11. Periodic Blinking Pattern State-Machine
Body Actions:
None.
offset == 0 offset == 0
Exit Actions: AND
AND
None. duty == 0
duty != 0
AND
rem aining expires rem aining != 0
AND
offset != 0 offset == 0
AND
duty != 0
W ait O ffset State W ait Duty State W ait Rem aining State
Entry Actions: offset expires Entry Actions: duty expires Entry Actions:
+ Reset offset AND + Reset duty AND + Reset rem aining
counter. duty != 0 counter. rem aining != 0 counter.
rem aining
Body Actions: Body Actions: Body Actions: does not
+ LED = off. offset does + LED = on. duty does + LED = off. expire
+ Increm ent offset not expire + Increm ent duty not expire + Increm ent
counter by 1. counter by 1. rem aining
counter by 1.
Exit Actions: Exit Actions:
None. None. Exit Actions:
duty expires None.
AND
rem aining == 0 duty expires
offset expires AND AND
AND offset != 0 rem aining == 0
rem aining expires
duty == 0 AND
AND
AND offset == 0
offset expires offset == 0
rem aining == 0
AND AND
duty == 0 duty == 0
AND
rem aining != 0
FO RCE ACTIVITY O FF
STRETCH O N counter expires counter expires
AND AND
Activity == 0 (Local Activity == 1
AND OR
STRETCH O FF != 0 Activity == 1)
Stretch O ff State
STRETCH O FF
Entry Actions: counter expires
STRETCH O FF + Reset STRECH O FF counter. AND
counter expires + Set local activity = 0. (Local Activity == 1
AND
Local Activity == 0 OR
AND Body Actions: Activity == 1)
Activity == 0 + LED = off.
+ Increm ent STRETCH O FF
counter.
+ If activity == 1, set local otherwise
activity = 1.
Exit Actions:
None.
SGPIO
Target
SXP (contains
(M aster) LEDs)
SClock SClock
SLoad SLoad
SDataOut SDataOut
SDataIn SDataIn
SXP
(Slave)
SClock
SLoad
SDataOut
SDataIn
See Table 8-19 for a description of the initialization string settings necessary for a cascaded SGPIO configuration.
Erroneous PRBS patterns can be sent on any PHY. A receiver can be programmed to accumulate errors and
compare the number of errors against a threshold, generating a report once the threshold is reached.
Note that PRBS patterns are unframed.
9.5.1.5 Loopbacks
Three loopback modes are supported in the SXP 12G device:
• Line Side Analog Loop back – Data received is directly looped back to the transmitter
• Line Side Digital Loopback – Data received is looped back in the digital core logic to the transmitter.
• System Side Analog Loopback – Data transmitted is looped back to the receiver.
– When a loopback is configured, errors or patterns can be inserted and results can be monitored.
– In addition, when a port is configured with a connection to an SPS device the following loopbacks are also
available:
• SPS Line Side Metallic Loopback: Data received by the SPS is directly looped back to the transmitter.
• SPS System Side Diagnostics Loopback: Data received by the SPS is looped back for the internal traffic.
When this feature is enabled on a particular PHY, no broadcasts are generated from that PHY (propagation of
broadcast is unaffected). Multiple PHYs can have broadcasts suppressed simultaneously, but the control mechanism
only allows one PHY to be disabled/enabled at the same time (that is, multiple commands would have to be issued to
enable the feature on multiple PHYs.)
9.5.1.8 Monitoring
The effects of diagnostics operations can be monitored through the counters.
Table 9-4. Diagnostic Counters
Counter Description
PRBS Error Count Number of PRBS bit-errors received in the erroneous PRBS patterns.
CRC Error Count Number of CRC errors happening (due to CJTPAT and others).
Code Violation Error Interval Threshold This threshold is compared to the hardware code violation error count and
a report is generated once it is reached.
When the Code Violation Error Count is read, the firmware will clear the
hardware count that has been accumulated and accumulate the count to a
firmware variable for reporting the Code Violation Error Count.
Disparity Error Interval Threshold This threshold is compared to the hardware disparity error count and a
report is generated once it is reached.
When the Disparity Error Count is read, the firmware will clear the
hardware count that has been accumulated and accumulate the count to a
firmware variable for reporting the Disparity Error Count.
Many of these counts can also be retrieved for the SPS as described later in this section.
Note: To count CJTPAT-generated CRC errors, you can use one of the Microchip-specific SMP Read 0x7A and SMP
Write 0xFA commands. CJTPAT is a pre-defined 8B/10B payload, which means an error can be detected in the
received pattern. Use the following registers to set up the performance counters, including one for test pattern errors.
Table 9-5. Registers for Configuring Performance Counter for CJTPAT Errors
Offset Register
...........continued
Offset Register
For example, when “22:18 R/W PERF1_EVENT_SELECT" in Register 0x80040B8 is set to 0x0d (error in the
received test pattern), the inserted CJTPAT errors can be correctly counted in the Performance Counter 1 Count
Register.
9.5.2 Architecture
The diagnostics component programs and accesses Top Level, MABC Port, SSPL and SXL registers to perform the
selected diagnostics operations. It also creates diagnostics reports for the set of counters being monitored.
The following diagram gives an overview of the diagnostics component and its current use scenario.
Figure 9-16. Diagnostics Architecture
9.5.3 Interfaces
The diagnostics component has two main interfaces, listed as follows.
• An SES interface
• An API interface
Bytes/Bits 7 6 5 4 3 2 1 0
0x00
0x01
SES Page Header (5 bytes)
0x02
SCSI Diagnostics Page Code, Length, and so on.
0x03
0x04
0x05
0x06
0x07
0x08
0x0A Specifies diagnostics operation detail, e.g. operation type or user data for an operation
0x0B
0x0C
0x0D
0x0E
0x0F
0x10
0x11
0x12
0x13
Diagnostics Command
0x14
0x15
0x16
0x17
0x18
……
0x80
Section 9.5.5 Diagnostics SES Pages describes the contents of the SES page in detail.
A number of diagnostics commands are sequentially placed in the SES page. The maximum size of the SES page is
128 bytes. This restricts the number of diagnostics commands per SES page to a maximum of 12. The diagnostics
component returns errors for SES pages with non-compliant sizes.
An SES page that requests a series of diagnostics reports has the following format:
Table 9-7. SES Page Format—Diagnostics Reports
Bytes/Bits 7 6 5 4 3 2 1 0
0x00
0x01
0x04
0x05
0x06
0x07
0x08
Diagnostics Report (7 bytes)
0x09
Details of a report e.g., the report type, error occurred if any, report data
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F
0x11
0x12
0x13
……
0x80
Section 9.5.5 Diagnostics SES Pages describes the contents of this SES page in detail.
As in the case of the diagnostics commands SES page, there is a size restriction of 128 bytes on the reports SES
page. This restricts the number of diagnostics reports per SES page to a maximum of 17.
Function Description
9.5.3.3 diag_usr_cmd_process
Outputs None
Failure = DIAG_ERR_INVALID_USR_CMD_TYPE
DIAG_ERR_INVALID_USR_CMD_DESC
9.5.3.4 diag_report_cmd_process
Failure = DIAG_ERR_INVALID_USR_CMD_TYPE
DIAG_ERR_INVALID_USR_CMD_DESC
period. Configuring and de-configuring loop-backs – Configures and de-configures one of System Side Analog
Loop-back, Line Side Analog Loop-back, Line Side Digital Loop-back, SPS Line Side Metallic Loop-back, and
SPS System Side Diagnostics Loop-back.
• Resetting Counters – Various error counters and threshold indicators can be reset to restart counting and
comparing.
• Getting Reports – Various error counters and threshold indicators are reported.
A user command can specify any of the previous actions. In addition to the action, the command must specify the
Logical PHY ID of the PHY on which the action is to be performed and user data for the action, if applicable.
An action is specified by a command, which is defined as a combination of a command type and a command
descriptor. A diagnostics command is formed by a bitwise OR of a command type and a command descriptor.
...........continued
Command Descriptor Value Description
HDD_DIAG 0x14 SPS and HDD Access test (monitored by SXP, data driven
from HBA)
SXP_SPS_MONITOR 0x15 Monitor SPS from SXP so as to configure it when it goes down
SPS_LINE_SIDE_LPBK(Metallic 0x16 SPS Line Side Loop back (Metallic Loop back)
LPBK)
SPS_SYS_SIDE_LPBK(Diagnostic 0x17 SPS System Side Loop back (Diagnostic Loop back)
LPBK)
Table 9-11. Diagnostics Command Descriptors for Command Types DIAG_REPORT_GET and
ERR_CNT_RESET
...........continued
Command Descriptor Value Description
...........continued
Command Type Command Descriptor Resultant User Command
...........continued
Command Type Command Descriptor Resultant User Command
PRBS_ERR_CNT
CODE_VIOL_ERR_CNT
Any one of this command will reset all SSPL
DISP_ERR_CNT and SXL error counts including PRBS Error
Count, Code Violation Error Count, Disparity Error
CRC_ERR_CNT
Count, CRC Error Count, In-Connection CRC
IN_CONN_CRC_ERR_CNT Error Count, Lost Dword Sync Count, Invalid
Dword Count.
LOST_DWD_SYNC_CNT
ERR_CNT_RESET INVALID_DWD_CNT
Note: For readability, the names of the command types and command descriptors are shortened by removing
the common prefix. Each command type above must have the prefix DIAG_BITMSK_USR_CMD_TYP_ and each
command descriptor above must have the prefix DIAG_BITMSK_USR_CMD_DESC_ in the code.
Size in
User Command User Argument Description
bits
Insert SPS CJTPAT errors Port num 8 SPS port on which to insert errors
User Command
...........continued
User Command
Get Code Violation Error Count and Code Violation Error Interval Threshold Info report
Get Disparity Error Count and Disparity Error Interval Threshold Info report
Reset Code Violation Error Count and Code Violation Error Interval Threshold Info
Reset Disparity Error Count and Disparity Error Interval Threshold Info
...........continued
User Command
Bytes/Bits 7 6 5 4 3 2 1 0
0x02 MSB
Page Length [n – 3]
0x03 LSB
0x05 Command
0x07
0x08
0x09
0x0A
User Argument Bytes
0x0B
0x0C
0x0D
0x0E
...........continued
Bytes/Bits 7 6 5 4 3 2 1 0
0x0F Command
0x11
0x12
0x13
0x14
User Argument Bytes
0x15
0x16
0x17
0x18
……
0x80
Multiple-byte fields in the SES page are in Big Endian byte order. If a multiple-byte integer variable provides a value
of a field, the variable must be entered in Big Endian format.
The Page Code byte must be assigned the value DIAG_SES_PAGE_CODE (0x90).
The Page Code Specific byte is ignored by the Diagnostics component. It is required to comply with the SCSI
Diagnostics Page Header format.
The Page Length field has the number of remaining bytes in the SES page, that is, the number of bytes starting at the
User Commands Count field.
The User Commands Count field contains the number of user commands.
Each command block starts with the Command Type, which is formed by a combination of the values listed in , Table
9-10 and Table 9-11 followed by the logical PHY ID the command applies to and four user arguments. The format of
these arguments depends on the command type. See Table 9-13 for a description of the valid arguments and their
values.
For Diagnostic Setup Control command, the command block is shown in the following table.
Table 9-16. Diagnostic Setup Control Command Block
Bytes/Bits 7 6 5 4 3 2 1 0
0x07+10n Start/Stop
0x09+10n Reserved
0x0B+10n Reserved
...........continued
Bytes/Bits 7 6 5 4 3 2 1 0
0x0C+10n Reserved
0x0D+10n Reserved
0x0E+10n Reserved
The Start/Stop field specifies diagnostic setup preparation or diagnostic setup cleanup
• 0x01: Diagnostic Setup Preparation. The common preparation task is to disable the ECMR entry for the DUT
PHY.
• 0x00: Diagnostic Setup Cleanup. The common cleanup is to enable the ECMR entry and then do a link reset for
the DUT PHY.
The Diagnostic Pattern Type specifies the test pattern used in the PHY diagnostics. See the additional diagnostics
preparation/cleanup tasks for the specific Pattern Type in the following table.
Table 9-17. Setup Control Actions for Diagnostic Pattern Types
0x00 PRBS Set Force PHYRDY in SSPL Reset Force PHYRDY in SSPL
0x01 CJTPAT NO NO
Reserved - - -
Loopback Mode specifies that line side analog, line side digital or system side analog loopback mode will be used. If
system side analog loopback is specified, firmware forces to override the PHY rate to 12G.
Table 9-18. Setup Control Actions for specific Loopback Pattern Types
0x00 NO_LPBK NO No
0x01 LINE_SIDE_ANA_LPB NO NO
K
0x02 LINE_SIDE_DIG_LPBK NO NO
0x03 SYS_SIDE_ANA_LPBK Force PHY rate to 12G in SSPL. Clear operations of forcing
PHY rate.
For insertion of User-defined Patterns, the command block is shown in the following table:
Table 9-19. User-Defined Patterns Command Block
Bytes/Bits 7 6 5 4 3 2 1 0
...........continued
Bytes/Bits 7 6 5 4 3 2 1 0
0x0D+10n Dword_id (0 or 1)
0x0E+10n Reserved
Note:
The SXP 12G device provides two 40-bit internal registers for user-defined values. Only when the two Dwords are
both set can the user-defined pattern test start. The field DWORD ID is used to specify which Dword is going to be
set. Only value 0 or 1 is valid for this field.
For PRBS and User-defined pattern error generation, the 40-bit user argument is aligned as follows:
Table 9-20. Error Insertion Command Block
Bytes/Bits 7 6 5 4 3 2 1 0
0x0D+10n Reserved
0x0E+10n Reserved
For Code Violation pattern insertion, the 10-bit user argument is aligned as listed in the following table.
Table 9-21. Code Violation Error Insertion Command Block
Bytes/Bits 7 6 5 4 3 2 1 0
...........continued
Bytes/Bits 7 6 5 4 3 2 1 0
0x09+10n Reserved
0x0A+10n Reserved
0x0B+10n Reserved
0x0C+10n Reserved
0x0D+10n Reserved
0x0E+10n Reserved
For specifying thresholds, the threshold value and optional user value of PMON Period are aligned as shown in the
following table.
Table 9-22. PMON Period and Threshold Value
Bytes/Bits 7 6 5 4 3 2 1 0
0x08+10n MSB
0x0A+10n LSB
0x0B+10n
0x0C+10n
Reserved
0x0D+10n
0x0E+10n
The firmware ignores the argument bytes for the other command types. The PMON period specifies the number of
150-MHz clock cycles. As such, each count has a duration of ~6.7 ns. The minimum valid value for the PMON period
is 0x000012 and the maximum value is 0xFFFFFEor approximately 112 ms. Setting the PMON period to 0xFFFFFF
disables the PMON timer.
Bytes/Bit 7 6 5 4 3 2 1 0
0x02 MSB
Page Length [n – 3]
0x03 LSB
...........continued
Bytes/Bit 7 6 5 4 3 2 1 0
0x06 Command
0x09
0x0A
Response Data Bytes
0x0B
0x0C
0x0D Command
0x10
0x11
Response Data Bytes
0x12
0x13
……
0x80
Multiple-byte fields of this SES page are in Big Endian byte order.
The Page Code byte should have the value DIAG_SES_PAGE_CODE (0x90).
The Page Code Specific byte is ignored by the Diagnostics API and is provided only for compliance with the SCSI
Diagnostics Page Header format.
The Page Length contains the number of bytes starting from User Commands Count field until the end of the SES
page.
User Commands Count is a copy of the corresponding field in the matching user command’s SES page sent earlier.
The Response Count is the number of reports in this SES page.
After the Response Count field, the reports follow. Each report block starts with the Command Type, which matches
the Command Type sent in the matching User Commands SES page. The logical PHY ID is next, followed by the
User Command Processing Status. Valid values for this field are listed in the following table.
Table 9-24. Command Processing Status Values
0x00 DIAG_USR_CMD_PROC_STATUS_SUCCESS
0x01 DIAG_USR_CMD_PROC_STATUS_INVALID_COMMAND
...........continued
Value Status Constant
0x02 DIAG_USR_CMD_PROC_STATUS_SYS_FAIL
0x03 DIAG_USR_CMD_PROC_STATUS_NOT_IN_DBG_MODE
The format of the Response Data Bytes depends on the command type. If the User Command Processing Status
field indicates DIAG_USR_CMD_PROC_STATUS_INVALID_COMMAND error, the report data consists of one byte
indicating the part of the command with the error. The following table lists the possible values.
Table 9-25. Invalid Command Part Values
0x00 DIAG_INVALID_USR_CMD_TYPE
0x01 DIAG_INVALID_USR_CMD_DESC
0x02 DIAG_INVALID_USR_ARGS
If errors were not detected, the report data is one of the following:
• Threshold reports use a one-byte Boolean value that indicates if a threshold was reached. A value of 0x00
means NO and 0x01 means YES.
Bytes/Bits 7 6 5 4 3 2 1 0
0x06+7n Command
0x0A+7n
0x0C+7n
• The PRBS error count, CRC Error Count and In-connection CRC Error Count are provided in the first two
response bytes.
Bytes/Bits 7 6 5 4 3 2 1 0
0x06+7n Command
0x09+7n
Error Count
0x0A+7n
0x0B+7n
Not used
0x0C+7n
• Disparity Error Count, Code Violation Count, Invalid DWORD count and Lost DWORD Synchronization count
are provided by four response bytes
Bytes/Bits 7 6 5 4 3 2 1 0
0x06+7n Command
0x09+7n
0x0A+7n
Error Count
0x0B+7n
0x0C+7n
• SPS Error counts (for SPS configured ports) for Invalid Dword, Disparity Error, Loss of Dword Sync, Code
Violation, SSPL PHY Reset Failed Count, and SSPL Code Violation Error Count are returned by 4 response
bytes.
Bytes/Bits 7 6 5 4 3 2 1 0
0x06+7n Command
0x09+7n
0x0A+7n
Error Count
0x0B+7n
0x0C+7n
CODE_VIOL_ERR_CNT
CODE_VIOL_ERR_CNT_THHD
CODE_VIOL_ERR_THHD
DISP_ERR_CNT
DISP_ERR_CNT_THHD
DISP_ERR_THHD
...........continued
Command Descriptor Results in
PRBS_ERR_CNT
CODE_VIOL_ERR_CNT
CODE_VIOL_ERR_THHD
DISP_ERR_CNT
ALL DISP_ERR_THHD
CRC_ERR_CNT
IN_CONN_CRC_ERR_CNT
LOST_DWD_SYNC_CNT
INVALID_DWD_CNT
Stop Inserting
Diagnostics Diagnostics
Patterns Reset Counters
Com m ands Com m ands
SES Page SES Page
System Side Retrieve
Loop back Reports
Diagnostics
Reports
SES Page
The following figure shows the Logical Division when an SPS device is also involved in the port operations.
SXP
TX RX .
SPS RX TX
SDPA
9.5.7 Examples
...........continued
Bytes Field Value
...........continued
Bytes Field Value
9.6 IPMB
9.6.2 Implementation
The firmware IPMB module passes the user-supplied standard-compliant commands and responses almost
transparently, without decoding any of the parameters within the messages. The only exception is the calculation
of the connection header and message checksums, which are determined internally by the firmware IPMB module.
For example, the firmware does not keep track of the LUN or sequence numbers.
0 rsSA Responder’s 7-bit (TWI) slave address located from bits 7 to 1. Bit 0 is 0.
Connection header
1 netFn / rsLUN Net function (even) and responder’s logical unit number
2 ChkSum Header checksum. This field is calculated by the IPMB module and can be left at
a value of 0.
...........continued
Byte Assignment Description
4 rqSeq / rqLUN Requestor’s sequence number and requestor’s logical unit number
5 cmd
6+N ChkSum Command checksum. This field is calculated by the IPMB module and can be
left at a value of 0.
0 rqSA Requester’s 7-bit (TWI) slave address located from bits 7 to 1. Bit 0 is 0.
Connection header
1 netFn / rqLUN Net function (odd) and requester’s logical unit number
2 ChkSum Header checksum. This field is calculated by the IPMB module and can be left at
a value of 0.
4 rqSeq / rsLUN Requestor’s sequence number and responder’s logical unit number
5 cmd
6 Completion
code
7+N ChkSum Command checksum. This field is calculated by the IPMB module and can be
left at a value of 0.
mst_callback_fptr Pointer to a function called out from the TWI master ISR.
Pointer to a data buffer returned by the TWI master ISR during the
mst_callback_data_ptr
call out.
mst_int_enb A 32-bit integer containing the TWI master interface enable bits.
Outputs None.
Returns None.
Outputs None.
TWI_ERR_MST_FIRMWARE_TIMEOU
Firmware timed out on transaction.
T
TWI_ERR_MST_FIRMWARE_TIMEOU
T Firmware timed out on transaction.
PMCFW_ERR_TIMER_FAILED
10.1.1 Architecture
The Port Event Manager is periodically invoked when the OSF timer expires. This initiates a callback function that
sends a message to the Port Event Manager thread. At invocation, the Port Event Manager examines the state of
an individual PHY by polling the SXL Broadcast Request interrupts. Each invocation polls a different PHY on an
incrementing basis, based on the logical PHY ID.
On detection of an SXL Broadcast Request event, the Port Event Manager performs a variety of actions:
• If a SATA Spin-up Hold event is detected on a PHY, the Port Event Manager checks the SSPL PHY layer state
of the PHY on the next invocation of the object. If a series of SSPL conditions still hold, the PHY is declared to
have reached the SATA Spin-up Hold state.
• If there is a change in the SXL link layer state of the PHY, the Port Event Manager updates the status in the Disk
Spin-up Application. If the appropriate minimum time elapses between Disk Spin-up timer event notifications, the
object then notifies the Disk Spin-up Application of the timer event. On completion, the Disk Spin-up Application
returns control to the Port Event Manager.
• If the detected SXL Broadcast Request event is a PHY changing state to ready, the Port Event Manager polices
the wide port to ensure coherency with respect to the logical route table and to the subtractive ports.
• If the detected SXL Broadcast Request event is a PHY changing state to not ready, the Port Event Manager
removes associated logical route table entries, if required.
• If the detected SXL Broadcast Request event is the receipt of a Broadcast primitive other than Broadcast
Change, the Port Event Manager transmits the appropriate Broadcast primitive onto the appropriate PHYs.
• If the detected SXL Broadcast Request event is either a PHY changing state to PHY ready or the receipt
of a Broadcast Change primitive, the Topology Discovery Application must be invoked if the self-configuring
expander option is enabled in the initialization string.
• If control of the PHY is passed to the Topology Discovery Application, the Port Event Manager finishes
processing this PHY and continues to process the remaining PHYs. The Topology Discovery Application is
required to indicate completion of processing on a PHY to the Port Event Manager by setting a flag. The Port
Event Manager checks this flag to determine if the Topology Discovery Application has completed. If it is still
operating, the Topology Discovery Application does not block the Port Event Manager object from processing
the remaining PHYs.
• Only four instances of the Topology Discovery Application can be active at any given time. If topology discovery
is required on another PHY while the Topology Discovery Application is in operation, the request is noted and
serviced following completion of the current topology discovery.
• If the detected SXL Broadcast Request event is either a PHY changing state to PHY ready, PHY not ready,
or SATA spin-up hold, and a Broadcast (Change) is generated for this PHY within the previous 1 second, no
Broadcast (Change) is generated. This dampens the generation of Broadcast (Change) primitives in the event of
a faulty drive. This dampening is controlled by setting in the “8.3.1.24 PHY Event Damping Interval Field in the
initialization string.
• If the Port Event Manager determines that the Topology Discovery Application has completed operation, it
transmits any required Broadcast (Change) primitives. The Port Event Manager withholds transmission of
Broadcast (Change) primitives until the queued/operational instances of the Topology Discovery Application are
complete. Other Broadcast primitives are not subject to the same restriction and are transmitted as required.
• The Port Event Manager also periodically checks the flags in the SMP as well as SGPIO objects to determine
if additional broadcast primitive generation is required. The SMP object can request generation of a Broadcast
(Change) primitive in the event that a virtual PHY is enabled, or is reset by an SMP PHY Control (Link Reset
or Hard Reset) command. The SGPIO object can also request generation of a Broadcast (SES) primitive in
response to external events.
The Topology Discovery Application autonomously configures its own route table based on traversal of the
downstream SAS expanders and discovery of the connected SAS devices. The Topology Discovery Application
also employs route table optimization where a single instance of a SAS address is configured, regardless of whether
the device is connected through a wide port or not.
The Topology Discovery Application does not perform any topology traversal upstream on a subtractive port.
The Topology Discovery Application can be selectively enabled or disabled based on initialization string settings.
In the example topology in Figure 10-2, both the hash table of expander CC and the hash table of expander DD
contain full topology information. If expander CC performs TOPD for expander DD through port M-N, expander CC
does not need the red hash entries from expander DD’s hash table since expander CC already has them. It is the
same when expander DD performs TOPD for expander CC. To eliminate the unnecessary reporting of redundant
entries, an improvement was made so that the expander does not report its route table list entries for the PHYs in the
current TOPD SMP connection. This improvement greatly reduces the number of SMP Report Expander Route Table
List commands during the TOPD procedure.
10.3.1.2 Skip populating Upper or Lower 48 PHY BITMAP without other Expanders Attached
The PHY BIT MAP field indicates the Routed SAS address to be routed to each PHYs (each bit represents a PHY).
The SAS-2 and SPL specifications define the PHY BITMAP as 48 bits. The PM805x expander family can support up
to 68 ports. Thus, to report the 68-bit PHY bit map for a routed SAS address, the TOPD master needs to issue two
SMP Report Expander Route Table List Functions:
• One with STARTING PHY IDENTIFIER ‘0’ for the lower bitmap 0-47
• And the other with STARTING PHY IDENTIFIER ‘48’ for the upper bitmap above 48.
If the destination PHYs for all routed SAS Addresses are within the lower bitmap 0-47, TOPD master actually does
not necessarily populate the expander routing descriptors with STARTING PHY IDENTIFIER ‘48’ since all returned
descriptors with all zero PHY BIT MAP. Correspondingly, if the destination PHYs for all routed SAS Addresses are
within the upper bitmap 48-95, the TOPD master does not necessarily populate the descriptors with STARTING PHY
IDENTIFIER ‘0’.
In the SXP 12G firmware, the TOPD master determines if populating the routed SAS addresses is done from the
adjacent self-configuration expander in the lower bitmap, in the upper bitmap, or in both.
Table-to-table enabled Expander: The SAS-2 self-configuring expander with table-to-table enabled, like the SXP 12G
expander working with the enhanced distributed discovery algorithm.
No Table-to-Table support Expander: The SAS 1.1 expander (self-configuring or non-self-configuring expander) or the
SAS-2 self-configuring expander with table-to-table disabled or not supported.
Connection#1: Does not allow table-to-table connections for a non-table-to-table supported expander device with this
connection type.
Connection#2: Does not allow table port connection of a non table-to-table supported expander device with this
connection type. If SXP 12G expander works with SXP3G legacy distributed discovery algorithm by disabling table-
to-table support in initialization string, the conn#2 is allowed.
Connection#3/#4/#5: Table-to-table support is allowed.
If the connection is not supported, the LED for the expander PHYs is lit RED indicating a wrong connection.
Note:
See the SXP 12G Initialization String Table – Topology Discovery Configuration for the definition of a self-configuring
expander bit and table to table enable bit.
Model#1: SXP 12G expander is attached to the existing SAS1.1 Topology with SAS1.1 Self-configuring Mode or
non-self-configuring Mode.
Mode#2: Full SAS-2 Expander topology and the SXP 12G in SAS-2 Self-configuring Mode with table-to-table
enabled.
Mode#3: SAS-2 Expander attached SAS1.1 sub-topology with T/S/U to S connections.
Mode#4: An example of a restricted topology since there is one forbidden connection between SAS-2 JBOD#D (with
SAS-2 Self-configuring with table-to-table enabled) and SAS1.1 JBOD#C.
Note:
Although only several daisy-chain SAS topologies are listed in this section, the SXP 12G expander supports SAS1.1
FANOUT topology.
Cold system
• All expanders in a SAS topology just begin to power on, or some new expanders begin to join a hot system, so
the hash table of each expander contains incomplete route entries for the whole topology.
• Loop topology may exist in this system due to a wrong connection. If loop topology exists in this case, as each
expander contains an incomplete route entry for the whole topology, then the loop topology can only be detected
in the metaphase of the following TOPD.
See Figure 10-7 for loop topology in a cold system. The RED expander is the newly powered on or newly joined
expander and the RED cable is newly inserted into the cold system, which causes a loop topology.
Figure 10-7. Loop Topology in a Cold System
SXP 12G firmware has different handling way for the loop topology upon the two systems.
Removing any cable from this topology may recover the system from the loop topology. If no LED is lit red, then
the system has been recovered successfully from the loop topology. It is possible that after removing one warning
cable, there are still other warning LEDs lit on other expander PHYs. This is a false loop and is also caused by each
expander finding the TOPD from a different TOPD direction. In this case, all red LEDs need to be unlit to recover the
whole topology.
This loop topology handler introduces some limitations for the following two corner cases:
• If you removed a far end expander in the topology and inserted it into a near end expander of the topology very
quickly (less than 1s), it is possible that the near end expander will detect a false loop for the newly attached far
end expander and isolated it from the whole topology.
• If you removed a device from a far end expander of the topology and inserted it into a near end expander of the
topology very quickly (less than 1s), it is possible that this device will be lost in the expanders’ hash table.
If you have concerns about these limitations and do not rely on a loop topology handler, then you can set the initstring
field “Loop detection enable” as ZERO to avoid it.
10.4.1 Architecture
The following figure shows the inputs to and outputs from the spin-up module. The various input events with the
initialization string determine the PHY control outputs that are generated by the spin-up module.
Figure 10-8. Spin-Up Module Event, Initialization String, and PHY Interfaces
There are three types of outputs that are generated by the spin-up module:
• NOTIFY(ENABLE_SPINUP) primitives – for SAS-connected links on which power control is not enabled or
supported
• PWR_GRANT primitives – for SAS-connected links on which power control is enabled
• LINK or HARD RESETs – for the specified links
Inputs to the module consist of both static configuration data loaded from the initialization string and the dynamic
events that are triggered either by a timer, the arrival of an SMP PHY control command, a change in the status of any
one of the PHYs, or Power Control Primitives (PWR_REQ, PWR_DONE) received.
The three events that can trigger the operation of the disk spin-up module include:
• PHY event: A PHY event occurs when there is a change in the status of a PHY. The PHY state changes
include :
– PHY changing to ready
– PHY changing to not ready
– PHY attaining the SATA spin-up hold state
– PHY receiving the NOTIFY(ENABLE_SPINUP) primitive
– PHY receiving the Power Control Primitive, that is, PWR_REQ or PWR_DONE when both SXP PHY and
the attached SAS device are Power Capable (10b) in Table 121, [7].
The port manager thread polls the PHYs to determine their status. If a change in the PHY’s status is detected, the
spin-up module’s PHY event handler is invoked through a callback. Depending on the initialization string settings, the
handler routine either ignores the event or marks the PHY to check when its PHY-grouping is due for processing.
• Timer event: At regular intervals, the port manager thread invokes the spin-up module’s timer event handler.
During this callback, the drive grouping is cycled and the various PHYs’ status within the current drive group is
examined to determine if further processing is warranted on the particular PHYs.
• SMP PHY control event: The spin-up module, when set to execute SMP PHY control reset commands,
generates the LINK or HARD RESET on the specified PHYs, regardless of the attached device type. The
SMP module assists in this function by terminating the SMP PHY control command and saving the reset status
until at which time the status is read by the spin-up module. The spin-up module polls the SMP PHY reset flags
at each interval timer period and executes the resets as stipulated.
10.4.2 Control
During initialization of the disk spin-up module, the disk spin-up configuration is read from the initialization string and
the mode of operation is determined. In particular, the following settings are specified:
• The default spin-up algorithm is disabled when the Staggered Spin-Up (SSU) algorithm is enabled or put in
stand-by.
• Hierarchical slave spin-up operation enable/disable settings and the hierarchical host PHYs selection. By
default, the hierarchical master must operate in the staggered spin-up mode.
• SATA device handling is determined by the SATA_SPINUP and SATA_HOLD fields, as shown in the following
table. The timer delay parameters are not applicable when the module is configured to run in the hierarchical
slave mode.
Table 10-2. SATA Disk Spin-Up Confirmation
0 0 SATA drives can complete speed negotiation immediately after the serial
link resets (that is, after a hot plug event). A link or hard reset must be
generated on the link within the specified 10 ms. The spin-up module is not
involved for this configuration.
...........continued
SATA_SPINUP SATA_HOLD Description
Note:
Similarly, the SAS_SPINUP and SAS_NOTIFY fields in the initialization string control how SAS disks should be spun
up. See the following table. The initial delay and interval timer period are not valid when the module is configured to
operate in the hierarchical slave mode.
Table 10-3. SAS Disk Spin-Up Confirmation
0 1 The spin-up module generates NOTIFY primitives on the SAS links. The
SAS drives are spun up simultaneously.
When the Power Capable in both SXP PHY and the attached SAS device
is enabled, SXP Firmware will reply the Power Request (PWR_REQ)
from the SAS device with PWR_GRANT immediately.
1 0 Reserved. Unused.
1 1 When the drives are being checked during the appropriate interval time,
the spin-up module generates
- PWR_GRANT to the SAS end device that requires power thru
PWR_REQ, when both SXP PHY and the attached SAS end device are
Power Capable;
- NOTIFY primitives to the SAS end device when neither SXP PHY nor
the attached SAS end device is Power Capable.
The shaded row in each of the two tables above indicates the recommended default configuration.
As an example, consider a setting that consists of an interval period of 8 seconds and an initial delay of 2 seconds
with a 6-drive group. The following table shows the PHYs (drives) that are spun up at each interval period for the first
60 seconds of the spin-up sequence.
Time 0 2 10 18 26 34 42 50 58 66 74 …
The spin-up sequence repeats every 96 seconds plus the 2-second initial delay offset. If a drive is inserted/hot-
plugged after the firmware starts, the drive is spun-up at the next interval period whenever the group it belongs to is
scheduled for processing.
Expander
T 0 / T 4 / ... (hierarchical host)
T 3 / T 7 / T 11 / ...
T 2 / T 6 / T 10 / ...
T 1 / T 5 / T 9 / ...
B C E
D
In the previous figure, the hierarchical host expander generates NOTIFY primitives for drive group A at intervals T0,
T4, T8, and so on. Slave Expander 1 receives NOTIFY primitives at interval T1, T5, T9, et cetera. Because this slave
expander is controlling two drive groups, it spins up the B group during the interval T1 and the C group during interval
T5. At timer interval T9, the NOTIFY primitives are again sent to the drive group B, and T13 for drive group C. Only
one drive group can be spun up in any given interval timer period. The process repeats indefinitely.
The following example further shows the effect of drive grouping and wide-port connections between the expanders
on the hierarchical spin-up configuration.
Consider the case of a hierarchical spin-up configuration shown in the following figure. The SXP 12G expanders are
configured as hierarchical slaves with two drives per group. There is a 4-PHY wide-port connecting the SXP 12G
expander to each one of the expanders. As a hierarchical master, the SXP 12G is configured to have a PHY grouping
of 1 PHY per group.
Assume a processing interval of 8 seconds. The following table shows the storage blade, and the drives within that
blade, that are spun-up at each timer interval for the first 120 seconds.
Table 10-5. Hierarchical Drive Spin-Up Example (Wide-Port)
Blade B0: B0: B0: B0: B1: B1: B1: B1: B2: B2: B2: B2: B3: B3: B3: B3:
& D0 D2 D4 D6 D0 D2 D4 D6 D0 D2 D4 D6 D0 D2 D4 D6
Drive D1 D3 D5 D7 D1 D3 D5 D7 D1 D3 D5 D7 D1 D3 D5 D7
s
Consider that, based on the results of Table 10-5, there is a four-PHY wide-port connecting each storage blade to
the SXP expander. Because the SXP expander only generates one NOTIFY(ENABLE_SPINUP) primitive per PHY at
each interval period due to the drive/PHY group setting, it takes four periods to span each wide-port. Each storage
blade receives four NOTIFY(ENABLE_SPINUP) primitives in succession, each one separated by the interval delay
from the others. This results in four drive groups in each blade being spun up before the next blade is processed. As
a counter example, if the blades were connected to the SXP 12G device using a narrow port, the spin-up sequence is
shown in the following table:
Table 10-6. Hierarchical Drive Spin-Up Example (Narrow Port)
Blade B0: B1: B2: B3: B4: B5: B6: B7: B0: B1: B2: B3: B4: B5: B6: B7:
& D0 D0 D0 D0 D0 D0 D0 D0 D2 D2 D2 D2 D2 D2 D2 D2
Drive D1 D1 D1 D1 D1 D1 D1 D1 D3 D3 D3 D3 D3 D3 D3 D3
s
We recommend that you configure the hierarchical host expander so that its drive grouping is 1 (that is, only one
drive per group). This ensures that one group of down-stream drives is spun-up per interval, even if a wide-port is
used between the hierarchical master expander and the down-stream slave expanders. Note hierarchical slave drive
groupings that include both end devices (that is, disk drives) and PHYs that connect to down-stream expanders, as it
is possible for both the drives to be spun-up and the NOTIFY primitives forwarded at the same time.
10.4.5 Summary
PHYs are processed at the expiry of each spin-up interval timer period when the module is not configured to
run in staggered spin-up mode, or when at least one NOTIFY primitive is received from a hierarchical host when
hierarchical spin-up operation is enabled. When any one of the above two events is received, the following sequence
of actions is performed:
1. Generate NOTIFY(ENABLE_SPINUP) primitives on SAS links whose PHYs are ready when any of the two
PHYs are not POWER CAPABLE (10b); not need to generate NOTIFY (ENABLE_SPINUP) primitives when
two PHYs are POWER_CAPABLE (10b). The number of SAS PHYs can be the PHYs within the expander or a
subset as defined by the spin-up grouping.
2. Generate either a LINK RESET or a HARD RESET for SATA drives that are held in the spin-up hold state in
the current drive group.
3. Retrieve the SMP PHY CONTROL command’s LINK/HARD RESET status for the PHYs in the current group.
4. Generate either a LINK RESET or a HARD RESET for the PHYs in the current group marked by the SMP PHY
CONTROL command regardless of the PHY state.
5. Advance to the next drive group and wait for a NOTIFY primitive (hierarchical) or an interval timer expiry event
(non-hierarchical).
The state machine consists of five states. They are listed in the following table.
Table 10-7. SSU States
State Description
SPINUP_INACTIVE This is the initial state for any PHY. It indicates that there is no device that is spinning or
that may want to spin-up connected to the drive PHY.
SPINUP_READY This state indicates that a SAS PHY has become ready or a SATA PHY has reached
the SATA SPINUP Hold state. (SP26: SATA_SPINUP Hold). The attached device is now
ready to spin-up when power is available to do so.
SPINUP_SPINNING This state indicates that the drive connected to this PHY is currently spinning at its
operating speed. For both SAS and SATA attached, the PHY will be in a ready
state. For SAS attached, the expander will issue periodic NOTIFY (ENABLE SPINUP)
primitives.
SPINUP_POWERED_N This state indicates that the drive has reached a spinning state, but the PHY has since
OT_READY transitioned to a not ready state without the device being removed or powered off. This
state is applicable primarily for SATA drives since it means that a full spin-up is not
necessary, but the PHY must still be advanced from SATA SPINUP Hold state to PHY
ready state. For SAS drives, the expander will stop sending periodic NOTIFY (ENABLE
SPINUP) primitives while in this state.
...........continued
State Description
SPINUP_INIT_READY This state indicates that the drive is spinning, but not necessarily accessible. If a SATA
device is attached, the PHY is in the SATA SPINUP Hold state and must be reset for
the PHY to reach a ready state. In the case of SAS attached, this state indicates
that periodic NOTIFY (ENABLE SPINUP) primitives are not currently being issued to
the drive. However, a SAS drive will be accessible in this state. Transitioning to the
spin-up spinning state will not require additional power since the drive spindle is already
spinning.
The state transition is controlled by five states. They are listed in the following table.
Table 10-8. SSU Events
Event Description
PHY Ready This event occurs when the PHY has reached the SP15: SAS PHY_Ready state
SATA Spinup Hold This event occurs when the PHY has reached the SP26: SATA_Spinup Hold state
PHY Initialization This event will cause a drive to begin spinning if it isn’t already. For SATA drives, this
requires a PHY reset sequence; for SAS it requires the transmission of a NOTIFY(ENABLE
SPINUP) primitive.
PHY Not Ready This event occurs when a PHY has reached the SP0: OOB_COMINIT state
Drive Powered Off This event occurs when the disk drive is powered off
Notes:
• In this user manual, when there is a Drive Hot-Plug event or the drive is removed, the drive loses its power
supply unless the context explicitly indicates otherwise.
D Spin − able = ((PTotal − PRun × D Run − PSpin × D Spin )> PSpin _ req )? TRUE : FALSE
,
Where,
DSpin-able indicates whether a disk can be spun up in the current interval; PTotal is the total power available in Watts;
PRun is the power required to keep one drive in the normal operating/spinning state; DRun is the number of drives that
are currently running/spinning; PSpin is the power required (in Watts) to spin up a drive from a dead stop state;
DSpin is the number of drives that are currently spinning up;
PSpin_req is the power required (in Watts) to spin up a drive from its current state. If its current status is a dead stop
state, then PSpin_req = PSpin; if its current status is a spinning state, then PSpin_req equals to PSpin_req = (PSpin - DRun).
Another parameter is DMax, which indicates the maximum number of drives that is allowed to spin up at any interval.
This equation simply states whether a disk can be spun up at any interval is determined by the power supply output,
the number of drives that are currently in spinning state and spinning up state, the amount of power required to spin
up one drive and the current state of the disk (dead stop state or spinning state).The total power available is guided
by the enclosure design, whereas the drives’ running and spinning power requirements are determined by the disk
drives themselves.
In addition, the time interval delay between spinning up successive groups of drives is drive-dependent because it
takes a finite amount of time for the drives to reach their normal operational spin speed. For the disk with SAS-3
power control enabled, after SXP sends PWR_GRANT to the disk, the disk is deemed to move to spinup state; when
SXP receives PWR_DONE from the disk, firmware considers the disk coming to the normal running/spinning state.
10.5.2 Example
The best way to show the SSU algorithm with an example. Consider this situation with the following specifications:
• Power supply output is 105 Watts (that is, PTotal)
• Power to spin up one drive is 25 Watts (that is, PSpin)
• Power to keep one drive in normal operating condition is 15 Watts (that is, PRun)
• There are 6 drives, specified in the following priority (highest first) order: 4, 5, 6, 7, 12, 13
• Each drive requires a total of 20 seconds to attain a stable spindle speed
• Six drives are plugged in prior to the expander powering up
• You want to limit the number of drives to be spun up at any interval to 3
• You want to delay the spin-up sequence by 5 seconds from reset
The following table summarizes the power allocation and the number of drives that can be spun-up at each specific
time interval.
Table 10-9. SSU Spin-Up Sequence Example
Notes:
• It is assumed that the disk spinup time is less than the interval time, but if the disk spinup time is not less than
the interval time, firmware can also handle it correctly.
The spin-up sequence starts on the fifth second mark. You spin up three drives as this is what the power equation
permits. Note that the power supply can actually handle four drives spinning up at this instant; however, you have
artificially limited the spin-able drive count to three. There are currently no spinning drives.
At the 25th second mark, the previous three drives have already reached their normal operating condition. We are
currently consuming 45 Watts of power to keep the drives spinning. The remaining 60 Watts enable you to spin up 2
more drives in this interval.
At the 45th second mark you have five drives spinning normally and are consuming a total of 75 Watts of power. The
remaining 30 Watts of power can spin up one more drive.
By the 65th second mark, the six drives are spinning normally. The total power consumption is 90 Watts, leaving 15
Watts to spare.
Consider the case where you physically remove the drive attached to PHY 6 at the 73-second mark. The available
power and consumed power are immediately recalculated. On the following spin-up interval at t=85s, there is no drive
left to spin up. The remaining five drives are still spinning. You then re-insert the drive at t=88s. The drive is then
spun-up again at the 105th second mark, which is the next valid spin-up timer interval. By the 125th second, the six
drives are spinning normally.
In this particular example, the hot plug events did not occur until after the drives were initially been spun up. The
following example shows the effect of priority ordering when a drive with a higher priority is inserted during the initial
spin-up sequence. The specified PHY list is the same as in the previous example. However, this time the drive on
PHY 6 is not initially attached.
Power Branch PHY List: 4, 5, 6, 7, 12, 13 Initial Drives attached on PHYs: 4, 5, 7, 12, 13 (no drive on PHY 6) Drive
Hot-plugged: Drive on PHY 6 at t=15 seconds
Table 10-10. SSU Spin-Up Sequence with Pre-emption Example
Notes:
Supposed disk spinup time is less than interval time, but if disk spinup time is not less than interval time, Firmware
can also handle it correctly.
Disabled SSU algorithm is disabled. Disk spin-up operation depends on the default spin-up
configuration settings.
Stand-by The SSU algorithm initializes using the configuration information, but does not actually spin-
up any disk drive.
Enabled The SSU algorithm starts spinning up disk drives based on the power equation and the PHY
list after a programmable initial delay.
When the SSU algorithm is disabled, the settings in the default spin-up configuration determine the expander’s disk
spin-up operation.
Alternatively, the SSU algorithm can be put in stand-by. In this mode, the algorithm initializes itself with the
configuration parameters but does not actually spin-up any attached disk drives. You must add firmware code
to start the spin-up sequence by calling the function portmgr_ssu_enable(). This puts the algorithm in the
enabled state. The disk spin-up operation occurs either after the initial delay timer expiry or after a call to
portmgr_ssu_enable(), whichever is later.
In the enabled state, the SSU algorithm spins up disk drives based on the power equation(s) and the PHY
configuration.
portmgr_spinup_spin_state_overwrit Provides a mechanism for a user to add firmware code to initialize the SSU
e() sequence with a specified list of drives that are currently spinning.
portmgr_spinup_user_callback() Callback mechanism where you can attach additional firmware to handle
situations where the power budget is exceeded while there are still drives left
to be spun up. It is in the SSU module file portmgr_spinup.c
...........continued
Hook Name Description
portmgr_ssu_enable() These functions can start and stop the SSU algorithm during run-time if
firmware code is added to make use of them.
portmgr_ssu_disable()
portmgr_spinup_is_drive_present() The default return value of this hook is FALSE. If the user wants to skip
the SSU delay for drives that are already spinning, two power variables are
required to be implemented to assist in the power status check. For example:
POWER_STATUS_V: Indicates current power status (1: Power is on; 0:
Power is off).
POWER_EVENT_I: Indicates if power status has changed (1: Changed; 0:
Not changed).
The hook should return FALSE except when current power is on
(POWER_STATUS_V = 1) and the power status has not been changed
(POWER_EVENT_I = 0).
Service response =
Set reason = DSQ_REASON_CMD_INCOMPLETE
TASK COMPLETE?
Set reason =
Disable PHY
DSQ_REASON_STD_COMPLIANT
Note that when a drive fails the disk qualification process, its attached PHY is disabled by the firmware for all cases
except when the firmware cannot establish a command-response sequence with the drive.
A SATA disk drive is qualified based on its response to the ATA IDENTIFY DEVICE command, as shown in the
following figure.
Figure 11-2. SATA Disk Qualification Process
Response received from transport layer
Device =
ATA device?
Y Set reason =
DSQ _REASON _STD_NON_COM PLIANCE
Set reason =
Disable PHY
DSQ_REASON_STD_COM PLIANT
Similar to the SAS disk qualification procedure, if the firmware cannot establish a valid command-response sequence
with the disk drive, it does not disable the PHY even though the qualification process has failed.
Additionally, if the device type reported in the ATA IDENTIFY DEVICE response is not an ATA device, the firmware
reports a PASSED status. When the firmware cannot determine if the attached device is ATA-compliant, there is
not enough information for qualification purposes. The firmware allows the device to pass disk qualification with the
reason code set to DSQ_REASON_NOT_DRIVE. The PHY is not disabled so that when a disk drive is inserted, it
may then be qualified.
Once a PHY is disabled as a result of detecting an unsupported disk drive, the PHY can only be re-enabled by
sending it an SMP PHY CONTROL (RESET) command. It is assumed that the unsupported drive is removed and a
different (compliant) drive is inserted.
DSQ provides a function to enable/disable disk qualification. This function is called by:
• DSQ initialization, to enable/disable disk qualification based on the initialization string setting (all enabled / all
disabled).
• SMP, upon receipt of an SMP PHY CONTROL command with the “PHY OPERATION” field set to the reserved
code 0xaa or 0xab for disabling or enabling DSQ respectively.
reason DSQ_REASON_UNINITIALIZED (0) DSQ has not been performed on this PHY yet.
PO RTMG R
disk qualification
request & response
DSQ
SIA SAHA
SSP Initiator request & response STP Initiator request & response
SAS Transport
11.6 Customization
The qualification criteria shown in Figure 11-1 and Figure 11-2 ensure that an attached disk drive is compliant with its
associated standard. However, additional qualification criteria, such as drive manufacturer or model number, can be
added. For customers with full access to the firmware source code, the additional criteria can be added by modifying
the file dsq_hook_default.c.
Customers can also customize the DSQ result handler with the result handler hook routine in dsq_hook_default.c.
The default DSQ failure handling method includes the following:
• Firmware disables the PHY attached to the disqualified drive in dsq_hook_disk_qualify_result_hdlr() when the
DSQ result fails with reason code not equal to DSQ_REASON_CMD_INCOMPLETE.
• When the SMP Initiator queries the expander PHY information with SMP Discover/Discover List function,
Firmware hides the PHY attached to the disqualified Drive with “No device attached” in the SMP response.
In Figure 12-1, “1” means SSP/SMP requests to the expander virtual port, and “2” means I/O traffic that passes
through the expander ports excluding its own virtual port. When doing NDSR reset, the expander only rejects the
SMP/SSP/STP open request to its own virtual PHY, while the request through the expander ports can continue
without any disruption.
The state machine starts from RF_IDLE state after rf_init() is called, and enters RF_SCHEDULE state when
rf_schedule() is called. After entering RF_SCHEDULE state, the expander device:
1. Sends Broadcast (Expander) on all physical PHYs to indicate that it must have reduced functionality for a
period of time.
2. Initializes the initial_time_to_rf timer to the value indicated by the INITIAL REDUCED FUNCTIONALITY field in
the initialization string, and starts the timer.
3. After initial_time_to_rf timer expires, the expander enters RF_EXECUTE state, disables PACK, initializes
the max_rf_time timer to the value indicated by the MAXIMUM REDUCED FUNCTIONALITY TIME field in
initialization string, and starts the timer. All SSP/SMP/STP traffic to the virtual PHY is now responded with
OPEN REJECT(RETRY).
4. After max_rf_time timer expires, the expander reenters RF_IDLE state, enables PACK, and originates a
Broadcast (Change) on each expander PHY. SSP/SMP/STP traffic now can normally go to the virtual PHY.
The interface for triggering Expander to enter the RF mode is defined as the API rf_schedule()as follows.
Outputs None.
RF mode is not explicitly used in alpha release by default. To enter RF mode, application can invoke this routine.
When rf_schedule(NDSR_RF_NDSR_MODE) is called, NDSR is scheduled.
delay time with the value of TIME TO REDUCED FUNCTIONALITY field, and initializes the RF max waiting time with
the value of MAXIMUM REDUCED FUNCTIONALITY TIME field in the response frame of SMP REPORT GENERAL.
Before RF delay time expires, SSP Initiator in host should manage to terminate any SSP traffic with the neighbor
Expander. After the timer for RF delay time expires, the expander starts the max waiting timer until the max waiting
timer expires. During the waiting period, the SXP will delay to process PHY events in the wide port until the max wait
timer expires or a Broadcast (Change) is received in the wide port to the neighbor expander.
Once the SMP initiator receives a Broadcast (Change) from its neighbor expander, which means that the neighbor
expander has ended the RF mode and has come back to full functionality, the SMP initiator can immediately trigger a
new topology discovery process for its neighbor SXP.
12.2.1 Overview
The NDSR mechanism is similar to the one provided in RF mode. As a result, the NDSR uses the same state
machine and the same rf_schedule API from RF to enter into NDSR mode. The NDSR process can be separated
into three steps:
1. After the expander receives a soft reset command from the SES string out page or command server, the
expander sends NDSR event notification Broadcast (Expander) to all initiators in the SAS domain before a soft
reset is triggered in the register if NDSR enable field is set in initialization string. It then starts the first timer
for NDSR delay. The timeout value is the same one as configured for reduced functionality, the initial reduced
functionality timer.
2. During the NDSR delay interval, the expander still functions normally. After the delay ends, the firmware saves
some necessary information about the running-time environment and triggers the reset register. It then initiates
the NDSR reset process. Host initiators should terminate the SSP/SMP transactions to this virtual expander
port.
3. The expander responds to any SSP/SMP request to the expander’s virtual port with OPEN_REJECT (RETRY)
if host sends a new request. The firmware then is reloaded and re-initialized. The firmware does not re-
initialize the expander routing table or its hardware registers related to ECMR, SXL, and SSPL. This ensures
that the I/O traffics that go through the expander ports (except for the expander’s own virtual port) are not
disrupted. The firmware then sends Broadcast (Change) and goes again into normal state.
The following behavior is expected during the NDSR process:
• The routing table and its hardware registers related to ECMR, MABC, SXL and SSPL are not re-initialized, so
there is no link reset or hard reset for each PHY after soft reset.
• Existing connections through ECMR are not disrupted and new connections through ECMR can be created.
• Any type of broadcast primitive is not forwarded.
• Any SSP/SMP request to the expander virtual port is responded to with an OPEN_REJECT (RETRY) primitive.
• The hardware event indications are kept in the registers.
• The firmware uses the snapshot of the state/configuration that it took prior to the reset to bring it back up in the
same state.
If more data needs to be kept for NDSR in application code, the data can be added at the end of ndsr_data
instruction, before the ndsr_data_last_addr element. The start address of imem_mem2_cached may need be
adjusted to accommodate more data.
Figure 12-4. NDSR Save Data Layout
0x1320 – 0x132F CMDSVR UART and SPS Configuration and TWI Blocks No
0x1A90 – 0x1ACF Zone Manager Password and Saving Support Configuration Block Yes
...........continued
Need Hard Reset
Byte Offset Allocation to take effect
13. Zoning
The SXP 12G zoning implementation is compliant with the SAS 2.1/3.0 specification for port-based zoning. The
SXP 12G zoning capability restricts communication between devices in different zoned domains. In zoning mode,
certain PHYs are marked as being in a zoned domain or not. Zones are based on an access permission table that
determines the access permissions between different groups of devices. Groups that have access to each other
constitute a zone.
The device supports up to 256 groups. The SMP commands necessary to program group IDs in-band and setup the
access permission table are also supported. Legacy expanders that do not support zoning can be cascaded outside
the zoning fabric boundary and inherit the group assignment of the PHY to which it is attached. The device zoning is
designed to be transparent to the end devices and legacy expanders.
Other supported security features include detection of SAS address spoofing on the OPEN address frames and
broadcast storm prevention.
A physical domain may contain several zones. Figure 13-1 shows an example of this. If group 11 has access to group
13, then group 11 and 13 comprise one virtual zone. Similarly, if group 12 and 14 can access one another, these two
groups comprise a separate virtual zone that share the same physical topology with group 11 and 13. Note that the
traffic between the two zones does not cross.
Recommended
Bit/Field Description
Default
INSIDE ZPSDS Indicates if the PHY is inside or on the boundary of a ZPSDS N/A See Note
REQUESTED INSIDE
Used to establish the boundary of the ZPSDS 0
ZPSDS
INSIDE ZPSDS Used to determine the value of the INSIDE ZPSDS bit after a
0
PERSISTENT link reset sequence
ZONE GROUP Used to determine the zone group of the PHY after a link reset
0
PERSISTENT sequence if the INSIDE ZPSDS bit is set to zero
ZONE GROUP The zone group to which the PHY belongs 00h
Note: The INSIDE ZPSDS bit is determined from the values exchanged during the link reset sequence.
The INSIDE ZPSDS bit indicates if the PHY is inside or on the boundary of a ZPSDS. The REQUESTED INSIDE
ZPSDS bit determines the values of zone PHY information fields after a link reset sequence. See [4], Section 4.9.4
for detail.
The INSIDE ZPSDS PERSISTENT bit determines the value of the INSIDE ZPSDS bit after a link reset sequence.
See [4], Section 4.9.4 for detail.
The ZONE GROUP PERSISTENT bit determines the method of determining the zone group of the PHY after a link
reset. See [4], Section 4.9.4 for detail.
The zone group field contains the zone group to which the PHY belongs. See [4], Section 4.9.3 for detail.
Note
• The method of detecting that a new SATA device has been inserted is outside the scope of the SPL standard
and firmware does not implement it.
The permission is symmetrical. That is, P[X,Y] is the same as P[Y,X]. Members within the same group may or may
not be given permission to access one another. The following permissions are also valid:
• P[X,X] = 0
• P[X,X] = 1
Extending this concept further to encompass all 256 possible groups’ yields the permission matrix.
Table 13-3. Zone Permission Table
0 0 1 0 0 0
1 1 1 1 1 1
Note:
1. Shading identifies configurable zone groups.
2. All reserved ZP bits must be set to zero (for example, bits ZP[4 to 7, 4 to (z-1)] are set to zero).
3. The number of zone groups (that is, z) is reported in NUMBER OF ZONE GROUPS field in the REPORT
GENERAL response (see [4] section, 10.4.3.4).
Note: Group 0 cannot access any other group other than Group 1. On the other hand, Group 1 has visibility to every
group. Group 4 to 7 are reserved. PHYs in all the left zone groups have access to PHYs in the zone groups indicated
by the zone permission table. Group 2 and Group 3 are defined as special groups for management. See [4], Section
4.9.3.2 for detail.
PHYs with INSIDE ZPSDS set to 0 delimit the zoning boundary and to connect to legacy expanders and end devices.
See [4], Section 4.9 for detail.
Zone Permission Table Group 0 can access only group 1, that is, P[0, 1] = 1. Group 1 can access all other
groups, that is, P[1, 0 .. 255] = 1. The remaining permissions are all set to 0.
...........continued
Element Default Configuration
Zone PHY Information PHY 0 to 7 are with REQUESTED INSIDE ZPSDS bit, INSIDE ZPSDS PERSISTENT
bit, and GROUP ID PERSISTENT bit set to 1, and Zone Group ID set to 1; The virtual
SSP/SMP port is assigned to group 1. The remaining PHYs are with REQUESTED
INSIDE ZPSDS bit, INSIDE ZPSDS PERSISTENT bit, and GROUP ID PERSISTENT
bit set to 0.
PHY 8 to 11 Zone Group ID set to 0;
PHY 12 to 15 Zone Group ID set to 8;
PHY 16 to 19 Zone Group ID set to 9;
PHY 20 to 23 Zone Group ID set to 10;
PHY 24 to 27 Zone Group ID set to 11;
PHY 28 to 31 Zone Group ID set to 12;
PHY 32 to 35 Zone Group ID set to 13;
PHY 36 to 39 Zone Group ID set to 14;
PHY 40 to 43 Zone Group ID set to 15;
PHY 44 to 47 Zone Group ID set to 16;
PHY 48 to 51 Zone Group ID set to 17;
PHY 52 to 55 Zone Group ID set to 18;
PHY 56 to 59 Zone Group ID set to 19;
PHY 60 to 63 Zone Group ID set to 20;
PHY 64 to 67 Zone Group ID set to 21;
Zone Information Saved Saved value support disabled for zoning enable/disable status, zone PHY information
Value Support and Zone for each PHY, zone permission table and zone manager password;
Information Load
After power on, the expander device set the current value to the saved value, if any, or
the default value, if there is no saved value supported.
Zone Manager Password ZERO. Well-known value that provides access to any zone manager
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
The management device server in a zoning expander device only accepts SMP zone configuration function requests,
SMP ZONE ACTIVATE requests, and SMP ZONE UNLOCK requests while it is locked, and only accepts SMP zone
configuration function requests from the zone manager that locked the zoning expander device (that is, the active
zone manager). SMP zone configuration functions change zoning expander shadow values. When changes are
complete, the zone manager activates the changes and the zoning expander device sets the zoning expander current
values equal to the zoning expander shadow values. The zone manager then unlocks the zoning expander devices.
For a ZPSDS to function correctly, all zoning expander devices within the ZPSDS are required to have identical
values in their zone permission tables. To change zone permission tables, a zone manager device locks all zoning
expander devices in a ZPSDS.
To change zone PHY information, a zone manager locks only the zoning expander devices containing the PHYs to be
changed.
If the zone lock inactivity timer expires, then the zoning expander device performs the unlock step. The zoning
expander device is unlocked and the zoning expander shadow values are not activated. If the zone lock inactivity
timer is active, and an NDSR[12.2 Non-I/O Disruptive Soft Reset (NDSR)] is expected to be triggered, unlock the
zoning expander device first before the triggering.
For more detail about zoning configuration, see [4], Section 4.9.6 and [4], Section 10.4.3.
SAS Port
SSP transport layer Com ponent SMP transport layer
The following tables outline the components of the Protocol Stack Library that are included in the PM73206_04
firmware.
Table 14-1. Protocol Stack Library Components—SES/SCSI
Layer Component
Layer Component
SMP target
...........continued
Layer Component
Layer Component
SMP
Target
Application
Functional
Interface
High Priority
Event Q ueue
As shown in the previous diagram, the SMP Initiator, SSP Target, SSP Initiator, and STP Initiator applications send
ingress Serial Management Protocol and SCSI Transport Protocol Messages to the Transport Layer which converts
the requests into SMP or SSP/STP SAS frames. The SAS frames are sent to the Port Layer where they are queued
for transmission on a specific connection. The Port Layer opens the required connections and transmits the queued
frames.
In the other direction, the SAS connections in the Port Layer are opened remotely by other SAS endpoints in
the network. Received egress frames are passed from the Port Layer to the Transport Layer where they are
assembled into SAS Management Protocol or SCSI Transport Protocol messages for transmission to their respective
applications.
The SMP Target application operates within the SAS Port thread. When an SMP Request frame is received by
the Port Layer, a blocking functional call is made to the SMP Target Application for processing. The SMP Target
application returns an SMP Response frame for transmission back into the connection. The Port Layer effectively
blocks while the SMP Target application is processing an SMP request and the SAS Port remains in the connected
state throughout the entire process.
...........continued
Page Code Page Name Control/Status
Reserved Status
1 Reserved (0x00)
2-3 (MSB)
Page Length (n-3) (LSB)
2-3 (MSB)
Page Length (n-3) (LSB)
9 Sub-Enclosure ID (0x00)
Type Descriptor Header List (4 bytes) Type descriptor header (1st element type)
….
Type Descriptor Text variable Type descriptor text (1st element type)
….
1 – 52 Test data
Bits 7 6 5 4 3 2 1 0
Bytes
0 Element Type
The element types and numbers of each type reported on the SES page are listed in the following table.
Table 14-7. Supported SES Element List
0x12 Voltage 1
0x07 ES Electronics 1
0x0E Enclosure 1
Note
1. The elements and number of elements are arbitrarily chosen for the SES module and need to be aligned to the
specific enclosure targeted.
2. Array Device Count is configured through the initialization string field Disk Drive Count in Table 8-36. The
mapping between the Array Device element and the SXP Logical PHY is configurable in the table. In the
default initialization string setting, 12 drives are mapped to PHY8~PHY19 respectively.
3. The maximum number of Disk Drive Count, is restricted by the MACRO SES_SXP_MAX_PHYS_CNT in the
header file fwcs\ses\inc\ses.h and SXP’s PHY_COUNT. The SES_SXP_MAX_PHYS_CNT is defined as 68,
which is the maximum number of PHYs for the SXP12G device family.
Voltage 16 “Voltage ” + 0
...........continued
Component Name Bytes Field Name
….
….
The following table documents the byte offsets (starting from zero) of elements in Table 14-7 within the SES
enclosure control page.
Table 14-9. Element Offsets in Enclosure Control Page
...........continued
Device Element Offset
Bit 7 6 5 4 3 2 1 0
The System Control Byte is defined as a way for the host to indicate an overall status condition to the expander.
Info: The Informational condition bit (Info) may be set to one by the host to indicate the presence of an information
condition. The information condition is not an error and does not reduce the capabilities of the devices in the
enclosure. Transmitting an Enclosure Control diagnostic page with the Info bit set to zero does not clear the bit in the
enclosure when returned by the Enclosure Status diagnostic page.
Non-Crit: The Non-Critical condition bit (Non-Crit) may be set to one by the host to indicate the presence of a
non-critical condition. A non-critical condition is when one or more elements inside the enclosure have failed or are
operating outside of their specifications, but the condition does not affect the normal operation of the enclosure. A
condition determined by the SES F/W overrides this bit.
Crit: The Critical condition bit (Crit) may be set to one by the host to indicate the presence of a critical condition.
A critical condition is when one or more elements inside the enclosure have failed or are operating outside of their
specifications, and the condition affects the normal operation of the enclosure. A condition determined by the SES
F/W overrides this bit.
Unrecov: The Unrecoverable condition bit (Unrecov) may be set to one by the host to indicate the presence of an
unrecoverable condition. A condition determined by the SES F/W overrides this bit.
Note: Currently none of the above bits are being processed by the EMA and the SES enclosure control page will
simply set these values in the database. A request for an SES enclosure status page will return the settings for these
bits
The format of the CONTROL INFORMATION field for a device element type in the Enclosure Control diagnostic
page is defined in . Note: Only “RQST IDENT”, “RQST FAULT” and “DEVICE OFF” bits of the device element are
implemented in the SDK.
Table 14-11. Device Element for Enclosure Control Diagnostic Page
Byte \ Bit 7 6 5 4 3 2 1 0
0x01 Reserved
The request identify bit (RQST IDENT) is set to request that the device slot be identified by changing the blink pattern
for the SGPIO LOCATE bit. When the RQST IDENT bit is cleared, the visual indication is not present.
The request fault indication (RQST FAULT) bit set to one specifies that the device slot be identified by a visual
indication that a fault is present in the device. When the RQST FAULT bit is cleared, the fault indication is cleared if
the indication is not also set by the device or enclosure services process.
The DEVICE OFF bit is set to request that the device be turned off. When the DEVICE OFF bit is cleared, the device
may turn on if all other prerequisites are met.
Bit 7 6 5 4 3 2 1 0
Select: When set to one, the control information for this element will be acted upon.
PrdFail: When set to one, the predicted failure indicator (if one exists) will be activated. This bit is ignored when
handling all element types.
Disable: When set to one, the element is disabled. This bit is ignored when handling all element types.
Rst Swap: When set to one, the swap status for this element will be set to zero.
Note:
• Currently only the ‘Select’ bit is processed. All other bits are simply set in the database. A request for a SES
enclosure status page will return the settings for these bits.
7 6 5 4 3 2 1 0
0 COMMON CONTROL
1 Rqst OK Rqst Rsvd Rqst Hot Rqst Cons Rqst in Crit Rqst in Rqst Rqst R/R
Device Spare Check Array Failed Rebuild/ Abort
Array Remap
2 Active Do Not Reserved Rqst Insert Rqst Rmv Rqst Ident Reserved
Remove
In the Common Control byte, Select, PrdFail, Rst Swap bits are supported. Rqst OK: When set to one, the HDD
status LED blinks in the Drive Online pattern. When set to zero, the blink pattern is de-activated.
Rqst Rsvd Device, Rqst Hot Spare, Rqst Cons Check, Rqst in Crit Array, and Rqst in Failed Array: The value
of the Request Reserved Device bit, the Request Hot Spare bit, the Request Consistency Check In Progress bit, the
Request in Critical Array bit and the Request in Failed Array bit will have no effect. The SES F/W maintains a copy of
these bits as status and returns the copy to the host when requested through the Enclosure Status diagnostic page.
Rqst Rebuild/Remap: When set to one, the HDD status LED blinks in the Drive Rebuilding pattern. When set to
zero, the blink pattern is de-activated.
Rqst R/R Abort: When set to one, the HDD status LED blinks the Rebuild Abort pattern. When set to zero, the blink
pattern is de-activated.
Active: This bit has no effect since the enclosure does not drive the HDD activity LED.
Do Not Remove: The value of this bit will have no effect. The SES F/W maintains a copy of this bit as status and
returns the copy to the host when requested through the Enclosure Status diagnostic page.
Rqst Insert: This bit has no effect.
Rqst Rmv, Rqst Ident: When either the Request Removal or Request Identify bit is set to one, the HDD status LED
blinks the Drive Identify/Prepare for Removal pattern. When set to zero, the blink pattern is de-activated.
Rqst Fault: When set to one, the HDD status LED blinks the Drive Failed pattern. When set to zero, the blink pattern
is de-activated.
Device Off, Enable Byp A, and Enable Byp B: These bits will have no effect.
Note:
• Currently only the ‘Select’ bit is processed. All other bits are simply set in the database. A request for a SES
enclosure status page will return the settings for these bits.
Table 14-14. Enclosure Control Page: Power Supply Element
7 6 5 4 3 2 1 0
0 COMMON CONTROL
7 6 5 4 3 2 1 0
0 COMMON CONTROL
000b Reserved
001b Low
...........continued
Requested Speed Code Fan Speed
100b Medium
111b High
The requested speeds will only be activated if they are the same or higher than that required by the current ambient
temperature.
Note:
• Currently only the ‘Select’ bit is processed. All other bits are simply set in the database. A request for a SES
enclosure status page will return the settings for these bits.
Table 14-16. Enclosure Control Page: Temperature Sensor Element
7 6 5 4 3 2 1 0
0 COMMON CONTROL
1 Rqst Ident
2 Reserved
7 6 5 4 3 2 1 0
0 COMMON CONTROL
2 Reserved
7 6 5 4 3 2 1 0
0 COMMON CONTROL
...........continued
7 6 5 4 3 2 1 0
3 Reserved Set Mute Reserved Set Remind Info Non-Crit Crit Unrecov
7 6 5 4 3 2 1 0
0 COMMON CONTROL
2 Reserved Select
Element
3 Reserved
7 6 5 4 3 2 1 0
0 COMMON CONTROL
2 Reserved
7 6 5 4 3 2 1 0
0 COMMON CONTROL
2 Reserved
7 6 5 4 3 2 1 0
0 COMMON CONTROL
1 Rqst Ident
2 Reserved
….
….
The following table documents the byte offsets (starting from zero) for elements on the enclosure status page.
Table 14-24. Element Offsets in Enclosure Status Page
...........continued
Element Type Offset
Bit/Byte 7 6 5 4 3 2 1 0
Invop: This is set to one by the SES F/W when returning the first Enclosure Status diagnostic page following receipt
of an invalid Enclosure Control diagnostic page.
Info: This bit is set to one in the Enclosure Status diagnostic page after the firmware detects an information condition
in the enclosure. The bit is also set to one if it has been set in the previous Enclosure Control diagnostic page. This
bit is set to zero on a per-initiator basis.
Non-Crit: This bit is set to one in the Enclosure Status diagnostic page after the firmware detects a non-critical
condition in the enclosure. It is also set to one if it has been set to one in the previous Enclosure Control diagnostic
page. The bit is only set to zero if there is no locally detected non-critical condition, and it has not been set to one by
an Enclosure Control diagnostic page.
Crit: This bit is set to one in the Enclosure Status diagnostic page after the firmware detects a critical condition in the
enclosure. It is also set to one if it has been set to one in the previous Enclosure Control diagnostic page. The bit is
only set to zero if there is no locally detected critical condition, and it has not been set to one by an Enclosure Control
diagnostic page.
Unrecov: This bit is set to one in the Enclosure Status diagnostic page after the firmware detects an unrecoverable
condition in the enclosure, and is only set to zero if there is no locally detected unrecoverable condition.
Note:
• Currently only the INVOP bit is processed. None of the other bits are being set by the EMA; the SES enclosure
status page will simply return the values stored in the database. An SES enclosure control page can set
writeable bits in the database.
The format of the STATUS INFORMATION field for a device element type in the Enclosure Status diagnostic page is
defined in the following table. Only the “RQST IDENT”, “RQST FAULT” and “DEVICE OFF” bits of the device element
are implemented in this release, and only 12 devices elements are supported. These are mapped to logic PHY 8 –
logic PHY 19.
Table 14-26. Enclosure Status Page: Common Status Byte for All Element Types
Bit/Byte 7 6 5 4 3 2 1 0
PrdFail: When set to one, this bit indicates that the element has the capability of predicting failure and that failure has
been predicted. The bit may additionally be set to one by the corresponding bit in the Enclosure Control diagnostic
page.
Swap: When set to one, this bit indicates that an element has been removed and reinserted in the location indicated.
This bit is set to zero only by a corresponding reset swap bit in the Enclosure Control diagnostic page. The enclosure
services process must maintain one SWAP bit for each I_T nexus. The SDK supports the Swap bit and RST_SWAP
bits for Array Device Elements. The implementation of RST_SWAP and SWAP bits for each I_T Nexus is described
as follows:
• When powered on, all drives are considered to do one hotplug action; SWAP bit is reported as ‘1’ for each
initiator.
• When one initiator sends the enclosure control page with RST_SWAP ‘1’, the SWAP bit is cleared for the
corresponding I_T nexus only.
• When drive is swapped, the port manager thread can detect this event and updates the SWAP status to all I_T
nexuses.
Status Code: The status code indicates the overall operating status of the element.
Table 14-27. Status Code
0x07 Not Available Element is installed and has no recorded errors, but has not been
‘switched on’
Note:
• Currently none of the above bits are being set by the EMA; the SES enclosure status page simply returns values
stored in the database. An SES enclosure control page can set writeable bits in the database.
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
3 App Client Fault Fault Device Off Bypassed Bypassed Device Device
Bypassed Sensed requested A B Bypassed A Bypassed
B B
In the Common Status byte, the PrdFail, SWAP and Status Code bits are supported OK: The OK bit is set to one
when the HDD status LED is blinking the Drive Online pattern. It is set to zero when the blink pattern is de-activated.
Rsvd Device, Hot Spare, Cons Check, In Crit Array, and In Failed Array: The Reserved Device bit, Hot Spare bit,
Consistency Check in Progress bit, In Critical Array bit, and In Failed Array bit are copied from the latest Enclosure
Control diagnostic page received by the firmware.
Rebuild/Remap: The Rebuild/Remap bit is set to one when the HDD status LED is blinking the Drive Rebuilding
pattern. It is set to zero when the blink pattern is de-activated.
R/R Abort: The Rebuild/Remap Abort bit is set to one when HDD status LED is blinking the Rebuild Abort pattern. It
is set to zero when the blink pattern is de-activated.
App Client Bypassed A, App Client Bypassed B, Enclosure Bypassed A, and Enclosure Bypassed B: These
bits are not supported and must always be set to zero.
Do Not Remove: This bit is copied from the latest Enclosure Control diagnostic page received by the firmware.
Ready to Insert: This bit must always be set to zero.
Rmv: When set to one, this bit indicates that the HDD status LED is currently blinking the Drive Identify/Prepare for
Removal pattern. It is set to zero when the blink pattern is de-activated.
Ident: When set to one, this bit indicates that the HDD status LED is currently blinking the Drive Identify/Prepare for
Removal. It is set to zero when the blink pattern is de-activated.
Report: This bit must always be set to zero.
Fault Sensed: This bit must always be set to zero.
Fault Requested: When set to one, this bit indicates that the HDD status LED is currently blinking the Drive Failed
pattern. It is set to zero when the blink pattern is de-activated.
Device Off: This bit must always be set to zero.
Bypassed A, and Bypassed B: This bit must always be set to zero.
Device Bypassed A, and Device Bypassed B: These bits are not supported in the SCSI enclosure and must
always be set to zero.
Table 14-29. Array Device Element Status Code Summary
Note:
• Currently none of the above bits are being set by the EMA and the SES enclosure status page will simply return
the values stored in the database. An SES enclosure control page can set writeable bits in the database.
Table 14-30. Enclosure Status Page: Power Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
1 Ident Reserved
In the Common Status byte, Status Code and SWAP bit are supported.
Ident: This bit is not supported and must always be set to zero.
DC Over-Voltage, DC Under-Voltage: These two bits are mapped to the OV/UV bit of the PS/Fan module interface
register set. They are set to one when the firmware detects that the OV/UV bit is set to one. They are set to zero
when the OV/UV bit is set to zero.
DC Over-Current: This is mapped to the OC bit of the PS/Fan module interface register set. It is set to one when the
firmware detects that the OC bit is set to one. It is set to zero when the OC bit is set to zero.
Over-Temperature Fail: This is mapped to the OTP bit of the PS/Fan module interface register set. It is set to one
when the firmware detects that the OTP bit is set to one. It is set to zero when the OTP bit is set to zero.
Temperature Warning: This fault condition is determined internally within the power supply. It is not separately
indicated to the EMM and hence cannot be reported separately. This bit must always be set to zero.
DC Fail: This is mapped to the POK bit of the PS/Fan module interface register set. It is set to one when the firmware
detects that the POK bit is set to zero. It is set to zero when the OC bit is set to one.
AC Fail: This bit is mapped to the VIN_GOOD bit of the PS/Fan module interface register set. It is set to one when
the firmware detects that the VIN_GOOD bit is set to zero. It is set to zero when the VIN_GOOD bit is set to one.
Hot Swap: This bit is set to one when element is replaced without power off. It is set to zero when element
replacement doesn’t happen.
Fail: This is set to one when any of the DC Over-Voltage, DC Under-Voltage, DC Over-Current, Over-Temperature
Fail, DC Fail and AC Fail bits are set to one. It is also set to one if the firmware fails to communicate with the PS/Fan
module interface register set. It is set to zero when none of these bits is set to one.
Rqsted On: This bit must be cleared when the power supply is not installed and set when the power supply is
installed.
Off: When set this bit indicates that the power supply is not providing power. This can occur because the PS is not
installed in the slot.
Table 14-31. Power Element Status Code Summary
Note:
• Currently none of the above bits are being set by the EMA and the SES enclosure status page will simply return
the values stored in the database. An SES enclosure control page can set writeable bits in the database.
Table 14-32. Enclosure Status Page Cooling Element Format
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
...........continued
Bit/Byte 7 6 5 4 3 2 1 0
In the Common Status byte, the Status Code bits are supported.
Ident: This bit is not supported and must always be set to zero.
Actual Fan Speed: This is the fan speed in revolutions per minute (RPM) multiplied by 10.
Hot Swap: This bit is set to one when element is replaced without power off. It is set to zero when element
replacement doesn’t happen.
Fail: When set to one, this bit indicates that the Fail indicator is active. This can occur as a result of a locally detected
Fan failure.
Rqsted On: When set to one, this bit indicates that the fan has been requested to turn on by the host setting the
corresponding control bit. This bit must always be set to zero because this control bit is not implemented.
Off: When set to one this bit indicates that the fan is not operational.
Actual Speed Code: This field indicates the detected speed of the cooling element.
Table 14-33. Cooling Element Status Code Summary
Note:
• Currently none of the above bits are set by the EMA; the SES enclosure status page simply returns values
stored in the database. A SES enclosure control page can set writeable bits in the database.
Table 14-34. Enclosure Status Page: Temperature Sensor Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
2 Temperature
UNNKOWN The temperature sensor itself has failed OT, UT Fail = 0 OT, UT
Warn = 0
Note:
Currently only a value for temperature sensor 1 is set by the EMA in the database. The SES enclosure status page
will simply return the values stored in the database. A SES enclosure control page can set writeable bits in the
database.
Table 14-36. Enclosure Status Page: Voltage Sensor Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
2 (MSB)
VOLTAGE
3 (LSB)
OK Voltage is within normal operating region WARN OVER, UNDER Fail = 0 CRIT
OVER, UNDER = 0
NON-CRITICAL Voltage is outside warning limits, but inside critical WARN OVER or UNDER Fail = 1 CRIT
limits OVER, UNDER = 0
UNKNOWN The voltage sensor itself has failed WARN OVER, UNDER Fail = 0 CRIT
OVER, UNDER = 0
CRITICAL Voltage is outside critical limits WARN OVER, UNDER Fail = 0 CRIT
OVER or UNDER = 1
Note:
The SES enclosure status page will simply return the values stored in the database. A SES enclosure control page
can set writeable bits in the database.
Table 14-38. Enclosure Status Page: Audible Alarm Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
2 Reserved
In the Common Status byte, the Status Code bits are supported.
Ident: This bit is not supported and must always be set to zero.
Fail: When set to one, this bit indicates that the Fail indicator is active. This can occur as a result of a locally detected
alarm failure.
Rqst Mute: This bit is copied from the latest Enclosure Control diagnostic page received by the firmware.
Muted: When set to one, this bit indicates that the audible alarm is in the muted state. No sound is emitted when in
this state.
Remind: This bit must always be set to zero.
Info: This bit must always be set to zero.
Non-Crit: This bit indicates the alarm is emitting a non-critical tone if it is not muted.
Crit: This bit indicates the alarm is emitting a critical tone if it is not muted.
Unrecov: This bit must always be set to zero.
Table 14-39. Audible Alarm Element Status Code Summary
Note:
• Currently none of the above bits are being set by the EMA and the SES enclosure status page will simply return
the values stored in the database. An SES enclosure control page can set writeable bits in the database.
Table 14-40. Enclosure Status Page: ES Electronics Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
2 Reserved Report
In the Common Status byte, the Status Code bits are supported.
Ident: This bit is not supported and must always be set to zero.
Fail: When set to one, this bit indicates that the Fail indicator is active. This can occur as a result of a locally detected
ES Electronics failure.
Report: Reflects the select element setting bit from the last SES enclosure control page.
Hot Swap: This bit is set to one when element is replaced without power off. It is set to zero when element
replacement doesn’t happen.
Table 14-41. ES Electronics Element Status Code Summary
NOT AVAILABLE The SEP is in Bootloader and is not fully functional N/A
Note:
• Currently none of the above bits are being set by the EMA and the SES enclosure status page will simply return
the values stored in the database. An SES enclosure control page can set writeable bits in the database.
Table 14-42. Enclosure Status Page: Enclosure Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
1 Ident Reserved
In the Common Status byte, the Status Code bits are supported.
Ident: This bit is set to one if the Shelf Status LED is blinking the identify pattern; it is set to zero otherwise.
Failure Indication: This bit is set to one if the firmware has detected a critical condition and the shelf status LED is
blinking a fault pattern; it is set to zero otherwise.
Warning Indication: This bit is set to one if the firmware has detected a non-critical condition and the shelf status
LED is blinking a warning pattern; it is set to zero otherwise.
Failure Requested: This bit is copied from the latest Enclosure Status diagnostic page received by the firmware.
Warning Requested: This bit is copied from the latest Enclosure Status diagnostic page received by the firmware.
Time Until Power Cycle, Requested Power off Duration: These bits are not implemented.
Note:
Currently, none of the above bits are being set by the EMA and the SES enclosure status page will simply return the
values stored in the database. An SES enclosure control page can set writeable bits in the database.
Table 14-43. Enclosure Status Page: Expander Element
Bit/Byte 7 6 5 4 3 2 1 0
0 COMMON STATUS
Ident Fail
2 Reserved
3 Reserved
Bit/Byte 7 6 5 4 3 2 1 0
Ident: This bit is not supported and must always be set to zero.
Fail: This bit is not supported and must always be set to zero
Connector Type: This field explains what the connector type is, such as SFF-8644.
Connector Physical link: This field indicates the physical link in the connector represented by this element.
Note: Currently none of the above bits are being set by the EMA and the SES enclosure status page will simply
return the values stored in the database. An SES enclosure control page can set writeable bits in the database
Bit/Byte 7 6 5 4 3 2 1 0
...........continued
Bit/Byte 7 6 5 4 3 2 1 0
1 Obsolete
Reserved Download Status: this field indicates the status of the firmware download.
0x00: Ready for download 0x01: Download in progress, no error 0x02: Image header
incorrect 0x03: Packet offset incorrect 0x04: Image CRC incorrect 0x05: Mismatch of
image length sent and length in of the download header 0x06: Hardware errors, such as
wrong packet CRC from expander 0x07: Download completes, but pending on a reboot
command from host in order to run the new image.
Tag Data: Tag Data Identify String has the following format:
“Tag Data” (8 bytes) Tag Data Length = 100 Tag Data (100 bytes)
User defined 0 - 97
4 Command
Vendor Specific
5-n User Data
The format of the pages is a command code followed, where relevant, by data.
Table 14-50. String Out Diagnostic Commands
0x01 Download Firmware image binary EMA prepares application area, copies data into
Firmware data flash memory, but does not reboot.
New firmware takes effect on next power-on-reset
or reboot command.
0x02 Reboot 01: soft-reset This command causes the SEP to perform a soft-
reset or hard-reset depending on the data field. A
02: hard-reset
sample of soft-reset:
Pmc_scsi –scsi –x 1d 10 00 00 06 00 –o 04 00 00
02 02 01
This command causes the SEP to perform a soft-
reset or hard-reset depending on the data field. A
sample of hard-reset:
pmc_scsi –scsi –x 1d 10 00 00 06 00 –o 04 00 00
02 02 02
0x20 Download Tag 100 bytes of Tag Data Data copied to RAM
Data
0x27 Set Time of day Time in 4 byte format LSB Set time in EMM for the timestamp used for error
clock byte first logging.
0x28 Clear Error Log None Error log stored in RAM is erased.
...........continued
Command Purpose Data Notes
0x40 Log Control Byte 1: Filter index Adjust log filtering for application log logging.
Function osf_log_word1_filter_set() is called with
Bytes 2-5: Mask
the parameters specified in the data.
Bytes 6 - 9: Pattern
Bytes 10 - 13: Type
Download Firmware: Upon receipt of the first firmware download command, the firmware verifies the binary image
header included in the first download packet. This image is then downloaded in a series of packets using the
“Firmware Download” command. New firmware image will not be executed until the next enclosure power cycle or
reboot. Each frame of firmware data is preceded by the offset of the current packet of data in the first four bytes
(bytes 5-8 of each string out: Firmware Download page). Details of host tools that generate the string out pages can
be found in Section 19.1.1 Host API.
Reboot: Firmware will return command status before reboot. After the reboot firmware will check for the cause of the
reboot. If new firmware image is downloaded previously, it will validate the CRC-32 of the new image. If the validation
is successful, it will switch to and start executing the new image.
Download Tag Data: Tag data can be used to uniquely identify a particular enclosure. This information is currently
stored in the database RAM on the SEP and will be reported in String In diagnostic page.
Table 14-51. String Out Diagnostic Page: Tag Data Format
Set Timestamp: The host sets the timestamp (seconds) and firmware configures the RTC counter accordingly.
Clear Error Log: Firmware will reset all the error log related pointers, effectively clearing the applications log.
...........continued
Component Name Bytes Field Name
….
….
Invop: This is set to one by the SES F/W when returning the first Threshold In diagnostic page following receipt of an
invalid Threshold Out diagnostic page.
Table 14-53. Threshold In Diagnostic Page: Data Format for All Element Types
Bits
7 6 5 4 3 2 1 0
Bytes
Every instance of each element type has an entry in the threshold pages. There is also a summary entry for each
element type.
Only the temperature sensor element type uses thresholds in an SEP. All other elements will report NULL data in
their entries in Threshold In diagnostic page and will ignore any data sent in Threshold Out diagnostic page.
• TEMPERATURE SENSOR ELEMENT: The temperature sensor element reports the four temperature thresholds
high and low, warning and critical in the Threshold In diagnostic page. In the Threshold In diagnostic page, the
Overall Threshold entries of the temperature sensor element are not supported.
The default temperature threshold values measured in degrees Celsius are as follow (with an offset of 20oC):
• High Critical: 50oC.
• High Warning: 40oC.
• Low Warning: 10oC.
• Low Critical: 0oC.
The above values are in decimal and must be programmed as hex when reported in SES.
1 Reserved (0x00)
Page Header
2-3 (MSB)
Page Length (n-3) (LSB)
….
….
SEP accepts new values for thresholds only for temperature sensor elements in the Threshold Out diagnostic page.
It must not accept new values for high/low critical thresholds. New values for high warnings must not be higher
than the default high warning, and new values for low warning must not be lower than the default low warning.
In the Threshold Out diagnostic page, the Individual Threshold entries of the temperature sensor element are not
supported. In other words, all the sensors in the enclosure share the same set of thresholds.
1 Reserved
Page Header
2-3 (MSB)
Page Length (n-3) (LSB)
...........continued
Component Name Bytes Field Name
Variable -
variable Element Descriptor (1st element of 1st element type)
Variable -
variable Element Descriptor (last element of 1st element type)
Variable -
variable Overall Descriptor (2nd element type)
Variable -
variable Element Descriptor (1st element of 2nd element type)
0 Reserved
1 Reserved
Header
2-3 (MSB)
Page Length (m-3) (LSB)
1 Reserved
Page Header
2-3 (MSB)
Page Length (n-3) (LSB)
Currently this page supports three additional element status descriptors: Drive descriptor, ES Electronics and SAS
Expander descriptor.
Table 14-58. Additional Element Status Descriptor with EIP Bit
Byte\Bit 7 6 5 4 3 2 1 0
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
2 Reserved EIIOE
3 Element Index
4
Protocol-specific information
x
Invalid: This bit is set 1 when the content of protocol-specific information is invalid.
EIP: This bit is set 1 to indicate the element index is present, only supports EIP is set to 1.
Protocol Identifier: The value reports the identification of the device protocol.
EIIOE: The EIIOE (Element Index Includes Overall Elements) field indicates if the position includes overall status
elements. An EIIOE bit set to one indicates that the ELEMENT INDEX field in table is based on the position in
the status descriptor list of the Enclosure Status diagnostic page including overall status elements and the OTHER
ELEMENT INDEX fields. An EIIOE bit set to zero indicates that the ELEMENT INDEX field is based on the position in
the status descriptor list of the Enclosure Status diagnostic page excluding overall status elements.
Element Index: The value indicates which descriptor is describing.
Table 14-59. Protocol-Specific Information with Drive Descriptor
Zx 7 6 5 4 3 2 1 0
2 Reserved
4
PHY Descriptor (first)
31
.. ….
z-27
PHY Descriptor (last)
z
Number of PHY Descriptors: This field reports how many PHYs are described.
Descriptor Type: This field must be set to 00 for drive descriptor.
Not All PHYs: This field indicates all PHYs of the SATA or SAS device should be described or not.
Device Slot Number: This field indicates the device slot number.
Table 14-60. PHY Descriptor Detail
Byte\Bit 7 6 5 4 3 2 1 0
1 Reserved
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
4
Attached SAS Address
11
12
SAS Address
19
20 PHY Identifier
21
Reserved
27
Byte\Bit 7 6 5 4 3 2 1 0
2
Reserved
3
4
SAS Address
11
12
Expander PHY Descriptor (first)
13
… ……
y-1
Expander PHY Descriptor (last)
y
Number of Expander PHY Descriptors: This field reports how many expander PHYs are described.
Descriptor Type: This field must be set to 01 for SAS Expander descriptor.
SAS Address: This field indicates the SAS address of expander.
Table 14-62. Expander PHY Descriptor
Byte\Bit 7 6 5 4 3 2 1 0
Connector Element Index: This field indexes the mechanical connector number.
Other Element Index: The field indexes the array device element.
1 Reserved (0x00)
2-3 (MSB)
Page Length (n-3) (LSB)
Supported Pages 4-n Supported Pages – a list of page codes in range of 0x1 ~
0x2F
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
4 Generation Code
7 Generation Code
9 Reserved
10 Reserved
11 Buffer ID
12 Buffer Offset(MSB)
13 Buffer Offset
14 Buffer Offset
15 Buffer Offset(LSB)
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
24 Microcode Data
… …
m Microcode Data
… PAD(if needed)
n PAD(if needed)
Download Microcode Mode: SXP firmware support the following three modes.
• Mode 0x07: Download microcode with offsets, save, and activate.
• Mode 0x0E: Download microcode with offsets, save, and defer activation.
• Mode 0x0F: Activate deferred microcode. The page will cause a reset of SXP, and new microcode will be
executed.
Buffer Offset: the current offset in bytes within the firmware image.
Microcode Image Length: the total number of bytes in the firmware image.
Microcode Data Length: the number of bytes in the Microcode Data field.
PAD: fill the field so that the total length of the page is a multiple of four bytes.
7 6 5 4 3 2 1 0
1 Reserved(0x00)
4 Generation Code(0x00)
7 Generation Code(0x00)
… …
23
Byte \ Bit 7 6 5 4 3 2 1 0
0 Reserved(0x00)
1 Subenclosure Identifier(0x00)
… …
8 Reserved
9 Reserved
10 Reserved
… …
Subenclosure Download Microcode Status: the status of download microcode operation. Firmware may return one of
the following values, depending on the Download Microcode Control diagnostic page and the download operation.
00h: No download microcode operation in progress.
01h: Download in progress.
10h: Download complete with no error, and firmware begins using new microcode after returning this page.
11h: Download complete with no error, and firmware begins using new microcode after the next hard reset or power
on.
13h: Download complete with no error, firmware begins using new microcode after hard reset, power on, or
processing a Download Microcode Control diagnostic page specifying the Activate Deferred Microcode mode.
80h: Error in one or more of the Download Microcode Control diagnostic page fields, new microcode discarded.
81h: CRC checksum error, new microcode discarded.
84h: Internal error in the download microcode operation.
85h: Try to activate the deferred microcode when there is no deferred microcode.
1 Subenclosure Identifier
2–3 (MSB)
Page Length (n-3) (LSB)
2–3 (MSB)
Page Length (n–3) (LSB)
The NUMBER OF SECONDARY SUBENCLOSURES field indicates the number of secondary subenclosure
nickname status descriptor values that are included, not including the primary subenclosure. The NUMBER
OF SECONDARYSUBENCLOSURES field must be set to the same value as the NUMBER OF SECONDARY
SUBENCLOSURES field in the Configuration Diagnostic Page.
Table 14-69. Subenclosure Nickname Status Descriptor Format
1 Subenclosure Identifier
...........continued
Component Name Bytes Field Name
(MSB)
6–7 SUBENCLOSURE NICKNAME LANGUAGE CODE (LSB)
The SUBENCLOSURE IDENTIFIER field indicates the subenclosure to which the subenclosure nickname status
descriptor applies.
The SUBENCLOSURE NICKNAME STATUS field indicates the status of nickname operations for the subenclosure
and is defined in the following table. After reporting a non-zero value, the enclosure services process must set
the SUBENCLOSURE NICKNAME STATUS field to 00h and set the SUBENCLOSURE NICKNAME ADDITIONAL
STATUS field to 00h.
Table 14-70. Subenclosure Nickname Status Field
Code Description
0x00 No errors
0x80 Error in one or more of the Subenclosure Nickname Control diagnostic page fields. The SUBENCLOSURE
NICKNAME ADDITIONAL STATUS field must be set to the offset of the lowest byte of the field in the
Subenclosure Nickname Control Diagnostic Page that has an error.
All Reserved
others
1 Reserved (0x00)
2–3 (MSB)
Page Length (n-3) (LSB)
When the SEP receives the event log retrieval command, it will prepare for event log retrieval by taking a snapshot
of the current event log to avoid interfering with the normal I/O operations. At this time the firmware will construct the
event log header and send it with the packet.
EMM Event Log Header
The data that is retrieved from the SEP is stored in a single file. The file must consist of a header followed by the
application firmware in a binary format. The event log header and data are displayed in the following table:
Table 14-72. EMM Event Log Header Format
12 HEX Product ID
Vendor ID: The Vendor ID is an 8-byte string and “VENDOR” is used to identify the log.
Product ID: The Product ID is used to check the product’s log and see what enclosure it came from. This field
currently reports 0x03.
Hardware Rev: The Hardware Rev is used to identify which hardware generated the log.
Firmware Rev: The Firmware Rev is used to identify this firmware’s revision.
Event Log Length: The length of the error log data returned through this page, which does not include header bytes.
Event Log Checksum: The event log checksum is the 32-bit sum of all event log data, which does not include
header bytes. The checksum is generated like the Tag Data Checksum.
Log Entry Format: IPMI events are reported in IPMI format, non-IPMI events are reported in an IPMI like format.
Byte/Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
2. and the PHY Analog Setting Descriptor is defined in Table 14-76. Firmware configures the PHY analog setting
for the PHY according to the parameters in the each descriptor. The analog setting sequence is as follows:
3. Firmware disables the PHY in both the MTSB and SSPL.
4. Firmware applies the analog settings to the MTSB and SSPL registers accordingly.
5. If the ENABLE_PHY bit in the descriptor is ‘1’, firmware then automatically enables the MTSB and SSPL in the
corresponding PHY. Otherwise, the PHY stays in PHY disabled state until the host application can issue SMP
PHY CONTROL (LINK RESET) to reset the PHY.
Table 14-75. PHY Analog Setting Page Format
Byte\Bit 7 6 5 4 3 2 1 0
1 Reserved
2 (MSB)
PAGE LENGTH (33*n)
3 (LSB)
4 (MSB)
PHY 0 ANALOG SETTING DESCRIPTOR
36 (LSB)
...
33*n-29 (MSB)
PHY n-1 ANALOG SETTING DESCRIPTOR
33*n+3 (LSB)
Byte\Bit 7 6 5 4 3 2 1 0
ENABLE_
0 PHY ID
PHY
1 Reserved
SNW3_SS
2 PHY RATE
C_TYPE
LOS
4 Reserved CTRL LOS REFAMP_SAS
SAS
RX PEAK LOS
5 ENB SATA Reserved CTRL LOS REFAMP SATA
6G SATA
RX PEAK RX PEAK
6 ENB ENB Reserved RX PEAK SAS
SAS1 3G SAS1 1G5
RX PEAK RX PEAK
7 ENB SATA ENB SATA RX PEAK SATA 6G RX PEAK SATA 1G5 3G
3G 1G5
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
T PISO
8 PRE2 SEL AMPLITUDE SAS 1G5
SAS 1G5
T PISO
9 PRE2 SEL AMPLITUDE SAS 3G
SAS 3G
T PISO
10 PRE2 SEL AMPLITUDE SAS2 6G
SAS2 6G
T PISO
11 PRE2 SEL AMPLITUDE SATA 1G5
SATA 1G5
T PISO
12 PRE2 SEL AMPLITUDE SATA 3G
SATA 3G
T PISO
13 PRE2 SEL AMPLITUDE SATA 6G
SATA 6G
T PISO T PISO
EDGE EDGE
14 DELAY DELAY POSTCURSOR SAS 1G5
SEL SATA SEL SAS
1G5 1G5
T PISO T PISO
EDGE EDGE
15 DELAY DELAY POSTCURSOR SAS 3G
SEL SATA SEL SAS
3G 3G
T PISO T PISO
EDGE EDGE
16 DELAY DELAY POSTCURSOR SAS2 6G
SEL SATA SEL SAS2
6G 6G
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
T PISO
PRE2
22 Reserved PRECURSOR SAS2 6G
MODE1
SAS2 6G
T PISO
PRE2
25 Reserved MODE1 PRECURSOR SATA 6G
SATA
6G(6)
SAS12G
TX BCT
PGA TX Cx BCT PRST
26 Reserved EN SAS3 Reserved
BOOST DFLT
12G
EN
27 TX C1 NON BCT
28 TX C2 NON BCT
29 TX C3 NON BCT
PHY ID: Specifies the PHY to which the PHY analog setting in this descriptor will be applied.
ENABLE_PHY: If this bit in the descriptor is ‘1’, firmware automatically enables the corresponding PHY. Otherwise,
the PHY stays in PHY disabled state until the host application can issue SMP PHY CONTROL (LINK RESET) to
reset the PHY.
SNW3_SSC_TYPE: Indicates the SNW3 PHY capability SSC type. See SPL2r05 Table 53 SNW-3 PHY capabilities.
PHY RATE: Sets the PHY rate to 12G, 6G, 3G and 1.5G. See Table 8-11.
G4_W_SSC, G4_WO_SSC, G3_W_SSC, G3_WO_SSC, G2_W_SSC, G2_WO_SSC, G1_W_SSC,G1_WO_SSC:
See Table 8-12 and refer SPL2r05 Table 8-16 SNW-3 PHY capabilities.
OTHERS: The other fields have the same definition.
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
4 Force restart
16 Sample points
17 Sample points
18 Sample points
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
5 PHY Count
7 Wait Time
8 Wait Time
PHY Descriptor 1
PHY Descriptor 2
Byte \ Bit 7 6 5 4 3 2 1 0
0 Logical PHY ID
Byte \ Bit 7 6 5 4 3 2 1 0
2 overflow
4 Bin value
5 Bin value
6 Bin value
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
4 Enable
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved(0x00)
• Port Mirroring PHY Descriptor Count: Reports the number of port mirroring PHY descriptors.
• Port Mirroring PHY Descriptor: Reports the source logical PHY ID and the destination logical PHY IDs
configured. Refer to the following table.
Table 14-83. Port Mirroring PHY Descriptor
Byte \ Bit 7 6 5 4 3 2 1 0
3 Reserved
• Source Logical PHY ID: In the control page, this field specifies which PHY has port mirroring enabled. In the
status page, this field reports which PHY has port mirroring is enabled.
• Destination Logical PHY ID 1: Reports which TX PHYs the source logical PHY ID is mirrored to.
• Destination Logical PHY ID 2: Reports which RX PHYs the source logical PHY ID is mirrored to.
Byte\Bit 7 6 5 4 3 2 1 0
1 RESERVRD
2 (MSB) (LSB)
PAGE LENGTH (n - 3)
3
TOGGLE ACTIVE IMAGE PARTITION: Decide whether to switch between image0 and image1.
TOGGLE ACTIVE DATA PARTITION: Decide whether to switch between data0 and data1.
The following table lists how toggle active data or image partition byte affects the value written to the bootcfg
partition:
Table 14-85. Active Flag in Bootcfg Partition
Images/DATAs are
X X Keep original Keep original
invalid (CRC fail)
Byte\Bit 7 6 5 4 3 2 1 0
1 RESERVRD
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
2 (MSB) (LSB)
PAGE LENGTH (n - 3)
3
4 ACTIVE IMGFLAG
5 ACTIVE DATAFLAG
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved
5 SLAVE ADDRESS
6 WRITE LENGTH
7 READ LENGTH
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved
4 RESULT
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved
4 TIMEOUT (MSB)
5 ...
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
6 ...
7 TIMEOUT (LSB)
8 RETRIES
9 PORT COUNT
10 Reserved
11 Reserved
13+8*n ...
14+8*n ...
17+8*n Reserved
18+8*n Reserved
19+8*n Reserved
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved
4 TIMEOUT (MSB)
5 ...
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
6 ...
7 TIMEOUT (LSB)
8 IDENTIFIER
9 FORMAT VERSION
10 MAX RETRIES
11 PORT COUNT
14 MAX RESET
15 Reserved
17 ...
18 ...
21 ...
22 ...
25+4*n ...
26+4*n ...
The fields in the page have the following meaning and behavior:
• TIMEOUT reports the current timeout setting.
• IDENTIFIER returns 1
• FORMAT VERSION returns 1
• MAX RETRIES returns the maximum possible number of retries before abandoning a single TWI frame.
• MAX WRITE LENGTH returns the maximum possible number of bytes written in a single TWI frame.
• MAX READ LENGTH returns the maximum possible number of bytes read in a single TWI frame.
• PORT COUNT returns the total number of TWI ports on this SES target.
• MAX RATE returns the maximum supported TWI clock speed supported in a TWIPT Configuration Send
Diagnostic frame.
• MAX RESET returns the maximum length of a RESET pulse supported in a TWIPT Configuration Send
Diagnostic frame.
• MAX TIMEOUT returns the maximum timeout value supported in a TWIPT Configuration Send Diagnostic
frame.
• PORT n RATE reports the current TWI clock rate for port n.
Byte\Bit 7 6 5 4 3 2 1 0
1 RESERVED
2 (MSB)
PAGE LENGTH (16*8*n)
3 (LSB)
5 (MSB) (LSB)
TMF Tag0
6
7 (MSB) (LSB)
TMF Tag1
8
9 (MSB) (LSB)
The SAS Buffering Initiator Retry Timeout
10
12 RESERVED
13 RESERVED
14 RESERVED
15 RESERVED
SATA
Buffering
16 RESERVED RESERVED Link Reset
Error PHY
Enable
17 RESERVED
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
18 RESERVED
19 RESERVED
20 RESERVED
21 RESERVED
22 RESERVED
23 RESERVED
24 RESERVED
25 RESERVED
26 RESERVED
27 RESERVED
28 RESERVED
29 RESERVED
30 (MSB)
SSSF PHY 0 CONFIGURATION DESCRIPTOR
37 (LSB)
...
30+8*n (MSB)
SSSF PHY n–1 CONFIGURATION DESCRIPTOR
30+8*n+7 (LSB)
Global setting Valid: This bit indicates whether the global setting is valid. If it is valid, the global settings are applied
to each PHY specified by each SSSF PHY configuration descriptor.
Per phy setting Valid: This bit indicates whether the per PHY setting is valid. If it is valid, each per PHY setting is
applied to the PHY specified by the SSSF PHY configuration descriptor.
For other fields, refer to the related field in Table 8-9. They have the same usage.
Table 14-92. SSSF PHY Configuration Descriptor Format
Byte\Bit 7 6 5 4 3 2 1 0
Take effect
0 immediatel PHY ID
y
SAS/SATA
1 RESERVED Uncorrectable ECC control Buffering
Enable
...........continued
Byte\Bit 7 6 5 4 3 2 1 0
12G
6G/3G SAS
SAS Connectio
Connection Buffering SAS SAS
Buffering n
2 RESERVED Manageme OAF Early Buffering Buffering
Snoop Managem
nt Accept 6G 3G
TMF ent
Enable enable
Enable
3 RESERVED
SATA SATA
5 RESERVED Buffering Buffering
6G 3G
6 RESERVED
7 RESERVED
PHY_ID: This field specifies the PHY ID to be configured with the global and per PHY SSSF PHY configurations.
Uncorrectable ECC control: This field controls the SXP’s handling of the PHY with an uncorrectable error in the
buffer RAM:
• 0x0: General PHY configuration. The configuration fields are valid for the special PHY ID;
• 0x1: Scan the corresponding PHY’s buffer RAM. This can be used when the corresponding PHY’s buffer RAM
has detected an uncorrectable ECC error. The HOST can use the SES SSSF page (See Table 14-94) to poll the
scan result. The other configuration fields are invalid when this control field is set to 0x1;
• 0x2: Clear the uncorrectable SSSF ECC error flag on the corresponding PHY. This can be used when the
corresponding PHY’s buffer ram has detected an uncorrectable ECC error. The other configuration fields are
invalid when this control field is set to 0x2;
• 0x3: Reset EMIP for the corresponding PHY. This can be used when the corresponding PHY’s EMIP has
detected an uncorrectable ECC error. The other configuration fields are invalid since this control field is set to
0x3;
• 0x4: Clear the SXL uncorrectable ECC error flag on the corresponding PHY. This can be used when the
corresponding PHY’s SXL has detected an uncorrectable ECC error. The other configuration fields are invalid
since this control field is set to 0x4;
• 0x5-0x7: Reserved.;
Take effect immediately: This bit indicates whether to take the SSSF PHY configurations in the SES page effect
immediately on this PHY. If this bit in the descriptor is ‘1’, firmware automatically triggers a link reset on this PHY.
Otherwise, the SSSF PHY configurations in the SES page will be not taken effect until a PHY NOT READY event
is detected on this phy. Please note that in topologies where expander attached drives are part of a RAID volume,
dynamically enabling/disabling buffering will cause link reset which could lead to loss of RAID volumes. Hence, it is
not recommended to dynamically enable or disable buffering in such scenarios.
For other fields, refer to the related field. They have the same usage.
Value
Defau
Byte \ Bit 7 6 5 4 3 2 1 0 Rang
lt
e
Async
Break Reply Recover Invert Invert No Disable Bit
Reserved 0x00
Enable y TX RX SATA PHY Fields
Disable
PHY
rate
0x0230 – {1, 2,
0x025F 3, 4,
(L_PHY0 6,
Info) 7,8,10
Max SATA Rate PHY Rate 0x4F ,11,12
,14,15
} Max
SATA
rate
{0, 1,
2, 4}
G4
G4 G3 G2 G2 G1 G1
WITHO
WITH G3 WITH SSC WITHO WITH WITHO WITH WITHO 0xFF
UT
SSC UT SSC SSC UT SSC SSC UT SSC
SSC
RX 3
TX 3 ID
ID
TX_ID_FRAME_GAP FRAME 0xC0
FRAM
S
ES
TX SSC
Down-
Reserved 0x00
Spread
Type
0x00–
STP Bridge AWT MSB 0x00
0xFF
0x00–
STP Bridge AWT LSB 0x00
0xFF
0x00
Connection Policing Timer 0x00 –
0xFF
STP/S
Disable AS
Power Advanc ALIG
Broad-cast
Disable e SATA Reserve STP Align N
change SAS Align Density 0x00
Support Sync d Density densit
Suppress
ed Forwar y
d {0, 1,
2}
Reserved 0x00
...........continued
Value
Defau
Byte \ Bit 7 6 5 4 3 2 1 0 Rang
lt
e
LOS CTRL
Reserved LOS REFAMP SAS[4:0] 0x12
SAS
RX
PEAK LOS REFAMP SATA[4:0]
Reserv LOS CTRL
ENB 0x09
ed SATA 0x09
SATA
6G
RX RX
PEAK PEAK
ENB ENB Reserved RX PEAK SAS[2:0] 0x01
SAS1 SAS1
3G 1G5
RX RX
PEAK PEAK
ENB ENB RX PEAK SATA 6G[5:3] RX PEAK SATA 1G5 3G[2:0] 0x29
SATA SATA
3G 1G5
T PISO
PRE2
SEL AMPLITUDE SAS 1G5 [6:0] 0x36
SAS
1G5
T PISO
PRE2
AMPLITUDE SAS 3G [6:0] 0x36
SEL
SAS 3G
T PISO
PRE2
SEL AMPLITUDE SAS2 6G [6:0] 0x40
SAS2
6G
T PISO
PRE2
SEL AMPLITUDE SATA 1G5 [6:0] 0x1C
SATA
1G5
T PISO
PRE2
SEL AMPLITUDE SATA 3G [6:0] 0x1C
SATA
3G
T PISO
PRE2
SEL AMPLITUDE SATA 6G [6:0] 0x30
SATA
6G
...........continued
Value
Defau
Byte \ Bit 7 6 5 4 3 2 1 0 Rang
lt
e
T PISO
EDGE
T PISO EDGE
DELAY
DELAY SEL POSTCURSOR SAS 1G5 [5:0] 0xC0
SEL
SAS 1G5
SATA
1G5
T PISO
EDGE
T PISO EDGE
DELAY
DELAY SEL POSTCURSOR SAS 3G [5:0] 0xC0
SEL
SAS 3G
SATA
3G
T PISO
EDGE
T PISO EDGE
DELAY
DELAY SEL POSTCURSOR SAS2 6G [5:0] 0x0D
SEL
SAS2 6G
SATA
6G
T PISO PRE2
Reserve
MODE1 SAS2 PRECURSOR SAS2 6G [5:0] 0x40
d
6G
T PISO PRE2
Reserve
MODE1 SATA PRECURSOR SATA 6G[5:0] 0x40
d
6G
SAS12G
PGA TX Cx BCT Reserve TX BCT EN SAS3
Reserved 0x44
BOOST PRST DFLT d 12G
EN
...........continued
Value
Defau
Byte \ Bit 7 6 5 4 3 2 1 0 Rang
lt
e
SAS/
SATA
Reserved 0x00
Buffering
Enable
SAS
SAS 12G
Bufferi 6G/3G
Buffering Connection SAS
ng SAS
Reserve Connection OAF Managemen Buffering
Snoop Buffering 0x02
d Management Early t
TMF 6G 3G
Accept
Enabl Enable Enable
Enable
e
Reserved 0x00
SATA
SATA
Reserved Reserved Buffering 0x02
Buffering 6G
3G
Reserved 0x00
Reserved 0x00
Reserve
DP FFE M PRELOAD SAS3 12G 0x1F
d
0x0260 – Same
0x028F as
Structure content is the same as that for L_PHY0 Info
(L_PHY1 L_PH
Info) Y0
0x0290 –
0x0EBF
(L_PHY3 – … …
L_PHY66
Info)
0x0EC0 – Same
0x0EEF as
Structure content is the same as that for L_PHY0 Info
(L_PHY67 L_PH
Info) Y0
0x0EF0 –
Reserved 0x00
0x0112F
...........continued
Value
Defau
Byte \ Bit 7 6 5 4 3 2 1 0 Rang
lt
e
PHY
reset PHY reset in progress timeout
0x020C timeout 0x0F
handling 0x0F
Enable
Byte\Bit 7 6 5 4 3 2 1 0
1 RESERVED
2
PAGE LENGTH (8*phy count)
3
7 6 5 4 3 2 1 0
RESERVE
0 PHY ID
D
SSSF split
5 RESERVED
mode
PHY_ID: This field specifies the PHY ID of the SSSF PHY status Descriptor.
SSPL Link rate: This field indicates the PHY link rate in SSPL layer.
SXL Link rate: This field indicates the PHY link rate in SXL layer.
PHY working mode: This field indicates the current working mode of this PHY:
• 0x0: IDLE/Bypass mode;
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved
2 (MSB)
Page Length (8)
3 (LSB)
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
6 Reserved
10 Parameters
11
11
SET START Set the log read start offset, it will be increased
OFFSET automatically when the log is retrieved by the “Fatal
Error Event Log Retrieve Page” until it’s at the end of
log partition. If it’s at the end of log section, it will be
Start Offset
wrapped to 0 when the host retrieves the log the next
1 (32 bit, 4-byte time.
alignment)
The host should set the START OFFSET if the current
Start Offset in firmware is unexpected. The START
OFFSET will be returned by “Fatal Error Event Log
Retrieve Page”.
CLEAR LOG Clear “Fatal Error Event Log” section, the partition will
be erased. The host may clear the fatal error log once
the log has been retrieved. This operation is destructive.
2 N/A
Before the log is cleared, the host should save the log
into its storage soace. After this operation the log in
flash will be erased permanently.
Note that reading the fatal error event log through the Fatal Error Event Log Retrieval Page is non-destructive.
The host needs to make sure to store this information after retrieval and before the log is cleared. Some events
associated with retrieving the log may themselves be included in the log information.
Table 14-97. Fatal Error Event Log Retrieval Page Format
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved Dirty
2 (MSB)
Page Length (n–3)
3 (LSB)
4 (MSB)
Log Start Offset
7 (LSB)
8 (MSB)
Log Total Size
11 (LSB)
12
Reserved
19
20
Log Data
n
Control Page. Page length/buffer length mismatch. “Invalid Field in Parameter List”,
“Invalid Field in CDB”
Control Page. Invalid value on page (e. g. threshold out of “Invalid Field in Parameter List”
range).
Status Page. Database data was not initialized. “Internal Target Failure”
...........continued
File Name Visibility Description
The top-level interface provided by the STE consists of three functions; ste_parms_get, ste_create, and ste_init. This
follows the Microchip convention for threaded firmware.
The ste_parms_struct, defined in ste_parms. h, contains all parameters used to configure the STE firmware.
The function ste_parms_get allocates an instance of ste_parms_struct and initializes with default values. The same
instance of ste_parms_struct must be used in subsequent calls to ste_create and ste_init.
The ste_parms_struct has an embedded structure, ste_config_struct. The parameters in ste_config_struct must be
set by the user before calling ste_create, and must not be modified after the call.
Remaining parameters in ste_parms_struct (not ste_config_struct) must be set before the call to ste_init, and
must not be modified after the call. Note that some of these parameters must be copied from other components
xx_parms_struct.
Documentation of all parameters, including default values, is included in the documentation of the associated
structures.
The following table summarizes the preprocessor definitions that are used to control STE firmware compilation.
Table 14-100. STE Compilation Options
PMC_CSW_BIT_FIELD_ALLOC_L_TO_R STE firmware should assume left to right bit field allocation by the
compiler.
Must be defined, because there is no
PMC_CSW_BIT_FIELD_ALLOC_R_TO_L.
supported by the STE, and the parameter values supported for each command. This section should be used
alongside the SPC reference.
The PM73206_04 Firmware implements the following features of the protocol:
• Target Mode
• Single Logical Unit Number (LUN) support (zero)
• Full Task Management Model, SIMPLE task support
• Sense data reporting through auto-sense mechanism
• Configurable number of tracked initiators (tracking requires additional RAM for each initiator)
• Configurable number of tasks (each supported task has RAM requirements)
The following table summarizes the SCSI commands supported by the STE. For each command there is a summary
of the modes of the command that are supported, and an indication of whether the command is fully processed by
the STE, or if part of the processing must be performed by the EMA. The commands requiring processing by the
EMA are the “SES commands”.
Table 14-101. SCSI Command Summary
The STE terminates the SCSI command in all cases, even for the SES commands. The STE communicates with the
EMA using 14.3.5 SES Interface.
The STE firmware supports only a single data transfer for each Data In or Data Out command, except for the
Download Microcode and save mode of the WRITE BUFFER command (see the following section). The maximum
size of a single transfer is determined by the STE Maximum Data Size field defined in Init String.
For the Download Microcode and Save mode of the WRITE BUFFER command, the STE Maximum Data Size
parameter specifies the maximum size of each packet requested from the initiator.
For the Vendor Specific mode of the READ BUFFER and the WRITE BUFFER command, the Buffer ID field is
considered part of Buffer Offset field to make Buffer Offset field 4 bytes to provide access to entire MIPS address
space. Customer code may add the additional address validation per board memory condition, otherwise MIPS may
hits general exception and firmware crashes.
Customers must set the STE Maximum Data Size parameter to allow for the maximum SES page size transferred
to or from the host. Specifics of the support provided for each SCSI command are discussed under the sections that
follow.
14.3.2.1 INQUIRY
The following data pages are supported for the INQUIRY command:
• Standard Inquiry Data
• Device Identification VPD
• Extended Inquiry Data VPD
• Supported VPD Pages
The data used in all pages, except for Supported VPD Pages, are included in the ste_parms_struct, so the STE user
may modify. The STE user must follow the instructions in the ste_parms_struct documentation when modifying the
data.
Byte \ Bit 7 6 5 4 3 2 1 0
D_SEN
0x02 TST TMF_ONLY DPICZ GLTSD RLEC
SE
0x06
Obsolete
0x07
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
0x08
BUSY TIMEOUT PERIOD
0x09
0x08
EXTENDED SELF-TEST COMPLETION TIME
0x09
TST: This bit set to one specifies the logical unit maintains separate task sets for each I_T nexus. This bit cleared to
zero specifies that the logical unit maintains one task set for all I_T nexuses. This bit supports value 0. See the Table
407, [14].
QErr: The field specifies how the device server must handle other commands when one command is terminated with
a CHECK CONDITION status. See the Table 409, [14]. The field only supports zero.
TAS: The bit set to zero specifies that aborted commands must be terminated by the device server without any
response to the application client. The bit set to one specifies that commands aborted by the actions of an I_T nexus
other than the I_T nexus on which the command was received must be completed with TASK ABORTED status. The
bit only supports zero.
These bits and fields are not implemented.
• D_SENSE
• GLTSD
• RLEC
• QUEUE ALGORITHM MODIFIER
• NUAR
• RAC
• UA_INTLCK_CTRL
• SWAP
• ATO
• ATMPE
• TMF_ONLY
• DPICZ
• RWWP
• AUTOLOAD MODE
• BUSY TIMEOUT PERIOD
• EXTENDED SELF-TEST COMLETION TIME
Table 14-103. SAS Control Mode Parameter Defaults
Parameters Default
TST (Task Set Type) 0b00 (one task set for all initiators)
...........continued
Parameters Default
Byte \ Bit 7 6 5 4 3 2 1 0
Broadcast
Continue Ready LED
Asynchronous
0x02 Reserved AWT Meaning Protocol Identifier (0x6)
Event
(0x1) (0x0)
(0x0)
0x03 Reserved
0x04
I_T Nexus Loss Time
0x05
0x06
Initiator Response Timeout
0x07
0x08
Reject to open limit
0x09
0x0a~0x0f Reserved
Broadcast Asynchronous Event: This bit set to one specifies that the device server must enable the origination
of Broadcast (Asynchronous Event). This bit set to zero specifies that the device server must disable origination of
Broadcast (Asynchronous Event). It is set to default 0 in SDK. See the Table 208, [7].
Ready LED Meaning, Continue AWT, I_T Nexus Loss Time, Initiator Response Timeout, Reject to open limit:
These fields are not implemented.
Table 14-105. SAS Port Mode Parameter Defaults
Parameter Default
I_T Nexus Loss Time 0x0(timer must set it after SDK running)
Byte \ Bit 7 6 5 4 3 2 1 0
Transport
0x02 Reserved Layer Retries Protocol Identifier (0x6)
(0x0)
0x03 Reserved
0x04
0x05
Reserved
0x06
0x07
Transport Layer Retries: This bit set to one specifies that, for commands received in COMMAND frames with the
TLR CONTROL field, the target port must support transport layer retries for XFER_RDY and DATA frames for the
logical unit. The bit is not implemented. Refer the Table 207 in [7].
Byte \ Bit 7 6 5 4 3 2 1 0
0x02 Reserved
0x03 Reserved
0x04
Bus Inactivity Time Limit
0x05
0x06
Reserved
0x07
0x08
Maximum Connect Time Limit
0x09
0x0a
Maximum Burst Size (0x0009)
0x0b
0x0c Reserved
0x0d Reserved
0x0e
First Burst Size (0x0000)
0x0f
Bus Inactivity Time Limit: The field specifies the maximum time that the target port is permitted to maintain an
interconnect tenancy without data or information transfer. It is not supported in the SDK.
Maximum Connect Time Limit: The field specifies the maximum duration of a single interconnect tenancy. If the
connect time limit is exceeded, then the target port must conclude the interconnect tenancy. The virtual SSP Port in
the SDK supports the MCT timer.
Maximum Burst Size: The field indicates the maximum amount of data that the target port can transfer during a
single data transfer operation. It is not supported in the SDK.
Byte \ Bit 7 6 5 4 3 2 1 0
1 Reserved PCR SP
2 PC PAGE CODE
3 SUBPAGE CODE
4 (MSB)
Reserved
6 (LSB)
7 (MSB)
PARAMETER LIST LENGTH
8 (LSB)
9 CONTROL
Byte
Field Name Description
[Bit(s)]
0 OPERATION CODE 4C
1[2:7] Reserved
4:6 Reserved
PARAMETER LIST
7:8 Vendor Specific
LENGTH
9 CONTROL 00
LOG SELECT can configure the CDB to indicate special action with the parameter length.
The table lists the all applications for the bits: PCR, SP and DS and the parameter.
PC bit is omitted since the format_and_linking field is binary format in the log parameters.
DS (disable save) bit is in the log parameters such as log retrieval subpage or log filter subpage. It can affect the
CDB bit action.
Table 14-112. Relationship Layout for Last n Entries, Max Entries and STE Maximum Data Size
Last n entries Last n entries is Max entries is larger than max See case 1
larger than max data size
entries
Max entries is less than max data See case 2
size
Last n entries is less The Last n entries is larger than See case 3
than max entries max data size
Case 1: If last n entries is larger than max entries, last n entries will be modified to max entries. At this phase, if the
max entries data size is larger than one granularity, LOG SENSE reads the entries additional times until the firmware
reports an error with finishing to read all entries, the response buffer will be filled with the remaining entries and the
actual acquired entries following entries data in each buffer granularity.
Case 2: If last n entries is larger than max entries, last n entries will be modified to max entries. At this phase, if the
max entries data size is less than one granularity, LOG SENSE reads the entries one time, the response buffer will be
filled with the remaining entries and actual acquired entries following entries data.
Case 3: If last n entries is less than max entries, and if last n entries data size is larger than one granularity, LOG
SENSE reads the entries additional times until the firmware reports an error with finishing to read all entries. The
response buffer will be filled with the remaining entries and actual acquired entries following entries data in each
buffer granularity.
Case 4: If last n entries is less than max entries, and if last n entries data size is less than one granularity, LOG
SENSE reads the entries one time, the response buffer will be filled with the remaining entries and actual acquired
entries following entries data.
Table 14-113. Log Retrieval Format
Bit/Byte 7 6 5 4 3 2 1 0
2 (MSB)
PAGE LENGTH (n–3)
3 (LSB)
Note: Table 14-113 is same for main firmware log retrieval and EMIP firmware log retrieval.
Table 14-114. Log Retrieve Parameter Format
Bit/Byte 7 6 5 4 3 2 1 0
0 (MSB)
PARAMETER CODE
1 (LSB)
...........continued
Bit/Byte 7 6 5 4 3 2 1 0
3 PARAMETER LENGTH(n-3)
FORMAT AND LINKING: Only binary format are used and PC bit in LOG SELECT CDB will be omitted.
TMC, ETC, TSD, DU: These bits are not implemented and just fill zero.
Note: Table 14-114 is same for main firmware log retrieval and EMIP firmware log retrieval.
Table 14-115. EMM Event Log Format for Main Firmware Log Retrieve
Bit/Byte 7 6 5 4 3 2 1 0
0
LAST N LOG ENTRIES
1
2
Reserved
3
LAST N LOG ENTRIES: The field reflects how many log entries are requested. If last n entries is larger than max
entries or 0, last n entries will be modified to max entries.
Table 14-116. EMM Event Log Format for EMIP Firmware Log Retrieve
Bit/Byte 7 6 5 4 3 2 1 0
0
LAST N LOG ENTRIES
1
2 Logical PHY ID
3 Reserved
LAST N LOG ENTRIES: The field reflects how many log entries are requested. If last n entries is larger than max
entries or 0, last n entries will be modified to max entries.
Logical PHY ID: The field specifies the logical PHY ID to retrieve the EMIP firmware log on this PHY. The valid range
of logical PHY ID is zero to (logical PHY count-1). Each EMIP log select command can only retrieve the EMIP log for
a single PHY at a time.
Bite/ 7 6 5 4 3 2 1 0
Byte
...........continued
Bite/ 7 6 5 4 3 2 1 0
Byte
2 (MSB)
PAGE LENGTH(n-3)
3 (LSB)
Note: Table 14-117 is the same for the Main Firmware Log Filter and the EMIP Firmware Log Filter.
Table 14-118. Log Filter Parameter Format
Bit/Byte 7 6 5 4 3 2 1 0
0 (MSB)
PARAMETER CODE
1 (LSB)
… FILTER CONTROL
Note: Table 14-118 is the same for the Main Firmware Log Filter and the EMIP Firmware Log Filter.
Table 14-119. Log Filter Control Format for Main Firmware Log Filter
Bit/Byte 7 6 5 4 3 2 1 0
0 FILTER LEVEL
2
LOG FILTER DESCRIPTOR LIST(first)
14
2+(n-1)*13
LOG FILTER DESCRIPTOR LIST(last)
14+(n-1)*13
Table 14-120. Log Filter Control Format for EMIP Firmware Log Filter
Bit/Byte 7 6 5 4 3 2 1 0
0 Logical PHY ID
...........continued
Bit/Byte 7 6 5 4 3 2 1 0
2
LOG FILTER DESCRIPTOR LIST (first)
14
2+(n-1)*13
LOG FILTER DESCRIPTOR LIST (last)
14+(n-1)*13
Logical PHY ID: The field specifies the logical PHY ID to filter the EMIP firmware log on this PHY. The valid range
of logical PHY ID is zero to (logical PHY count-1). Each EMIP log select command can only filter the EMIP log for a
single PHY at a time
Table 14-121. Log Filter Descriptor Format for Main Firmware Log Filter
Bit/Byte 7 6 5 4 3 2 1 0
1
MASK
4
5
PATTERN
8
9
FILTER TYPE
12
Table 14-122. Log Filter Descriptor Format for EMIP Firmware Log Filter
Bit/Byte 7 6 5 4 3 2 1 0
1
MASK
4
5
MODE
8
9
Reserved
12
APPLICATION FILTER INDEX: This field is the index of the filter descriptor in this log select command and starts
from 0.
MASK: This field specifies the 32 bits EMIP event log mask to indicate which event EMIP firmware will do event
logging.
MODE: This field specifies the EMIP event mode. The EMIP event mode is defined as follows:
0x000000: EMIP IDLE mode;
0x000001: EMIP BCT mode;
0x000002: EMIP SAS buffering mode;
Bit/Byte 7 6 5 4 3 2 1 0
1 Reserved Obsolete SP
2 PC PAGE CODE
3 SUBPAGE CODE
4 Reserved
5 (MSB)
PARAMETER POINTER
6 (LSB)
7 (MSB)
ALLOCATION LENGTH
8 (LSB)
9 CONTROL
SP bit: LOG SENSE disables this bit, if SP is TRUE, the command will be terminated.
PC bit: Page control is omitted since the log parameters define the binary format.
PAGE CODE: Define 30h to support log retrieval and log filter subpages.
SUBPAGE CODE: Define 0x01 to log retrieval and 0x02 to log filter control.
PARAMETER POINTER: Only implement the value 0x0000; if not 0x0000, the command will be terminated.
ALLOCATION LENGTH: Specific defines.
[0:1] Remaining It reflects how many entries should be read again after one
LOG SENSE command, 0 means that all of the entries data are
Entries Num
finished to acquire.
[2:3] Really Acquired Entries It reflects how many entries have been read after one LOG
Num SENSE command.
[4:x] Entries Data Fill the real entries data, the data sequence is little endian.
SELFTEST 1
PF X (Don’t Care)
If the SELFTEST bit is not set, then STE will assume that an SES page download is being specified and validate the
CDB parameters according to the following table.
Table 14-127. SEND DIAGNOSTIC AND NOT SELFTEST
SELFTEST 0
PF 1
A valid request is translated into a request to the EMA for the corresponding function. If the PF is also set to zero
in this table configuration, firmware should ignore it and report error since the command has no significance, the
Firmware need the PF bit is set to 1.
ABORT TASK
QUERY TASK
ABORT TASK
The task manager must abort the specified command, if a task exists. Previously established conditions, including
mode parameters, reservations, and ACA must not be changed by the ABORT TASK function.
A response of FUNCTION COMPLETE indicates that the command was aborted or was not in the task set. In either
case, the SCSI target device must guarantee that no further requests or responses are sent from the command.
ABORT TASK SET
The task manager must abort all commands in the task set that were received on the specified I_T nexus.
Commands received on other I_T nexuses or in other task sets must not be aborted. This task management function
performed is equivalent to a series of ABORT TASK requests.
All pending status and sense data for the commands that were aborted must be cleared. Other previously established
conditions, including mode parameters, reservations, and ACA must not be changed by the ABORT TASK SET
function.
CLEAR TASK SET
This function must be supported by all logical units. The task manager must abort all commands in the task set. If
the TST field (SDK only set the 0b000) is set to 001b (that is, per I_T nexus) in the Control mode page, there is
one task set per I_T nexus. As a result, no other I_T nexuses are affected and CLEAR TASK SET is equivalent to
ABORT TASK SET. All pending status and sense data for the task set must be cleared. Other previously established
conditions, including mode parameters, reservations, and ACA must not be changed by the CLEAR TASK SET
function. All SCSI transport protocol standards must support the CLEAR TASK SET task management function.
LOGICAL UNIT RESET
This function must be supported by all logical units. Before returning a FUNCTION COMPLETE response, the logical
unit must perform the logical unit reset functions.
I_T NEXUS RESET
SCSI transport protocols support I_T NEXUS RESET and require logical units accessible through SCSI target ports
using such transport protocols to support I_T NEXUS RESET.
Each logical unit accessible through the SCSI target port must perform the I_T nexus loss functions for the I_T nexus
on which the function request was received, the SCSI target device must return a FUNCTION COMPLETE response
and must perform any additional functions specified by the SCSI transport protocol.
QUERY TASK
SCSI transport protocols support QUERY TASK and require logical units accessible through SCSI target ports using
such transport protocols to support QUERY TASK. The task manager in the specified logical unit must return a
service response set to FUNCTION SUCCEEDED if the specified command is present in the task set, or return
FUNCTION COMLETE if the specified command is not present in the task set.
QUERY TASK SET
SCSI transport protocols support QUERY TASK SET and require logical units accessible through SCSI target ports
using such transport protocols to support QUERY TASK SET.
The task manager in the specified logical unit must return a service response set to FUNCTION SUCCEEDED if any
command present in the task, or set to FUNCTION COMPLETE if no command present in the task set.
QUERY ASYNCHRONOUS EVENT
SCSI transport protocols support QUERY ASYNCHRONOUS EVENT. A SCSI transportprotocols supporting QUERY
ASYNCHRONOUS EVENT require logical units accessible through SCSI target ports using that transport protocol
to support QUERY ASYNCHRONOUS EVENT. The task manager in the specified logical unit must return a service
response set to FUNCTION SUCCEEDED if there is a unit attention condition for the specified I_T nexus, or set to
FUNCTION COMPLETE if there is no unit attention condition g for the specified I_T nexus.
Key Description
0x00 NO SENSE
0x06 0x29 0x03 BUS DEVICE RESET OCCURRED Task Management Logical Unit Reset
...........continued
Key ASC ASCQ Description Usage
0x06 0x2F 0x00 COMMAND CLEARED BY ANOTHER Task Management request from
INITIATOR another initiator caused task(s) to be
aborted
0x05 0x20 0x00 INVALID COMMAND OPERATION CODE Unsupported operation (command)
code
0x05 0x24 0x00 INVALID FIELD IN CDB All CDB field errors
0x05 0x26 0x00 INVALID FIELD IN PARAMETER LIST All errors in command data
0x05 0x25 0x00 LOGICAL UNIT NOT SUPPORTED Unsupported logical unit number (non-
zero)
0x06 0x29 0x00 POWER ON, RESET, OR BUS DEVICE First time STE hears from initiator
RESET OCCURRED
0x05 0x35 0x01 UNSUPPORTED ENCLOSURE FUNCTION The enclosure services process has
been asked to invoke an enclosure
services function that does not exist.
0x05 0x39 0x00 SAVING PARAMETERS NOT SUPPORTED MODE SENSE Page Control field
specifies saved values
0x0B 0x0E 0x01 INFORMATION UNIT TOO SHORT Set by transport, if applicable
0x0B 0x4B 0x02 TOO MUCH WRITE DATA Set by transport, if applicable
For sense data that is specified as “Set by transport, if applicable”, the user should consult the device-specific
firmware user manual to see if the sense data applies for that device.
...........continued
Message Structure SCSI Command
The ste_ses_msg_struct defines the common (first) fields of all SES messages. This includes an OSF message
header, a message identifier, and a sense data field. The sense data field must be set by the EMA to indicate the
result of the request. The message identifier uniquely identifies each command message sent to the EMA across the
SES interface.
In addition to the command messages, the SES interface includes an abort message (ste_ses_abort_msg_struct)
that may be used to cancel any of the command messages. The command message to be canceled is indicated by
the message identifier. Further instructions for use of the abort message are provided in the documentation of the
structure.
The STE sends only one message to the EMA at a time. The primary purpose of this single threading is to simplify
the processing for the EMA.
The STE is responsible for allocating and deallocating all buffers associated with SES messages.
0x10 Discover
...........continued
SMP Function Type SMP Function
Codes
0x10 Discover
0x7B Reserved
0xFB Reserved
Detailed descriptions of the standard SMP functions are available in [4] and Section 14.7.3 Standard SMP
Functions . The proprietary Microchip functions are described in Section 14.7.4 SMP Functions Specific to Microchip.
Zoning-related SMP functions are documented in [4] 10.4.3.
8 Reserved [0:6]
9 Number of PHY’s ()
10 Configuring [1]
10 CONFIGURES OTHERS[2]
10 SELF_CONFIGURING[5]
10 ZONE_CONFIGURING[6]
11 Reserved (0x00)
...........continued
Byte Description Notes
20 - 27 Reserved (0x00)
The following are sas2.x introduced fields and not including SAS1.1 response frame
28 - 29 Reserved (0x00)
36 Reserved [5]
36 ZONE LOCKED[4]
36 ZONING SUPPORTED[1]
36 ZONING ENABLED[0]
37 Reserved [5:7]
37 SAVING[4]
...........continued
Byte Description Notes
55 Reserved (0x00)
56 Reserved (0x00)[0:6]
56 REDUCED FUNCTIONALITY[7] .
64 - 65 LAST PHY EVENT LIST DESCRIPTOR INDEX It equals maximum number of PHY event list
descriptors instead last recording index due to
firmware implementation.
70 - 71 Reserved (0x00)
72 CRC (MSB)
73 CRC
74 CRC
75 CRC (LSB)
14.7.3.3 Discover
Table 14-135. Discover Response Frame Format
...........continued
Byte Description Notes
9 PHY Identifier
10 Reserved (0x00)
11 Reserved (0x00)
12 Reserved [7]
13 Reserved [4:7]
14 Reserved [4:7]
15 Reserved [5:6]
17 SAS Address
18 SAS Address
19 SAS Address
20 SAS Address
21 SAS Address
22 SAS Address
23 SAS Address
...........continued
Byte Description Notes
33 Reserved [7]
34-39 Reserved(0x00)
43 Reserved [4:6]
44 Reserved [4:7]
45 Reserved [7]
...........continued
Byte Description Notes
49 Reserved[4:7]
The following are sas2.x introduced fields and not including SAS1.1 response frame
60 ZONING ENABLED[0]
Reserved [3]
Reserved [7]
61 -62 Reserved(0x00)
63 ZONE GROUP
66 - 67 Reserved(0x00)
88 - 93 Reserved(0x00)
...........continued
Byte Description Notes
94 Reason[4:7]
95 Reserved[3:7]
Reserved [1]
Reserved [3]
Reserved [6:7]
97 - 98 Reserved(0x00)
Reserved [1]
Reserved [3]
Reserved [6:7]
101 - Reserved(0x00)
102
Reserved [3]
...........continued
Byte Description Notes
Reserved [6:7]
105-106 Reserved(0x00)
108 DEVICE SLOT NUMBER Indicates the number of the enclosure device slot to
which the phy provides access.
109 DEVICE SLOT GROUP NUMBER Not supported, Default value is 0xFF which indicates
that no enclosure number is available.
110-115 DEVICE SLOT GROUP OUTPUT CONNECTOR Not supported, Default value is 0x202020202020 (six
space characters) indicates that no device slot group
output connector information is available.
117 CRC
118 CRC
6 -8 Reserved (0x00)
9 PHY Identifier
10 Reserved (0x00)
12 Reserved (0x00)
13 Reserved (0x00)
14 Reserved (0x00)
...........continued
Byte Description Notes
15 Reserved (0x00)
44 – 47 Reserved (0x00)
...........continued
Byte Description Notes
64 Reserved (0x00)
68 CRC (MSB)
69 CRC
70 CRC
71 CRC (LSB)
If the PHY IDENTIFIER field specifies the PHY that is in the same wide port with the one being used for the SMP
connection and a PHY operation of HARD RESET is requested, the function result SMP FUNCTION FAILED is
returned in the response frame.
PHY Control adds support for ENABLE SAS SLUMBER, ENABLE SAS PARTIAL, ENABLE SATA SLUMBER,
ENABLE SATA PARTIAL bits.
6-7 Reserved(0x00)
8 Reserved[5-7]
9 Reserved
...........continued
Byte Description Notes
20 CRC (MSB)
21 CRC
22 CRC
23 CRC (LSB)
• Reads 19 necessary SSPL/SXL/ECMR registers for each PHY descriptor in a critical section. The time to
access all these registers is around 100us
• Adds additional checks for ensuring the PHY information data coherency in SMP DISCOVER Response fields.
• Records the timestamps when the egress request interrupt is received and checks the timestamps when
firmware populates each PHY descriptor. If the time consumed is longer than 1.5ms, firmware stops populating
the descriptors and transmits the filled descriptors in the response.
Byte Description
...........continued
Byte Description
2 Reserved
3 Reserved
4 Ignored
5 Ignored
6 Ignored
7 Ignored
8 Reserved
9 PHY Identifier
10 Ignored
11 Reserved
12 CRC (MSB)
13 CRC
14 CRC
15 CRC (LSB)
The format and source of information for the Microchip Report Status response frame are detailed in the following
table.
Table 14-140. Microchip Report Status Response Frame Format
Byte Description
3 Reserved
4 Ignored
5 Ignored
6 Ignored
7 Ignored
8 Reserved
9 PHY Identifier: Specifies the PHY number of the link configuration being requested.
10 Ignored
11 Reserved
...........continued
Byte Description
12 Reserved
13 Reserved
14 Reserved
15 Reserved
… ...
… ...
... ...
...........continued
Byte Description
657 CRC
658 CRC
Byte Description
2-3 Reserved
4-7 Ignored
9 Memory Address
10 Memory Address
12 - 14 Reserved
15 Read Length
16 CRC (MSB)
17 CRC
18 CRC
19 CRC (LSB)
The format and source of information for the Microchip Read response frame are detailed in the following table.
Table 14-142. Microchip Read Response Frame Format
3 Reserved (0x00)
4 Ignored
...........continued
Byte Description Notes
5 Ignored
6 Ignored
7 Ignored
12 Reserved
13 Reserved
14 Reserved
16
16 + Read Data[0](MSB)
Read
Length*4
Read Data[0]
Read Data[0]
Read Data[0](LSB)
N–2 CRC
N–1 CRC
N CRC (LSB)
Byte Description
2-3 Reserved
4-7 Ignored
...........continued
Byte Description
9 Memory Address
10 Memory Address
12 Write Operation
Valid values:
0x00 NOP
0x01 Write data.
0x04 Bitwise AND with write data
0x05 Bitwise OR with write data
0x06 Bitwise XOR with write data
13 - 14 Reserved
15 Write Length
16 –
Write Data[0]
Write Data[0]
Write Data[0](LSB)
N–2 CRC
N–1 CRC
N CRC (LSB)
The requisite registers are written accordingly. The format and source of information for the Microchip Write response
frame are detailed in the following table.
Table 14-144. Microchip Write Response Frame Format
Byte Description
3 Reserved
...........continued
Byte Description
4 CRC (MSB)
5 CRC
6 CRC
7 CRC (LSB)
Note that both Microchip-specific SMP Read and Write commands are intended for accessing 8-bit registers aligned
on 32-bit address boundaries, as most of the registers in the expander devices are. As such, there is no guarantee
that these commands properly access 32-bit registers.
Byte Description
2-8 Reserved
9 PHY ID
10-11 Reserved
12 CRC (MSB)
13 CRC
14 CRC
15 CRC (LSB)
The format and source of information for the Microchip DSQ Status response frame are detailed in the following
table.
Table 14-146. Microchip Disk Qualification Status Response Frame Format
Byte Description
2-8 Reserved
9 PHY ID
10-13 Reserved
14 Pass status (Disk attached to PHY has passed disk qualification or not)
...........continued
Byte Description
16 CRC (MSB)
17 CRC
18 CRC
19 CRC (LSB)
The SSP target transport layer state SSP DATA frames required to send The port layer is already designed to
machine (ST_T) sends each DATA the data requested to be transferred queue frames for transmission.
frame of a Send Data In Operation in a Send Data In command from
Should have no effect on the
to the Port Layer for transmission one the SCSI application are sent to the
initiator’s ability to receive the data
at a time, waiting for a Transmission Port Layer for transmission without
frames.
Status (frame transmitted) before waiting for the transmission status
sending the next frame. (frame transmitted) status point to be Simplifies the transport layer
returned after each one.
SMP Transmit Break The SMP Transmit Break command is not There is no transport layer
supported. code fast enough to use this
effectively.
Support for a Wide Port (multiple The Port Layer Port Control State machine Support for multiple PHYs is not
PHYs per port) for virtual SSP port only supports a single PHY (narrow port) for required for virtual SSP port.
virtual SSP port
SSP Data Frames are transmitted The Port Layer SSP Transmit state machine This is required for
as non-interlocked frames only transmits interlocked SSP frames the enclosure management
application.
14.11.1 IPv4
The TCP/IP stack supports IPv4 service with common network protocol such as UDP, TCP, ICMP, ARP, and so on
The TCP/IP stack is optional for building the firmware image. If the macro option “–DTCPIP_ENABLE” is defined in
the project file(.gpj), the TCP/IP stack will be built into the firmware image. If TCPIP_ENABLE is not defined, the
TCP/IP stack will not be built into the firmware image, and network applications such as the telnet server, HTTP
server and DHCP will not be supported.
14.11.2 DHCP
Firmware includes a DHCP client to retrieve IP network configuration information from the DHCP Server when the
IP stack module initializes. The network configuration information includes the IP address, netmasks and the default
gateway IP address.
DHCP client functionality can be configured through the initialization string field. When disabled, the IP stack module
loads the default IP network configuration information from the initialization string fields during module initialization.
Users can query the current IP network configuration information of the IP stack module through the UART console
command “ipconfig”. If DHCP is ON, issue the command “ipconfig dhcp 1” to retrieve the IP address from the DHCP
server.
14.11.3 Telnet/CMDSVR
Using the telnet interface, users can log in and then execute all available commands supported by the CMDSVR
such as memory read/write, SES page retrieval and SMP commands. The register GUI accesses the expander
product using the telnet interface in the same manner as the UART interface, which is the only interface for SXP3G
product.
The telnet server is designed to allow only one active telnet connection at any time to prevent command sequences
from different telnet terminals being issued at the same time because some command sequences (such as the. SMP
command) must be executed atomically. For the same reason, although CMDSVR is available in both telnet and
UART modes, it is not recommended that UART CMDSVR and telnet CMDSVR be used simultaneously.
14.11.4 HTTP
The HTTP server facilitates the access and management to an embedded system by providing a standard web
browser interface. Firmware provides an HTTP1.1-based HTTP server along with a basic web page example. Note,
there are no specific services provided to control expander operations through this web page; Optional headers in
HTTP message are also unsupported (e.g., If-Modified-Since). Users have the flexibility to enhance the web interface
to meet their specific needs.
If the macro option “–DTCPIP_ENABLE” and “–DHTTP_ENABLE” are defined in the project file(.gpj), the HTTP
server is built into the firmware image. By default, HTTP server is disabled in firmware.
The HTTP service is embedded with a simple file system in which the web page is stored. Microchip provides a
simple file system image as an example for you to build your own.
The web pages used to create example file system image are located in the “\tr_tcpip\httpdemo\romfs\demopage”
folder. The file system image is trrombld.h and txrom0.c located under “\SXP 12G\src\tcpip” directory.
The ROM FS Builder is provided as a GUI tool named trromfs.exe which can be found under
\trk_tcpip\httpdemo\romfs\. This tool allows you to build a file system image from the files under an “Input Directory”
(including its subdirectories). The generated image is a “.h” file and several “.c” files. The default “.h” file is trrombld.h
and will be output to “Output .h Directory”. Each page/segment of the file system is contained in a separate “.c” file
(txrom0.c, txrom1.c, txrom2.c, txrom3.c and txrom4 and so on) and will be output to “Output .c Directory”.
Notes
• Before using ROMFS Builder, make sure to clear the archive file attribute of “Input Directory” and all its
subfolders. For example, issue command “attrib –R -A c:\tmp” to changes the directory attributes.
• The default filename for home page is “index.htm”. Currently firmware doesn’t provide method to change the
default filename.
By default, the HTTP server only provides a simple web page as a demo. To use a new file system image, follow
these steps:
1. Prepare the file system image used by the HTTP server.
2. Run “\trk_tcpip\httpdemo\romfs\trromfs.exe”.
3. Set “Input Directory” to “\tr_tcpip\httpdemo\romfs\demopage”.
4. Set “Output .h Directory” and “Output .c Directory” to “\SXP 12G\src\tcpip”.
5. Click Build to generate the new image files. See “How to Create file system image for HTTP server” for detail.
6. Add all image “.c” files(txromN.c) into “\SXP 12G\tcpip\ txrom.c” as the following examples:
#include “txrom0.c”
#include “txrom1.c”
#include “txrom2.c”
#include “txrom3.c”
……
7. Open the top project file “\SXP 12G\build\sxp_pmc_evbd.gpj” or “\SXP 12G\build\sxp_wks_evbd.gpj” to build
firmware image.
14.11.5 Ethernet
The Ethernet driver runs in interrupt-based mode and provides frame management including frame receiving/
transmitting, collision detect and error recovery. The Ethernet driver also provides PHY layer configuration
functionality such as setting (or auto-negotiating) the link speed and Duplex mode.
Before the Ethernet driver starts, it should be assigned a unique 48-bit MAC address. MAC address can be
configured in initialization string
15.1.1 Introduction
Firmware manages the SAS 2.1 Mini SAS HD connector through connector management interfaces on the
PM2513/14/15/16/32-KIT SXP 24/36/48/68/36Sx12G Evaluation Kit [28]. The connector management interface is
defined in the following table and in SFF-8644.
Table 15-1. Connector Management Interface
IntL Active Low The IntL and ModPrs are routed to In the interrupt service routine, firmware
Module Interrupt the FPGA logic in the SXP 12G FVB identifies the Module interrupt reason by
board. The FPGA feeds the connector reading the cable management interface
interrupt to the SXP 12G INITB [0]. memory map through the TWI. Firmware
provides the callback for the action for the
The FPGA logic provides the interrupt
corresponding reason.
cause register for firmware identifying
ModPrs Active Low these connector events: If it is a connector connected event,
L Module Present - Module interrupt firmware reads the connector profile and
makes the PHY configuration change on
- Connector connected the corresponding PHY.
- Connector disconnected If it is a connector disconnected event,
firmware does cleanup on the previous PHY
settings.
SCL Two-wire Direct TWI bus connection to SXP or Firmware reads the connector profiles from
interface clock to TWI Expander that is connected to the management interface memory map
SXP. registers. See SAS-2.1
SDA Two-wire
interface data
Vact Active cable The FPGA logic provides firmware Firmware turns on Vact when detecting an
power control interface for turning on/off Vact. Active Cable connected.
Vman Management The FPGA logic provides firmware Firmware may turn off when entering low
interface power control interface for turning on/off power mode.
Vman.
PM805x devices can access the FPGA registers directly through Local bus (CS2) and PM804x devices can access
the FPGA registers through TWI port 1 with slave address 0x6A.
The FPGA logic in the SXP 24/36/48/68/36Sx12G Evaluation Kit [28] provides some support for SAS connector
management, including registers and interrupt assertion to MBIC.
The registers supported include interrupt registers, interrupt mask registers and status registers. For detailed register
information, refer to section 7.1 FPGA Memory Map of reference document [31].
FPGA registers can be accessed through the local bus for PM8056/55/54/53 devices and through the TWI bus for
PM8044/43 devices. By default, the SXP 12G uses TWI port 1 to access FPGA registers for the PM8044/43 devices.
If any FPGA interrupt register bit is asserted, FPGA logic sends an active-low signal to MBIC interrupt source
INTIB[0], which causes MBIC to assert an interrupt to MIPS, if this interrupt is enabled.
Expander Channel
0 3
1 2 6 7
2 4
3 1 7 2
4 5
5 1 6 2
6 6
7 1 5 2
8 2 0 7
...........continued
SAS Connector Bus Switch Logic DUT TWI
Expander Channel
9 1 4 2
10 2 5 7
11 1 3 2
12 2 4 7
13 1 2 2
14 2 3 7
15 1 0 2
16 2 2 7
Table 15-4. Map of TWI Ports and SAS Ports on the SXP 36-Port FVB
0 3 3
1 4 4
2 5 5
3 6 6
4 7 7
7 2 2
Managed connectors are configured through the initialization string (Refer to Table 8-17). By default, the SXP 12G
disables the cable management feature by setting the manage type to 0. To enable this feature, set the manage type
to 1.
After enabling the cable management feature, enter “cinfo connector_id” through the command server interface to
get the inserted cable information. The only parameter “connector_id” means the number of connectors the cable is
inserted into. For example, the command “cinfo 0” will output information for the first cable:
vend Reversion: 00
Log PHY in connector: 0x00 0x01 0x02 0x03
MTSB_REG_RSTB
All MTSBs are in SAS-3 power down
Analog MTSB MTSB_APB_RSTB All MTSBs sleep mode except for upstream MTSBs
...........continued
Modules Control Method WOL WOS
SSPL
PHY_CORE_PWRDOWN[68:0]
SXL PHY_XCBI_PWRDOWN[68:0] All PHYs Sleep All PHYs sleep except upstream PHYs
PACK
TWI
UART
GPIO
Watchdog
Timer
The following events wake up the SXP 12G expander from WOL/WOS sleep mode:
• For WOL, the Magic Packet arrives in the Ethernet MAC that generates NMI to the MIPS core, the processor
reloads its PC to the MIPS starting address and restarts the boot procedure.
• For WOS, a COMINIT primitive detected from any of the upstream PHYs that generate interrupts to wake up
the MIPS core and all hardware blocks in sleep mode are recovered to the normal state in the firmware interrupt
process routine. Afterward, firmware continues to run from the point it was before entering WOS.
The current SXP 12G SDK does not support enabling WOL and WOS at the same time. Specifically, if the SXP
12G enters sleep mode through the WOL sleep command, it can be woken up only by receiving a Magic Packet
in the Ethernet MAC port. If the SXP 12G enters WOS sleep mode, it can be woken up only by receiving COMINIT/
COMWAKE interrupts from upstream PHYs.
WOL and WOS have similar state transitions except for the state transition after being woken up. See the following
figure.
1 Sub-Enclosure 0x00
Identifier
Page Header
2-3 (MSB) 0x0006 The length of String Out data is 6
bytes.
Page Length (n-3)
(LSB)
...........continued
Component Name Bytes Field Name Value Notes
Note
Due to the maximum timeout value of the current application timer of 57266230us, the valid range for the WOL sleep
delay time is 0x0~0xDFB2
The Magic Packet (MP) consists of 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF followed by 16 repetitions of the 48-bit MAC
address. The Magic Packet is scanned only for the signature above – it does not pass through the full protocol stack
thus it does not need CPU assistance to decode the message – it is decoded by MAC hardware. The message is
usually sent by a program executed on another computer on the same local area network. It is also possible to initiate
the message from another network by using Subnet directed broadcasts or a WOL gateway service.
Sub-Enclosure
1 Identifier 0x00
Page Header
2-3 (MSB) 0x0006 The length of String Out data is 6 bytes.
Page Length (n-3)
(LSB)
Only until WOL is implemented and enabled, can it work with the correct WOL state transition.
Note: In general, COMINIT will be periodically sent from the peer PHY. Disable the COMINIT or COMWAKE interrupt
source from the MBIC to avoid MIPS being too busy to handle these events or to wake up MIPS if it enters sleep
mode again.
Sub-Enclosure
1 Identifier 0x00
Page Header
2-3 (MSB) 0x0006 The length of String Out data is 6 bytes.
Page Length (n-3)
(LSB)
Only when WOS is implemented and is enabled, can it work with the correct WOS state transition.
Table 15-9. SES String Out Page - (WOS Sleep Delay Time Set) Command
Sub-Enclosure
1 Identifier 0x00
Page Header
2-3 (MSB) 0x0006 The length of String Out data is 6 bytes.
Page Length (n-3)
(LSB)
ema_process_power_disable_pin_ Provides a mechanism for a user to add firmware code to operate the power
hook() disable pin.
sia_inquiry_req_msg_struct INQUIRY
sia_inquiry_rsp_msg_struct
...........continued
Message Interfaces SCSI Command
• SIA is responsible for handling service delivery or target failure errors with Task Management functions and for
handling automatic retries for the application layer depending on the error code in the response. The number of
retires is a configurable parameter that can be configured through the initialization string.
• SIA is enhanced to support configurable maximum outstanding SCSI related requests from DSQ, Command
Server and user specific threads. By default, the maximum outstanding request is 5 in the initialization string. It
is expected that the total outstanding requests from the application threads never exceeds the configured value,
or else a firmware assert will occur.
• The SAS low layer protocol (SASD module) is enhanced for simultaneous virtual SSP initiator and target
operation support.
16.2.1 Implementing a User Application Thread for Issuing SCSI Commands to the SCSI Target
• To utilize the SIA module to issue a SCSI command to a target, the user’s application needs:
• To have a data structure to maintain target_address, connection_rate, and request_id.
• A malloc data buffer for these types of Data In commands and for passing the data buffer to the SIA module, like
INQUIRY, REPORT LUNS, and so on.
• To fill in various command parameter fields.
• To pass the command request message with the appropriate message type to the SIA module, and to monitor
the response message from the SIA module.
• To handle response message per request_id and free data buffer if it has been malloced in request phase.
16.2.2 Command Line Interface for Issuing SCSI Commands to the SCSI Target
The SXP 12G firmware implements several SSP commands in the cmdsvr interface. These commands demonstrate
how to use the message interfaces in the SIA module to perform the SCSI transaction with the SCSI target into the
peer expander.
In SXP 12G SDK, the maximum outstanding requests number from cmdsvr to SIA has been hardcoded
as CMDSVR_SIA_MAX_SIMUL_SSP_REQ_NUM (default 0x02), and the maximum data buffer size has been
hardcoded as CMDSVR_MAX_DATA_MEM_BUF_SIZE (default 0x100).
• ssp addr_rate <dest_addr> <conn_rate 0x1~0xf>
Use this command to set the address of the peer expander and the connection rate between expanders. The
address and connection rates set by this command will be used for all commands issued until a new “ssp
addr_rate” command is executed. The range of conn_rate is:
– 0x8 = 12G
– 0x4 = 6G
– 0x2 = 3G
– Others = 1.5G
• ssp inquiry <alloc_len 0x0~0x100>
Use this command to send an INQUIRY command to peer expander. The range of alloc_len is from 0x0 to
0x100.
• ssp rep_luns <alloc_len 0x0~0x100>
Use this command to send a REPORT LUNS command to peer expander. The range of alloc_len is from 0x0 to
0x100.
• ssp send_diag <raw data Max. 14 bytes>
Use this command to send a SEND DIAGNOSTIC command to peer expander with Max 14 bytes payload data.
The data should use a “0x” to indicate it is HEX.
• ssp rcv_diag <page code> <alloc_len 0x0~0x100>
Use this command to send a RECEIVE DIAGNOSTIC RESULTS command to peer expander. The range of
alloc_len is from 0x0 to 0x100.
• ssp cmd <cdb 6/10/12 bytes>
Use this command to input cdb of a raw ssp command to peer expander. The cdb data is stored in a global
data structure and will not be sent out until an “ssp exec” command is executed. Since the command is
only for demo usage, currently only max 255 bytes is supported for both PARAMETER_LIST_LENGTH and
ALLOCATION_LENGTH field which means only the LSB byte of the two fields is valid and MSB bytes should be
0. Currently the raw command supports TEST UINT READY, INQUIRY, REPORT LUNS, SEND DIAGNOSTIC,
RECEIVE DIAGNOSTIC RESULTS, LOG SELECT, LOG SENSE, MODE SELECT(10) and MODE SENSE(10)
commands.
• ssp dout <raw data Max.255 bytes>
Use this command to input payload data of a raw ssp command to peer expander. User can execute this
command for multiple times to input max 255 bytes raw data. The payload data is stored in a global data
structure and will not be sent out until an “ssp exec” command is executed. The data should use a “0x” to
indicate it is HEX.
• ssp exec
Use this command to send out the raw command with cdb input by “ssp cmd” and payload by “ssp dout”.
Function Description
emip_sssf_ecc_scan
The emip_sssf_ecc_scan() is used to scan the SSSF buffer RAM. The SXP firmware writes the specified pattern
into the RAM and reads it back. The uncorrectable ECC error indicator will be checked to see if the read operation
encountered a failure. If the read operation passes, the firmware will compare the read value to the write pattern to
check for consistency. If an uncorrectable ECC error occurs the function will return FALSE.
Outputs None
Failure = FALSE
• For local bus interface (PM805x devices only), ECC is enabled individually for each memory bank (chip select).
– Specifically, for CS0, a hardware bootstrap pin is implemented to enable/disable ECC of parallel boot flash
after power on/reset, which means we support boot from parallel flash with ECC enabled or ECC disabled.
– ECC is disabled by default for other memory banks (CS1, CS2, CS3). ECC for CS1 can be enabled by
setting the corresponding parameter in firmware initialization string. If a memory bank has been used for an
External SRAM, ECC for this memory bank should never be enabled.
– ECC for SPI flash memory is not supported.
A non-correctable ECC error will cause NMI, and a correctable ECC error will only generate a normal
interrupt. A parity error from DSPRAM or Cache will cause a MIPS exception.
0x0 Disabled
Critical Error Fatal error, such as memory Logged to RAM. HW: Memory Corruption, WDG
corruption. This results in the Timeout
(0x1, Highest) When fatal error
firmware halting. Need storage
happens, flushes all the FW: Failed to allocate resource
system level operations to recover
logs in RAM to flash
this kind of error. Asserted in corner case.
memory.
Error Non-Fatal error for the HW/FW Logged to RAM FW: SAS/SCSI Stack based
module. After this error occurs on PACK
(0x2, High)
some HW/FW modules may not
FW: SMP Initiator and TOPD
function well, but the SXP core
Failure
functions still work. The recovery
operation is in the SXP sub- FW: DSQ/IPC
system level.
HW: MABC/SSPL/SXL/ECMR/
PACK ERROR
HW: TWI/MAC
INFO Log for information Logged to RAM FW/HW: BPPFW: TOPD Start/
Stop Event
(0x4, Low)
Reserved (0x6~0xF)
Byte\Bit 7 6 5 4 3 2 1
2
FILTER DESCRIPTOR LIST (first)
14
...........continued
Byte\Bit 7 6 5 4 3 2 1
2+(n-1)*13
FILTER DESCRIPTOR LIST (last)
15+(n-1)*13
Byte\Bit 7 6 5 4 3 2 1
1
MASK
4
5
PATTERN
8
9
Reserved
10
12 FILTER TYPE
Name Description/Value
Global filter level controls whether to record the log when the filter is
GLOBAL FILTER LEVEL not in the list or with the type “don’t use”. See Table 17-2.
FILTER COUNT The filter count that needs to be configured. Maximum is 16.
For convenience, all the logs divided into 16 types. Currently the
assigned application filter indexes are listed here by default. 0:
ISTR (Module ID: 0x001F) 1: SAS (Module ID: 0x001A)2: SPS_CFG
APPLICATION FILTER INDEX (Module ID: 0x0038) 3: SCFG_EXP_STAT (Module ID: 0x0063)
Filter severity level for each filter controls whether to record the log if
FILTER Severity LEVEL the filter type is set to Filter IN. See Table 17-2.
...........continued
Name Description/Value
For each module there is a filter pattern. The value is defined in the following table.
Table 17-6. Module Pattern ID and Name Mapping
Default in Initialization
Module ID Module Name String
0x10 OSF
0x15 STE
0x1D SPIN UP
0x31 SES
0x36 SMP
0x5B M34KHAL
...........continued
Default in Initialization
Module ID Module Name String
00h Reserved NO
Expander route table is full. The expander device was not able to add the indicated
03h YES
SAS address to the expander route table.
Expander device is out of resources (e.g., it discovered too many SAS addresses
04h while performing the discovery process through a subtractive port). This does not NO
affect the expander route table.
...........continued
Code Description FW Logged
All PHYs in the expander port containing the indicated PHY lost DWord
21h NO
synchronization
Connection request failed: I_T nexus loss occurred (e.g., OPEN_REJECT (NO
44h DESTINATION) for longer than the time specified by the STP SMP I_T NEXUS LOSS YES
TIME field in the CONFIGURE GENERAL function
46h Connection established: SMP response frame had a CRC error YES
During an SMP connection, there was no SMP response frame within the maximum
61h YES
SMP connection time
81h to 9Fh Reserved for status reported by the SMP transport layer NO
A2h SMP response frame contains field(s) with unsupported values YES
SMP response frame contains results inconsistent with other SMP response frames
A3h (for example, the DISCOVER response ATTACHED SAS ADDRESS field does not NO
contain the SAS address the expander device expected)
...........continued
Code Description FW Logged
The SAS ADDRESS field contains the SAS address of a self-configuring expander
device that returned a REPORT GENERAL response with the CONFIGURING bit set
to one, the SELF CONFIGURING bit set to zero, and the ZONE CONFIGURING bit
A4h YES
set to zero (e.g., compliant with a previous version of this standard). Accesses to SAS
addresses two or more levels beyond this expander device may not succeed until the
indicated expander device completes configuration. This is not necessarily an error.
The SAS ADDRESS field contains the SAS address of a self-configuring expander
device that returned a REPORT GENERAL response with the SELF CONFIGURING
A5h bit set to one. Accesses to SAS addresses two or more levels beyond this expander YES
device may not succeed until the indicated expander device completes configuration.
This is not necessarily an error.
The SAS ADDRESS field contains the SAS address of a self-configuring expander
device that returned a REPORT GENERAL response with the ZONE CONFIGURING
A6h bit set to one. Accesses to SAS addresses two or more levels beyond this expander YES
device may not succeed until the indicated expander device completes configuration.
This is not necessarily an error.
A7h to BFh Reserved for status reported by the management application layer NO
Other status
1 Reserved
2
SAS ADDRESS
3
The Error Codes are defined in each module’s include file, and are created by ORing a 12 bit Error ID with the
Module ID. The Error ID portion is usually unique within the module, but is not necessarily unique across the system.
This scheme effectively assigns 4096 Error Codes to each of 512K modules. The Error Codes in each module start at
PMCFW_ERR_BASE_xxx, where ‘xxx’ is the module name.
The following example shows how error codes are defined.
#define STE_ERR_FAIL (PMCFW_ERR_BASE_STE | 0x01)
#define UART_STAT_ERR_PARITY (PMCFW_ERR_BASE_UART | 0x02)
A special Error Code, PMC_SUCCESS, is defined as 0x0000 in PMCFW_ERR. H. PMC_SUCCESS may be used by
any module to indicate that no problems have been encountered.
Handler. Under some conditions, error handling for NMI may be unreliable since the hardware to run the code
itself maybe in an error state, e.g., SPRAM Uncorrectable ECC, Memory Controller Uncorrectable ECC and
MBIC Error.
• General Exception/TLB Exception/DSPRAM Error. By default, the SXP 12G firmware implements callback which
adds a log entry, flushes logs and dumps GPR registers and stack and activates thread information in flash
memory, and then enters Customer Fatal Error Handler finally.
• PMCFW_ASSERT. The SXP 12G firmware adds a log entry, flushes logs, dumps stack, activates thread
information into flash, and then enters a minimal firmware debugging mode.
• Watchdog Timeout. The SXP 12G firmware adds a log entry, flushes logs, dumps stack, activates thread
information into flash, and then enters the Customer Fatal Error Handler.
Figure 17-1. Fatal Error Dump Flow
The format of information dumped into flash is defined by the data structure sxp_dump_info_hdr_struct, which is
located in sxp12g/inc/sxp_fatal_err.h.
Table 17-9. SXP Dump Header Definition
Member Description
...........continued
Member Description
Section_cnt The block number followed from log_offset to the last block. In this version it’s 6.
Firmware_rev The firmware version with which the fatal error event log is dumped to the flash.
Log_offset Offset address of the log dump block in partition. This field is 0 if Log dumping failed.
Log_len Length of the log block. This field is 0 if Log dumping failed.
Reg_offset Offset address of the Register dump block in partition. GPR is dumped only for General
Exception, TLB Exception and DSPRAM error. This field is 0 if register dumping failed.
Reg_len Length of the Register dump block. This field is 0 if Log dumping failed.
Stack_offset Offset address of the System Stack dump block in partition. This field is 0 if System Stack
dumping failed.
Stack_len Length of the System Stack dump block. This field is 0 if System Stack dumping failed.
Act_thr_ctl_blk_offset Offset address of the Active Thread Control Struct dump block in partition. This field is 0 if
currently no Active Thread, or the Active Thread Control Struct dumping failed.
Act_thr_ctl_blk_len Length of the Active Thread Control Struct dump block. This field is 0 if currently no Active
Thread or the Active Thread Control Struct dumping failed.
Act_thr_stack_offset Offset address of the Active Thread Stack dump block. This field is 0 if currently no Active
Thread, or the Active Thread Stack dumping failed.
Act_thr_stack_len Length of the Active Thread Stack dump block. This field is 0 if currently no Active Thread
or the Active Thread Stack dumping failed.
Thread_offset Offset address of the All Thread Information block. This field is 0 if currently All Thread
Information is empty or the All Thread Information dumping failed.
Thread_len Length of the All Thread Information block. This field is 0 if currently All Thread
Information is empty or the All Thread Information dumping failed.
Timestamp The timestamp of the fatal error log is dumped. This is for user to check whether there is
a new fatal error log or old fatal error log that was not erased.
hdr_crc The dump header CRC32 checksum. Firmware uses this value to check whether the fatal
error log is valid.
The following table illustrates the layout of the dump information in the flash NV_Log partition.
Table 17-10. SXP Dump Info Layout
Address 00 01 02 03 04 05 06 07 Note
NV_Log
Magic String (DUMPINFO)
Base
Dump Section
0x08 Reserved firmware_rev
Reason Count
0x40
Reserved
0x60
0x68 TimeStamp
Restricted Area
Restricted Area
Registers Array
EPC, GP1~GP31
NV_Log Base + reg_offset to NV_Log Base + reg_offset + reg_len
Restricted Area
Restricted Area
Restricted Area
Thread Stack
Size = thread stack
NV_Log Base + act_thr_stack_offset to NV_Log Base + act_thr_stack_offset + size
act_thr_stack_len
...........continued
Address 00 01 02 03 04 05 06 07 Note
~ NV_Log
Blank
End
17.6.1.1 Interfaces
Either the UART or the TWI port can be the interface for incoming commands. The field “Non-threadx CMDSVR
Interface” in the initialization string specifies the interface. If the field is set to UART, the settings for the UART ID
and baud rate, are same as the settings for CMDSVR. If the field is set to TWI, the fields Non-threadx CMDSVR TWI
Port ID and Non-threadx CMDSVR TWI Slave Address in the initialization string specify the TWI Port ID and TWI
Slave Address. If a fatal error happens before firmware processes the initialization string, the “Non-threadx CMDSVR
Interface” will be set to UART with UART ID#0, Baud Rate 115200, 8 Data Bits, No Parity, 1 Stop Bit , and No Flow
Control.
If the “Non-threadx CMDSVR Interface” is set to TWI, the supported commands are:
• rd_32
• rd_log
• emip
• wr_32 (no response for this command)
• reset (no response for this command)
The command and response formats are defined as follows:
Table 17-11. TWI Interface rd_log Command
Byte \ Bit 7 6 5 4 3 2 1 0
Byte \ Bit 7 6 5 4 3 2 1 0
0x01 …
0x02 …
0x05 …
0x06 …
Byte \ Bit 7 6 5 4 3 2 1 0
0x02-0x03 …
0x06-0x07 …
Byte \ Bit 7 6 5 4 3 2 1 0
0x00 Data0
… …
...........continued
Byte \ Bit 7 6 5 4 3 2 1 0
Data 4N-1
4N-1
(N is the num of 32 bit words)
Byte \ Bit 7 6 5 4 3 2 1 0
0x01 Emip id
Byte \ Bit 7 6 5 4 3 2 1 0
… …
Byte \ Bit 7 6 5 4 3 2 1 0
0x02-0x03 …
0x06-0x07 …
Byte \ Bit 7 6 5 4 3 2 1 0
Note that the standard assert()halts the code operation, which in turn causes the watch dog timer to activate.
The standard assert()also outputs to stdout (which does not exist without EJTAG) and bloats the code with the
inclusion of the large stdio library.
You should use the PMCFW_ASSERT macro rather than using the assert() function directly. This allows the
possibility of excluding assert() from the code if inclusion of the large stdio library becomes a problem.
The PMCFW_ASSERT macro is defined as follows:
Macro:
#define PMCFW_ASSERT(condition, error_code) \ {if (!(condition))
{pmcfw_assert_function(error_code, __FILE__, __LINE__);}}
The pmcfw_assert_function() is a hook defined by you. For example, you can make pmcfw_assert_function() a
simple wrapper around the assert() function. Any PMCFW_ASSERT operations cause the process to be halted; the
assert is output to stdio.
Another example of the pmcfw_assert_function() may exclude the use of assert() and perform the following fatal error
handling:
• Log the error code to the application log.
• Execute any user-defined events (flash LEDs, output message to UART, and so on).
• Dump log, system stack into flash if nv-log save to flash is enabled, then enter Firmware Minimal Mode.
18.1 twimon
This example shows a TWI transport mechanism that provides access to memory-mapped resources through the
TWI slave interface. Through this protocol, a TWI master can perform memory read or write operations to resources
on the TWI slave. The protocol has three operations: Read, Write, and NOOP. Callbacks for Read and Write events
are provided for you to customize the behavior of the interface.
Read and Write transactions transition through START, MIDDLE, and END states. A START state transaction
specifies the address used for a current and subsequent read operations and for subsequent write transactions.
Addresses are automatically incremented on subsequent MIDDLE and END frames.
This implementation of the TWI slave does not strictly enforce START->MIDDLE->END state transitions by the
master.
This example now includes CRC8 protection and will perform retries on CRC and response time related failures. This
example provides a baseline example for how to use the TWI Slave interface on the device. Additional fault tolerant
code should be implemented around this example’s code base to harden the system against TWI bus errors and
timeouts.
This example application program uses the protocol defined in twimon.c and twimon.h to demonstrate TWI Slave
operations using one port as the master and a second port as the slave.
18.2.1 Implementation
The corresponding project file is
fwcs\SXP 12G\build\sxp_wks_evbd.gpj
The main() entry point is located in fwcs\SXP 12G\src\sxp\sxp.c. The following provides a high-level
description of the steps involved in generating the example application:
1. Initialize the basic TWI subsystem and SEEPROM driver to allow access to the SEEPROM prior to creating
the threads.
2. Initialize the basic OSF functions: application log and system timer. Also enable application logging from the
initialization string (istr) module.
3. Read the initialization string from flash and, if enabled, from the SEEPROM. Configure the hardware and
firmware settings accordingly.
4. If any errors are detected during the reading of the initialization string (e.g. values out of range), the following
actions are taken:
– The problem is recorded in the application log
– The firmware limits the initialization process to the creation of a small subset of resources to allow you to
have read access to the application log and to download a new initialization string to either the flash or
the SEEPROM. This involves the following steps:
– Initialize the OSF module
– Set up the MBIC interrupt controller
– Initialize the TWI port that is connected to the SEEPROM (Port #0)
– Create the command server thread, which controls UART communications.
– Set the on-board MIPSRDY LED to toggle every 200 ms to signal that a problem was detected. At this
point you can extract the application log to find the cause of the problem, re-generate the initialization
string and download it into the flash or SEEPROM through the UART interface.
– Start the timer and pass control to the ThreadX scheduler.
5. If no errors are detected during the reading of the initialization string, the full set of threads is created. These
are the steps:
– Initialize the SAS (SAS transport layer), SES (SES pages), SMP (SMP target and initiator), PORTMGR
(Port Event Manager, Topology Discovery, and Disk Spin-up), and STE (SCSI Terminal Emulation),
SGPIO (LED control through SGPIO), CMDSVR (Command server through UART), DBS (Database,
mainly used for SES pages), EMA (Example EMA application for the SXP Evaluation Kit) and WDG
(Watchdog control) modules. EMA thread will be discussed in some detail here:
– Initialize the OSF module
– Initialize the TWI ports
– Overwrite default module parameters
– Assign twelve threads with proper priority scheme:
– Initialize SXP 12G device HW drivers (ECMR, LOGRT, SSPL, SXL, and so on)
– Set up the MBIC interrupt controller
– Set the on-board MIPSRDY LED to toggle every 1 sec to signal that the system is operating as expected.
6. Start the timer and pass control to the ThreadX scheduler.
W in2K/XP + HBA
SEP EVB
Firmware defines boundary of these RAMs in sxp_common_base.ld and defines size of RAM for system stack, heap,
free_memory (OSF resource) in sxp_evbd_ram.ld and sxp_evbd_rom.ld. You need to increase the size of those
sections based on real situations, e.g., to support more outstanding requests for SAS, to support more payload data
for STE, and so on.
HTTP_ENABLE Off Build HTTP server and demo web page into firmware
image. HTTP_ENABLE is valid only when TCPIP_ENABLE
is defined
Note: Adjust the stack size properly for customized application threads, for example. EMA thread, TCPIP thread,
TCPIP Timer thread, Command Server thread, and so on.
19.1.2 pmc_scsi_exec_scsi_cmd
Inputs module_handle_ ptr pointer to the handle returned from the module open which contains
data necessary to perform the command
adapter_name String name of the adapter to issue the command. e. g. “\\. \Scsi0:”
path_id path name (or bus number) on the adapter over which to send the
command
lun ordinal number of the logical unit number within the target to issue the
command
data_ptr pointer to location where data is being sent from for a command that
sends data to target
Outputs data_ptr pointer to location where data is being sent from/received to during a
command that receives data from target
Returns PMC_SUCCESS SCSI Command sent and reply received from target. Note that
sense_ptr must be checked to determine if command was successful
or unsuccessful.
PMCFW_ERR_ FAIL Target not accessible or incorrect parameters (lengths, and so on).
• There should be no need to re-build the executable but the source code and the pmc_scsi. dsw workspace file is
contained in fwcs/scsi_host/src/pmc_scsi.
• The pmc_scsi executable is invoked from a command prompt. Open a command prompt window, set the PATH
accordingly, navigate to the desired directory, and execute the program.
• To run pmc_scsi on Windows2008/Win7, make sure it is executed with administrator permissions.
The following are details for using the PMC_SCSI_GUI to perform a number of tasks:
• Displaying pmc_scsi command line options.
• Creating firmware binary files for download.
• Scanning for adapters and devices.
• Downloading firmware binary files.
• Issuing SCSI commands.
• Supported SES Diagnostic Pages.
set PMC_SCSI=“Scsi2: 0 2 0”
To determine these values, issue the command:
pmc_scsi -scan
The resulting output will be similar to the listing shown in Figure 19-1. From this listing, the Microchip device is clearly
identifiable from the assigned Device String. This value is configurable in the firmware and it may be assigned to
reflect an appropriate company identifier.
To access disk devices, pmc_scsi can also use option:
-pmc_scsi “<partition: 0 0 0>”
But, on Windows 2008/Win7, Windows blocks direct write operations to volume and disk handles. To access disks,
only option “<partition: 0 0 0>” is acceptable.
19.3.3.1 Comments
A comment begins with ‘#’ character. Characters between ‘#’ and an end of line character are treated as comment. A
comment can begin anywhere on a line.
19.3.3.2 Command
A command is specified on a separate line. The format of a command is as follows:
• Command Type – Type of command, specified by a keyword
• Command Descriptor – Details of the command, specified by a keyword
• Logical PHY ID – Logical PHY ID of the PHY on which the Diagnostics operation is performed, specified as a
hex number
• User arguments – Depending on the command specified with the command type and command descriptor, there
might be 0-2 user arguments specified as hex numbers.
• Spaces or tabs can be used to separate the various user command parts.
start setupctrl Start setup control before or after diagnostic test with patterns inserted
once errprbs Insert PRBS Error once (using a mask) (PRBS insertion continues)
once errcjtpat Insert erroneous CJTPAT pattern once (CJTPAT insertion continues)
once errusrpat Insert erroneous user-defined pattern once (using a mask) (user-defined pattern
insertion continues)
...........continued
Command Command Details
Type Descriptor
start setupctrl Start setup control before or after diagnostic test with patterns inserted
report cverr$ Get Code Violation Error Interval Threshold Reached? Report
report cverrcnt$ Get Code Violation Error Count and Threshold Reached? Report
report disperrcnt$ Get Disparity Error Count and Threshold Reached? Report
...........continued
Command Command Details
Type Descriptor
start setupctrl Start setup control before or after diagnostic test with patterns inserted
reset prbserrcnt
reset cverrcnt
reset disperrcnt Any one of these commands resets the SSPL and SXL error counts including
PRBS Error Count, Code Violation Error Count, Disparity Error Count, CRC
reset crcerrcnt
Error Count, In-Connection CRC Error Count, Lost DWORD Sync Count, Invalid
reset iccrcerrcnt DWORD Count,
reset lostdwsyncnt
reset invaliddwcnt
reset cverr$ Reset Code Violation Error Interval Threshold Reached? Info
reset cverrcnt$ Reset Code Violation Error Count and Threshold Reached? Info
reset disperrcnt$ Reset Disparity Error Count and Threshold Reached? Info
reset all Reset Error Counts and Threshold Reached? Info registers
• The Type column shows ASCII title of a report type e.g. PRBS Error Count.
• PHY column shows Logical PHY ID as a hex number.
• The Status column shows ‘good’ or ‘bad’ depending on the command processing status of the corresponding
user command.
• The Report column is either a number, specifying an error count, or a string – ‘yes’ or ‘no’ specifying if a
threshold was reached.
As an example, the following report file was obtained after running the Input User Command sequence specified in
Section 19.3.3 Input Command File Format.
Diagnostics Reports -------------------------------------------------- Type PHY Status Report
PRBS Err Count 0x8 good 0xc
Code Viol Err Count 0x8 good 0x1a3c0456
Code Viol Err Thhd 0x8 good no
Disparity Err Count 0x8 good 0x1c3c5f99
Disparity Err Thhd 0x8 good no
CRC Err Count 0x8 good 0x0
In-Conn CRC Err Count 0x8 good 0x0
Lost DW Sync Count 0x8 good 0x1
Invalid DW Count 0x8 good 0x1c3c8627
19.3.5 Examples
The location fwcs\scsi_host\src\pmc_scsi\sxp\etc contains sample user command files.
Table 19-4. SXP 12G Initialization String Table—PHY Configuration Global Setting
STP
OPEN
0x0203 Reserved REJECT 0x01
AWT
Clear
...........continued
Byte 7 6 5 4 3 2 1 0 Default Value Range
DP FFE M
PRELOAD
0x020A SAS3 12G Reserved DP FFE M PRELOAD SAS3 12G 0x1F
Global
Disable
Test
0x020B–
Threshold Reserved 0x00
0x020F
Enable
Xopen
Multi-
0x0216 Reserved Detect 0x00
LUN En
En
0x0217–
Reserved 0x00
0x0219
SATA
Buffering
STP
Link
open
0x021B Reserved Reset 0x00
control
Error
disable
PHY
Enable
0x021C–
Reserved 0x00
0x022F
A 05/2021 Document converted to the Microchip format. Document number changed from PMC-2120216 to
DS00004013.
19 10/2019 Updated Table 8-9 to add description of ‘PHY reset handling Enable and PHY reset in progress
timeout’
Updated Table 51 to add description ‘PHY reset handling Enable and PHY reset in progress timeout’
Updated ‘Take effect immediately’ field that indicates whether SSSF PHY configurations in the SES
page will take effect immediately on a PHY
18 07/2019 Added new section 3.1.21 SATA Interlace Feature SATA Interlace Feature
Updated TMF Tag 0 to TMF Tag 1 in section ‘SGPIO Drive Slot Bus ID’
17 07/2017 Added the new init string field ‘Disable expander phy’ at Table 8-22
Added the new init string field ‘SMP Initiator Nexus Timeout’ at Table 8-34.
16 01/2017 Added ‘Reserved’ and ‘Page length’ fields to ‘SES Delay test page’ in Table 14-73.
Add new field ‘First Virtual Connector Element Index’ in Table 8-17
Add detail description about how to set phy connector element index.
Updated Table 226 PHY Analog Setting Page Format with correct bit number for Analog Setting
descriptor
13 03/2016 Section 4.2.1 Firmware Download Mechanism: Updated firmware image header with new fields
Section 4.5 Firmware Image Authentication: Added this section to describe firmware image
authentication
Section 15.2.3: Modified Page size from 32 to 33 in L (LINK RESET) to reset the PHY.
Table 14-75
Table 14-91, added “Multi-Host A/A XOPEN STS CLR PHYx”, “Xopen Detect En” and “Multi- LUN En”
fields.
Table 14-94, added “Multi-Host A/A Xopen Deadlock Detect”, “Multi-Host A/A Xopen Detect” and
“Multi-Host A/A Xopen deadlock hit count” fields.
Table 8-9, added “Xopen Detect En” and “Multi- LUN En” fields.
...........continued
Revision Date Description
12 11/2015 Section 3
Section 8
Table 8-5, change 0x39-0x3A from reserved to Zone configuration EEPROM setup
Table 8-9, added note of SSSF TMF Tag0 and TMF Tag1 field
change the Zone Configuration table size description from 2175 to 8383
Table 8-9, added “DP FFE M PRELOAD SAS3 12G Global Disable” field and “Test Threshold Enable”
field;
Table 8-9, added “Power Disable Supported” field, “DP FFE M PRELOAD SAS3 12G” field, “Test
Threshold” field;
Table 8-40, updated “No SATA Spin-up Hold Broadcast” field description
Table 8-37, added 0xF4 page; Changed the default value and value range of the change field
14.2.3 Supported SES Pages and Limitations, 14.2.3.45 SSSF PHY Configuration Page (0xF3),
update description of the field “Uncorrectable ECC control”;
Table 14-92, changed field “EMIP Uncorrectable ECC error” to reserved; Added new fields “SSSF ram
uncorrectable ecc”, “SXL uncorrectable ecc error”, “EMIP uncorrectable ecc error”, “sssf split mode”
Table 17-9, changed SXP Dump Header Definition to add more fields
Table 17-10, changed SXP Dump Info Layout for the newly added fields
...........continued
Revision Date Description
11 12/2014 Section 8
Section 8
8.3.1 Flash Memory Initialization String Format, Change the note of STE Maximum Data Size Field.
Table 8-17, Remove “legacy optical without OOB” option in Unmanaged Connector Type field.
Table 8-19, added IBPI enable flag field and Blink rate C field;
Table 8-20, description of “TWI Master Speed Mode” field, change unit “K” to “kbit/s”.
Table 8-32, CS0 Timing Register0 and Timing Register1 field. Add note for special flash that is not
applicable to default value.
Table 8-34, updated description of the STP Bus Inactivity Time field
Section 9
Figure 9-3, Command Server Console Trace, added update_see and err_cnts commands.
Section 15
Added Table 14-17 voltage control element, Table 14-36 voltage status element andTable 14-37.
Added voltage field in Table 14-9 and Table 14-24.
...........continued
Revision Date Description
10 05/2014 Section 8
7.2.1 External Interface, added twi_slv_offset_width_set() for TWI driver functions and modified the
prototype of twi_nonthreadx_slv_init() and twi_slv_init().
Figure 7-1, added note for starting address to keep 24-byte alignment.
Section 9
Table 8-9, added 6G/3G connection management enable, TX Cx BCT START POINT and No
Equalization for Tx Coefficient Settings, changed 12G connection management field description and
added note of the TX 3 ID frame field and the SAS align mode field.
Table 8-34, added new field used to limit the retry open time. Added mask map field for reject to open.
Table 8-36, changed max disk drive count from 0x30 to 0x44.
Table 8-66, updated the length of the Number of Zone Groups and Increment CRC Protection Scope
fields.
Section 10
9.2.1 Terminal Interface, added rx_para_get and tx_para_get in command server to capture SAS
Rx/Tx parameters.
Section 11
Added Figure 10-11 SSU State Machine, Table 10-7, and Table 10-8 to describe the SSU Events.
Section 15
14.2.3 Supported SES Pages and Limitations, added PHY Analog Setting Status Page (0x83).
14.2.3 Supported SES Pages and Limitations, added Element Status page (0x7), Supported
Diagnostics page (0x0D), Subenclosure Nickname Page (0xF).
14.2.3 Supported SES Pages and Limitations, changed ES Electronics count from 2 to 1 and updated
offset in Table 14-9 and Table 14-24.
Table 14-92, added new field used to control the SXP handling the 2-bit ECC error and added 6G/3G
connection management enable.
Section 18
17.1.2 Hardware ECC/Parity Errors, added new description for SSSF and EMIP uncorrectable ECC
error, and added SSSF Read/Write (Test Pattern) API description and added Table 17-1.
...........continued
Revision Date Description
Added spi_mem_mapped_write_write
Added spi_mem_mapped_write_read
Section 8
Section 13
Section 14
13.10 Zoning Configuration On The Fly, updated the zone unlock description for NDSR with the lock
inactivity timer
Section 15
Section 15
Section 18
...........continued
Revision Date Description
8 08/2013 Overall
The QoS feature which provides the ability to dynamically adjust AWT values based on event counters
will not be supported and has been removed from the FUM Revision issue 7.
Section 4
Section 5
Section 6
Section 7
Section 8
7.1.4 SPI Flash Driver, updated SPI Flash Sector erasing procedure
Section 9
Table 8-34, updated the description of STP reject to open limit timer field
Section 10
Section 14
13.2 Zone PHY Information, added notes about detecting SATA device
Section 15
15.2 Optical Cable Support, updated STP Flow Control Buffer size statement
Section 18
Section 19
...........continued
Revision Date Description
7 05/2013 Overall
Section 8
7.1 Flash, added expanded description of flash timing parameter used in firmware.
Section 9
8.3 Initialization String Format, added a recommendation that initialization string table should only be
accessed per byte.
Table 8-8, modified default value for TX BCT C1 MIN and TX BCT C3 MIN.
Table 8-9, added fields T PISO PRE2 SEL SAS 1G5/SAS 3G/SAS2 6G/SATA 1G5/SATA 3G/SATA
6G.
Table 8-9, added fields T PISO EDGE DELAY SEL SAS 1G5/SAS 3G/SAS2 6G/SATA 1G5/SATA
3G/SATA 6G.
Section 15
14.2.3 Supported SES Pages and Limitations, added Help Text diagnostic page and SES Delay Test
page
14.2.3 Supported SES Pages and Limitations, updated description for SXP-Specific Diagnostics Page
for SAS (0x3F)
14.2.3 Supported SES Pages and Limitations, added corresponding new fields in table 206 as in
table 45 for PHY Analog Setting Control Page(0x83).
14.3.4 SCSI Sense Data, fixed sense data of COMMAND CLEARED BY ANOTHER INITIATOR
Section 19
18.2.5 Build Switches, removed build switches that are not supposed to be used by customer
6 01/2013 Section 7
Section 9
Section 13
12.2.2 NDSR Process, updated Firmware Load Process for two EMIP images
Section 15
14.2.3 Supported SES Pages and Limitations, added “SSSF PHY Configuration Page” and “SSSF
PHY Status Page”
...........continued
Revision Date Description
5 12/2012 Overall
Section 8
7.2 TWI, updated ThreadX TWI APIs for 256 bytes payload support, and Non-ThreadX TWI APIs for
parameter type change
Section 16
15.1 Managed SAS Connector Support, added EVBD related description for the ‘Managed SAS
Connector Support’ feature
Section 19
...........continued
Revision Date Description
4 11/2012 Overall
Section 6
5.4 Reset Event and NMI Handling, changed description of NMI callback.
Section 7
6.10 Interrupt Control Framework, updated new interrupts for EMIP and FWS
Section 8
7.2 TWI, added twi_nonthreadx_slv_init and changed description of Threadx TWI APIs for 128-byte
payload support
Section 9
Table 8-5, removed “PM8043_REVA” and “PM8044_REVA” fields, and changed SMP_PHY_ID and
SSP_PHY_ID as 7bits.
Table 8-7, removed ‘BPP Forward Inhibit’, ‘Wide port SMP Ping Instances’ and ‘Downstream
Expander Maximum PHY Count’ fields
Table 8-9, added ‘SAS Slumber En’, ‘SAS Partial En’ and ‘TRS TXCLK SEL SATA 1G5/3G/6G SSC’
fields, and removed ‘SATA G1/G2/G3 SSC EN’, ‘TRS TXCLK SEL SATA SSC’ and ‘TX EMI CAL
ENABLE’ fields
Table 8-21, added ‘Nonthreadx CMDSVR Interface’, ‘Nonthreadx CMDSVR TWI PORT ID’ and
‘Nonthreadx CMDSVR TWI Slave Address’ fields
Table 8-34, added ‘SSP Initiator Response Timeout’, ‘STP Max Connect Limit time’ and ‘STP REJECT
TO OPEN LIMIT’ fields
Table 8-60, removed ‘BPP Forward Inhibit’, ‘Wide port SMP Ping Instances’ and ‘Downstream
Expander Maximum PHY Count’ fields
Section 10
...........continued
Revision Date Description
Section 15
14.2.3 Supported SES Pages and Limitations, changed page code of ‘PHY Analog Setting Control
Page’ from 0x13 to 0x83
14.2.3 Supported SES Pages and Limitations, added ‘PHY QOS Setting Set/Get Page’
14.2.3 Supported SES Pages and Limitations, added ‘Port Mirroring Control/Status Page’
14.3.2 SCSI Command Support, added support for EMIP firmware log
14.7.4 SMP Functions Specific to Microchip, added ‘PMC Report PHY QOS’ and ‘PMC Configure
PHY QOS’
Section 16
Section 18
17.6.1 Customer Fatal Error Handler, added more detail for ‘customer fatal error handler’
...........continued
Revision Date Description
3 09/2012 Overall
Section 5
4.4 Flash Partition Map , added 8M partition map and rules to customize a vendor specific partition
map
Section 6
5.4 Reset Event and NMI Handling, updated the Figure – NMI Handling Flow, minor change
Section 7
6.6.1 External Interface, added two APIs for log global severity level set/get
6.10.2 SXP 12G Enabled Interrupt, added a table for SXP 12G enabled interrupts
Section 8
7.1.4 SPI Flash Driver, added a bus_id parameter for SPI driver API
Section 9
Table 8-7, changed description for the ‘Wide-Port Policing Enable’ Field and added a ‘Report Partial
RT’ field
Table 8-9, removed the ‘PHY Delay Interval’ field, added a ‘STP OPEN REJECT AWT Clear’ field and
redefined those fields for analog parameters
PHY Configuration Per PHY, removed the ‘STP OPENREJECT AWT Clear’ field; removed
the ‘IMPEDANCE SAS 1G5/SAS3G/SAS2 6G/SATA1G5/SATA3G/SATA6G’ fields; removed the ‘T
PISO PRE2 SEL SAS 1G5/SAS3G/SAS2 6G/SATA1G5/SATA3G/SATA6G’ fields; removed the ‘T
PISO EDGE DELAY SEL 1G5/SAS3G/SAS2 6G/SATA 1G5/SATA3G/SATA6G’ fields; removed the
‘ANALOG PEAKING EN’ field; changed description for Tx coefficient setting and added a notes for
relationship between Legacy-AMP, PRE, POST value and SAS3- C1, C2, C3
Table 8-32, filled in parameters for CS0 and CS1 timing configuration
Table 8-31, added ‘SIA Thread Maximum Simultaneous Requests from DSQ’ field and ‘SAHA Thread
Maximum Simultaneous Requests from DSQ’; redefined the ‘SIA Thread Maximum Simultaneous
Application Requests’ field
Table 8-46 – RF and NDSR Configuration Block, added the field ‘Flash Erase Poll Period’
...........continued
Revision Date Description
Table 90, added the ‘NZGF Disable’ field and added a table of ‘SMP REPORT ZONE PERMISSION
TABLE REQUEST Reserved Bits’, added a ‘PMC Table version’ field
Section 11
10.2.2 Routing Loop Detection and Resolution, changed description for SAS1.1 Routing loop
detection and resolution
10.3.1 Enhanced Distributed Discovery Algorithm, changed description for ‘Enhanced Distributed
Discovery Algorithm’
10.3.5 Loop Topology Detection and Resolution, added ‘Loop Topology Detection and Resolution’
10.5 Programmable Staggered Spin-Up Algorithm, changed the ‘Power Budget Equation’
Section 15
14.2.3 Supported SES Pages and Limitations, added Vhist Capture Control Page and Vhist Capture
Status Page
14.3.2 SCSI Command Support, re-wrote contents of MODE SELECT (10) and MODE SENSE (10)
14.3.3 Task Management Function, added description for ‘Task Management Function’
Section 17
16.2 Inter-Expander Communication Over SAS, added description of ‘SIA support outstanding
request’ and add rules for SIA module usage.
Section 18
17.2 Enhanced Event Logging, changed description for ‘Event Logging Filter Level’ usage
17.3 SMP Self Configuration Event Logging, added description for SMP Self Configuration Event
Logging
17.6 Fatal Error Handling, added description for ‘Fatal Error Handling’ mechanism
...........continued
Revision Date Description
2 05/2012 Overall
Section 4
4.1, added or modified module description for SSP Initiator/SIA, STP Initiator/SAHA, Power
Management, SAS Zoning, NDSR, Cable management, Inter-expander Communication, Command
Server, TCP/IP Stack and Network-based Application, Event Logging and Error Handling, SAS/SATA
Store& Forward and BCT Microcode, SXP SAS HW Block Drivers and SXP Peripheral Driver Module
4.2, updated Figure 5 – Thread Decomposition, to add the SAS Connector Manager thread
Section 5
5.1, updated firmware management and launching mechanism with new Partition Valid Flags
5.2, updated firmware download mechanism with new Partition Valid Flags
Section 6
6.3, updated Figure 9 – NMI Handling Flow, to incorporate WOL NMI specific operation
Section 8
8.1.4, added instructions of implementing support for new SPI flash chip
8.1.4, updated Table 7-5, to remove SPI direct access mode API and others private SPI driver API
8.8 updated Table 7-10, to introduce new Application Timer Driver API.
Section 9
9.3.1, updated tables for most of ISTR blocks, to use absolute offset address and HEX notation for all
initialization string fields
Table 8-5, changed name of the field “EEPROM Athroughl” to “address valid”, and fixed typo for
description of the TWI Serial EEPROM ADDR field
Table 8-9, removed TX SSC Down Spread Type for all PHYs field, and added one field in
to make it configurable per PHY, removed TX_CX_PRST field, and added TX BCT Cx MAX, TX BCT
Cx MIN, TX BCT VPP MAX and TX BCT VMA MIN fields.
...........continued
Revision Date Description
Table 8-30, changed width of the LOG Entry Count field from 16bits to 20bits
Table 8-32, added the SAS Connector Manager Thread Priority field
Table 8-34, changed SAS Supported Initiator Count from 0x02 to 0x10, SAS Tasks Per Initiator from
0x01 to 0x02, and SCSI Supported Initiator Count from 0x02 to 0x10
Table 8-34, updated description of the STP Bus Inactivity Time field
Table 8-36, changed default value of the Disk Drive Count and Disk Drive Slot 0~47 fields
Table 8-50, changed width of the Virtual SSP/SMP PHY’s Group ID from 7bits to 8bits
Table 8-54, changed offset address of this block from 0x3400 to 0x3800
Section 10
10.5.1, added Figure 32 – SXP 12G Normal Datapath and Diagnostic Datapath
10.5.1, Table 9-4 – Diagnostic Counters, added new CJTPAT Error Count and User Pattern Error
Count, and removed PRBS Error Threshold
10.5.1, added Table 9-5 – Registers for Configuring Performance Counter for CJTPAT Errors
10.5.4, updated description for Diagnostics commands, added Error Insertion, Enabling Receive –
For PRBS, and so on.
Section 15
15.2.3, for Configuration Diagnostic Page, explained method to increase count of drive and connector
elements
Table 14-12 – Common Control Byte for All Element Types, updated usage of the PrdFail and Disable
fields
Table 150~157, updated description to remove words of ‘Rst Swap bit support’.
Table 14-26 – Common Status Byte for All Element Types, updated description of the Swap field, and
removed words of ‘Swap bit support’ for various elements.
Table 14-104 – SAS Port Mode Page – Short Format, added Reject to Open Limit field
Table 14-106 – SAS Logical Unit Mode Page – Short Format and Table 14-107 – Disconnect –
Reconnect Mode Page, added description for various fields
15.3.2, added paragraphs for LOG SENSE and LOG SELECT command
Section 16
16.1.2, added paragraph of FPGA Logic to explain what FPGA does for SAS Connector Management
feature
16.1.3, added more detail of FW implementation for SAS Connector Management feature
...........continued
Revision Date Description
Section 17
Section 18
Section 19
19.2.2, added explanation for EMA thread polling peripherals mechanism when ISTR field of EMA
polling time is set to 0
19.2.7, updated stack size of various threads for SXP 12G firmware
19.2.4, updated state of RAM/Flash usage for current main firmware image
Section 20
20.1.2, updated description of how to create bin file from mem file by pmc_scsi with new version
scheme
20.3, updated usage description of Host diagnostic tool, including command introduction and example
of command input/output
Microchip provides online support via our website at www.microchip.com/. This website is used to make files and
information easily available to customers. Some of the content available includes:
• Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s
guides and hardware support documents, latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online
discussion groups, Microchip design partner program member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of
seminars and events, listings of Microchip sales offices, distributors and factory representatives
Microchip’s product change notification service helps keep customers current on Microchip products. Subscribers will
receive email notification whenever there are changes, updates, revisions or errata related to a specified product
family or development tool of interest.
To register, go to www.microchip.com/pcn and follow the registration instructions.
Customer Support
Note the following details of the code protection feature on Microchip devices:
• Microchip products meet the specifications contained in their particular Microchip Data Sheet.
• Microchip believes that its family of products is secure when used in the intended manner and under normal
conditions.
• There are dishonest and possibly illegal methods being used in attempts to breach the code protection features
of the Microchip devices. We believe that these methods require using the Microchip products in a manner
outside the operating specifications contained in Microchip’s Data Sheets. Attempts to breach these code
protection features, most likely, cannot be accomplished without violating Microchip’s intellectual property rights.
• Microchip is willing to work with any customer who is concerned about the integrity of its code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of its code. Code
protection does not mean that we are guaranteeing the product is “unbreakable.” Code protection is constantly
evolving. We at Microchip are committed to continuously improving the code protection features of our products.
Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act.
If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue
for relief under that Act.
Trademarks
The Microchip name and logo, the Microchip logo, Adaptec, AnyRate, AVR, AVR logo, AVR Freaks, BesTime,
BitCloud, chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, HELDO, IGLOO, JukeBlox,
KeeLoq, Kleer, LANCheck, LinkMD, maXStylus, maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo,
MOST, MOST logo, MPLAB, OptoLyzer, PackeTime, PIC, picoPower, PICSTART, PIC32 logo, PolarFire, Prochip
Designer, QTouch, SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash, Symmetricom, SyncServer,
Tachyon, TimeSource, tinyAVR, UNI/O, Vectron, and XMEGA are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
AgileSwitch, APT, ClockWorks, The Embedded Control Solutions Company, EtherSynch, FlashTec, Hyper Speed
Control, HyperLight Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3, Precision Edge, ProASIC,
ProASIC Plus, ProASIC Plus logo, Quiet-Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub, TimePictra,
TimeProvider, WinPath, and ZL are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, Augmented Switching,
BlueSky, BodyCom, CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController,
dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, Espresso T1S, EtherGREEN, IdealBridge,
In-Circuit Serial Programming, ICSP, INICnet, Intelligent Paralleling, Inter-Chip Connectivity, JitterBlocker, maxCrypto,
maxView, memBrain, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach,
Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE,
Ripple Blocker, RTAX, RTG4, SAM-ICE, Serial Quad I/O, simpleMAP, SimpliPHY, SmartBuffer, SMART-I.S., storClad,
SQI, SuperSwitcher, SuperSwitcher II, Switchtec, SynchroPHY, Total Endurance, TSHARC, USBCheck, VariSense,
VectorBlox, VeriPHY, ViewSpan, WiperLock, XpressConnect, and ZENA are trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of
Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2021, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
ISBN: 978-1-5224-8245-1