jituelect
Newbie level 5
I have a S3C2443 board (which supports eMMC) and a NAND flash chip, compliant with eMMC 4.4.
I am able to perform other operation like boot, read/write, WP, lock/unlock, erase etc.
I am trying to access the RPMB area but always getting the general failure.
(I have not set the key, as it was also giving general failure)
steps I took to access RPMB.
# Set R/W access to RPMB by writing 0x03 to byte 179 in EXT_CSD.
# Create a RPMB frame(512 bytes) for reading counter value.
//writing the read counter request
# Issue CMD23 with reliable write & blk count=1.
# Issue CMD25.
//writing the result register read request
# Create RPMB frame for "result register read".
# Issue CMD23 with blk count=1.
# Issue CMD25.
// reading the register
# Issue CMD23 with blk count=1.
# Issue CMD18.
The structure for RPMB frame, I am using is
// RPMB data
#define RPMB_FRAME_SIZE (512)
#define RPMB_STUFF_SIZE (196)
#define RPMB_KEY_MAC_SIZE (32)
#define RPMB_DATA_SIZE (256)
#define RPMB_NONCE_SIZE (16)
#define RPMB_WCOUNT_SIZE (4)
#define RPMB_ADDR_SIZE (2)
#define RPMB_BCOUNT_SIZE (2)
#define RPMB_RESULT_SIZE (2)
#define RPMB_REQ_RESP_SIZE (2)
typedef struct {
unsigned char stuff[RPMB_STUFF_SIZE];
unsigned char key_mac[RPMB_KEY_MAC_SIZE];
unsigned char data[RPMB_DATA_SIZE];
unsigned char nonce[RPMB_NONCE_SIZE];
unsigned int wcounter;
unsigned short addr;
unsigned short bcount;
unsigned short result;
unsigned short req_resp;
} RPMB_FRAME;
Am I missing something?
Any help is greatly appreciated.
TIA
I am able to perform other operation like boot, read/write, WP, lock/unlock, erase etc.
I am trying to access the RPMB area but always getting the general failure.
(I have not set the key, as it was also giving general failure)
steps I took to access RPMB.
# Set R/W access to RPMB by writing 0x03 to byte 179 in EXT_CSD.
# Create a RPMB frame(512 bytes) for reading counter value.
//writing the read counter request
# Issue CMD23 with reliable write & blk count=1.
# Issue CMD25.
//writing the result register read request
# Create RPMB frame for "result register read".
# Issue CMD23 with blk count=1.
# Issue CMD25.
// reading the register
# Issue CMD23 with blk count=1.
# Issue CMD18.
The structure for RPMB frame, I am using is
// RPMB data
#define RPMB_FRAME_SIZE (512)
#define RPMB_STUFF_SIZE (196)
#define RPMB_KEY_MAC_SIZE (32)
#define RPMB_DATA_SIZE (256)
#define RPMB_NONCE_SIZE (16)
#define RPMB_WCOUNT_SIZE (4)
#define RPMB_ADDR_SIZE (2)
#define RPMB_BCOUNT_SIZE (2)
#define RPMB_RESULT_SIZE (2)
#define RPMB_REQ_RESP_SIZE (2)
typedef struct {
unsigned char stuff[RPMB_STUFF_SIZE];
unsigned char key_mac[RPMB_KEY_MAC_SIZE];
unsigned char data[RPMB_DATA_SIZE];
unsigned char nonce[RPMB_NONCE_SIZE];
unsigned int wcounter;
unsigned short addr;
unsigned short bcount;
unsigned short result;
unsigned short req_resp;
} RPMB_FRAME;
Am I missing something?
Any help is greatly appreciated.
TIA