The ECCM module reports ECCM check errors (SEC and DED) and VBUSM unaligned write
error (address not 32B aligned or size not 32B). The
fsas_ecc_intr_err_pend/fsas_ecc_intr_err_req interrupt is issued to report these
errors to SOC.
In addition to providing interrupt, ECCM module contains two stack data structures
for providing additional information to software.
For ECCM decode errors:
- ECCM error information is added to a stack. The top of the stack can be read
by software using ERR_ECC_BLOCK_ADDR and ERR_ECC_TYPE registers in FSAS MMR
space. The stack is popped by setting bit 31 in ERR_ECC_TYPE register to
1'b1.
- Each location in this stack contains whether the ECCM error is SEC or DED.
For SEC error, it indicates whether error occurred in address, MAC, high
data word (upper 16-bytes), or low data word (lower 16-bytes). There is a
possibility that multiple of these fields could have SEC errors due to
partitioning of ECCM input into four partitions with separate ECCM codes for
each of the partition. There is also a possibility that SEC error is
reported by the stack element, but none of these fields indicate error
(since ECC code itself could have one bit error).
- One entry in ECCM error stack corresponds to one read from flash that had an
error. If multiple reads from flash have ECC errors, multiple entries are
added to this stack. Up to four entries can be stored in this stack. If this
stack becomes full, newer ECCM errors are dropped and stack remains full
until popped by software as mentioned above.
For write errors:
- Unaligned VBUSM write error information is added to a second stack. The top
of the stack can be read by software using ERR_WRT_TYPE register in FSAS MMR
space. The stack is popped by setting bit 31 in ERR_WRT_TYPE register.
- Each location in this stack contains whether write error occurred due to
unaligned address or due to non-contiguous byte enables and the CBA route ID
for the host device that caused the write error.
- One entry in the write error stack corresponds to one write to flash that
had an error. If multiple writes to flash have errors, multiple entries are
added to this stack. Up to four entries can be stored in this stack. If this
stack becomes full, newer write errors are dropped and stack remains full
until popped by software as mentioned above.
Please note that interrupt is generated only when the error condition occurs. That
is, ECCM error results in interrupt only when checking ECCM on read return data from
flash. Similarly, unaligned VBUSM write error results in interrupt only when ECCM
module receives an unaligned VBUSM write. So if there is one more entry in these
stack after popping an entry, interrupt is NOT retriggered. Also there is no
advanced information available on how many entries are pending in these stack.
Software has to pop all entries in the stack when an interrupt occurs using the
below sequence considering ECCM error stack as example (but same sequence applies
for write error stack):
- Read top of the stack using ERR_ECC_BLOCK_ADDR and ERR_ECC_TYPE registers.
- Write 1 to bit 31 of ERR_ECC_TYPE register to pop the stack
- Read bit 31 of ERR_ECC_TYPE register. If this bit is set, that means there is
one more entry in the stack, so repeat from step 1 for the next entry. If this
bit is clear, there no more entries in the stack