Hi all,
I need your help since I am stuck on the following point :
I am under 3.90-2 M33 (no K1.5) I have prx in kernel mode.
sceNandGetPageSize, sceNandGetPagesPerBlock or sceNandGetTotalBlocks works fine but:
sceNandLock always returns 800200D1 (illegal permission ?)
and
sceNandIsBadBlock(i*nbPagePerBlock) always reports a bad block.
do you have any ideas?
thx
[solved]sceNandLock returns 800200D1
[solved]sceNandLock returns 800200D1
Last edited by pspZorba on Sun Feb 24, 2008 1:38 pm, edited 1 time in total.
--pspZorba--
NO to K1.5 !
NO to K1.5 !
sorry for the punctualization, but the point in k1 stuff is not to set k1 to 0, but read its value and restore it before return... function setting k1, returns previous k1 value....we are not using something like
because, according to a tyranid's post, getK1 is not working properly and there's no point in fixing it as long as setK1 returns previous k1 value.
Code: Select all
k1=getK1();
.
.
.
setK1(k1);
The point is actually setting it to 0 (or at least shifting its value 16 bits to right like sce does), the firmware is full of checks of k1 value checks to know if the call was done by kernel mode or vsh/user.jean wrote:sorry for the punctualization, but the point in k1 stuff is not to set k1 to 0, but read its value and restore it before return... function setting k1, returns previous k1 value....we are not using something likebecause, according to a tyranid's post, getK1 is not working properly and there's no point in fixing it as long as setK1 returns previous k1 value.Code: Select all
k1=getK1(); . . . setK1(k1);
Still, it is odd that such a function that is only available as kernel export would do those checks, maybe the error is by other reason.
About the sceNandIsBlock, are you sure it is returning 1 or just "non zero"? Maybe the function is a "troolean" one, returning 0, 1 and < 0 (error).
Thanks Moonlight and Jean,
that was that, as soon as I put the K1 stuff around the sceNandLock and sceNandIsBlock, it works.
But I thought you had to set them only when you were accessing memory/variable comming from user space ?
About sceNandIsBlock, Moonlight you were right it is a "troolean function'. Before I set K1 things, it returned the same error as sceNandLock i.e. 800200D1
By the way there are blocks that are good and that I can't read (1 bad block, 2047 good blocks and only 1949 read => 98 not read), I saw an old post of yours on that matter, did you find why and how to read them?
that was that, as soon as I put the K1 stuff around the sceNandLock and sceNandIsBlock, it works.
But I thought you had to set them only when you were accessing memory/variable comming from user space ?
About sceNandIsBlock, Moonlight you were right it is a "troolean function'. Before I set K1 things, it returned the same error as sceNandLock i.e. 800200D1
By the way there are blocks that are good and that I can't read (1 bad block, 2047 good blocks and only 1949 read => 98 not read), I saw an old post of yours on that matter, did you find why and how to read them?
--pspZorba--
NO to K1.5 !
NO to K1.5 !
Maybe it is because some blocks are not inited (and then, they don't have the correct ecc's), and sceNandReadBlock uses internally sceNandReadPage, which fails on ecc errors.
To dump the nand, sceNandReadPageRawAll (or sceNandReadAccess with the access param set to the same value ReadPageRawAll uses) should be the one used, which has no ecc check, I remember i posted a 2.XX+ example nand dumper in the release of 2.71 HEN.
To dump the nand, sceNandReadPageRawAll (or sceNandReadAccess with the access param set to the same value ReadPageRawAll uses) should be the one used, which has no ecc check, I remember i posted a 2.XX+ example nand dumper in the release of 2.71 HEN.