Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
59
of
174
Return value
Description
-EINVAL
Indicates one or more of:
•
The page number is out of
range
•
Size is 0
•
Size + offset is larger than
spare area size
•
Size is not a multiple of 4
•
The data buffer is NULL
•
The data buffer is not 4-
byte aligned
-EIO
Failed to write data. Block
should be marked as a bad
block.
5.6.3.7.1. Bad block check
Reads the factory bad block status from a block.
Note that this only gives information about factory bad blocks; subsequent bad block status
is not included in this information.
Return value
Description
0
Block is marked ok.
1
Block is marked as bad.
-EINVAL
The page number is out of
range, buffers are NULL or not
4-byte aligned.
5.6.3.7.2. Error Injection
Injects errors in page write command call. The purpose is to test error corrections (EDAC).
Command
Value type Direction Description
MASSMEM_IO_BAD_BLOCK_CHECK
uint32_t
in
Block number.
Command
Value type
Direction Description
MASSMEM_IO_ERROR_INJECTION
massmem_ioctl_error_injection_args_t*
in
Pointer to struct with
program page arguments
as defined in 5.6.2.4