+// wipe out the scratchPad
+// return:
+// 0 - ok
+// -1 - fail
+int kerSysScratchPadClearAll(void)
+{
+ int sts = -1;
+ char *pShareBuf = NULL;
+ char *pBuf = NULL;
+
+
+ if (fInfo.flash_scratch_pad_length == 0)
+ return sts;
+ if( (pShareBuf = getSharedBlks( fInfo.flash_scratch_pad_start_blk,
+ (fInfo.flash_scratch_pad_start_blk + fInfo.flash_scratch_pad_number_blk) )) == NULL )
+ return sts;
+ pBuf = pShareBuf + fInfo.flash_scratch_pad_blk_offset;
+ memset(pBuf, 0x00, fInfo.flash_scratch_pad_length);
+ sts = setSharedBlks(fInfo.flash_scratch_pad_start_blk,
+ (fInfo.flash_scratch_pad_number_blk + fInfo.flash_scratch_pad_start_blk), pShareBuf);
+
+ retriedKfree(pShareBuf);
+
+ return sts;
+}
+