Hello,
I read a resolved discussion about RNG Job Descriptor:
P4080 SEC4.0 Job Descriptor to copy random numbers to system RAM
I've the same need : generate a simple random number and store it at the address 0x10000170 in RAM.
So I use the descriptor provided in the answer of the discussion:
### rnggen_1
[00] B0800006 jobhdr: stidx=0 len=6
[01] 12820004 ld: ccb1-datasz len=4 offs=0 imm
[02] 00000020 data:0x00000020
[03] 82500000 operation: cls1-op rng (SH0) generate random
[04] 60300020 fifostr: msg len=32
[05] 10000170 @ptr->@0x10000170
But when I load the Job Descriptor Base Address into the Input Job Ring Register,
I have no Random number at the address @0x10000170...
... what is the problem with this descriptor ?
What I don't do well ?
Please, could you help me ?
Fabien.
Solved! Go to Solution.
The job status tells you that RNG has not been instantiated. Refer to Security RM, Sections 5.7.3.2.1, 5.7.3.2.2,
Table 5-68.
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
What is the Job termination status returned for this JD?
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Platon,
I will try to explain what happened:
1- First, I load the descriptor in RAM memory. I initiate all the Job Ring registers in CAAM (size, addresses, ...)
Addresses in RAM | Comments | Values |
---|---|---|
0x10000000 | JR0_input_Base_Addr | 0x10000100 |
... | ... ... | ... |
0x10000040 | JR0_Output_Base_Addr | 0x00000000 |
... | ... ... | ... |
0x10000100 | jobhdr: stidx=0 len=6 | 0xB0800006 |
0x10000104 | ld: ccb1-datasz len=4 offs=0 imm | 0x12820004 |
0x10000108 | data:0x00000020 | 0x00000020 |
0x1000010C | operation: cls1-op rng (SH0) generate random | 0x82500000 |
0x10000110 | fifostr: msg len=32 | 0x60300020 |
0x10000114 | @ptr->@0x10000170 | 0x10000170 |
... | ... ... | ... |
0x10000170 | where the descriptor tell the CAAM to store the result. | 0x00000000 |
... | ... ... | ... |
--> At this moment, the status register are:
Addresses in RAM | Comments | Values |
---|---|---|
0x02100DF4 | JRJDS — Job Ring Job-Done Status Register | 0x00000000 |
... | ... ... | ... |
0x02100FD4 | CSTA — CAAM Status Register | 0x00000006 |
... | ... ... | ... |
0x02101044 | JROSR0 — Job Ring Output Status Register for Job Ring 0 | 0x00000000 |
... | ... ... | ... |
0x02101FD4 | CSTA — CAAM Status Register | 0x00000006 |
2- Then I write into the IRJAR0 of the CAAM the value 0x1 in order it begin its work:
0x0210101C | IRJAR0 — Input Ring Jobs Added Register for Job Ring 0 | 0x00000001 |
3- Last it returns this:
Addresses in RAM | Comments | Values |
---|---|---|
0x10000000 | JR0_input_Base_Addr | 0x10000100 |
... | ... ... | ... |
0x10000040 | JR0_Output_Base_Addr | 0x10000100 |
0x10000044 | 0x20000454 | |
... | ... ... | ... |
0x10000100 | jobhdr: stidx=0 len=6 | 0xB0800006 |
0x10000104 | ld: ccb1-datasz len=4 offs=0 imm | 0x12820004 |
0x10000108 | data:0x00000020 | 0x00000020 |
0x1000010C | operation: cls1-op rng (SH0) generate random | 0x82500000 |
0x10000110 | fifostr: msg len=32 | 0x60300020 |
0x10000114 | @ptr->@0x10000170 | 0x10000170 |
... | ... ... | ... |
0x10000170 | where the descriptor tell the CAAM to store the result. | 0x00000000 |
... | ... ... | ... |
--> then the status registers are:
Addresses in RAM | Comments | Values |
---|---|---|
0x02100DF4 | JRJDS — Job Ring Job-Done Status Register | 0x00000000 |
... | ... ... | ... |
0x02100DF4 | CSTA — CAAM Status Register | 0x00000005 |
... | ... ... | ... |
0x02100DF4 | JROSR0 — Job Ring Output Status Register for Job Ring 0 | 0x20000454 |
... | ... ... | ... |
0x02101FD4 | CSTA — CAAM Status Register | 0x00000005 |
I hope it explains quite well the situation. If not don't hesitate to ask me some specifications.
Thank you for your help,
Fabien.
The job status tells you that RNG has not been instantiated. Refer to Security RM, Sections 5.7.3.2.1, 5.7.3.2.2,
Table 5-68.
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Ok Platon,
Thank you very much. It sould be the reason for this dysfunction :smileyhappy: ...
Best Regards,
Fabien.