Hi
I am using S32DS to debug MPC5748G. I want to enable the HSM module in MPC5748G. I found that in order to activate the HSM module, I need to set the HSE bit via DCF record. But I didn't found a way to set the DCF record. How can I access the DCF record in order to enable the HSM module in MPC5748G?
Regards
Rahul Ramakrishnan
Hi,
This is quite simple and it is described in reference manual chapter 11. DCF records.
Few steps:
1. Construct the DCF record you like to program (according to chapter 11.3 DCF record structure)
2. simply program it to first free location in your UTEST DCF user records area. This area starts with DCF start record.
You can program it from code or via debugger (this is up to you). I recommend you to write debugger script for DCF records programming. Especially for HSM records.
3. restart the device
That's all.
Peter
Hi Peter,
For SPC5748ghmku6 (MPC5748G).
I know how to program the DCF record and also I know how to get the first available address of the DCF (Using the Stop bit as mentioned in the reference manual).
i.e 0x00400638 is the first available address in my case, and I should write 8 bytes from the mentioned address in order to enable the HSM.
Kindly please send us directly those 8bytes to enable the HSM for (SPC5748ghmku6)
Would be perfect if you please describe how to calculate the CS, Address and Data for HSM enable only.
Please keep in mind that I have the Security Reference Manual and SHE on MPC documents there fore please dont hesitate to point to a page in you description.
Thanks in advance and have a nice day.
Hi
I need to know the script for setting the DCF record. I can't able to found it.
Regards
Rahul Ramakrishnan
Hi,
You have to write it yourself. As for every application it is unique.
For example for Lauterbach debuggers I use following:
; CPU setup
SYStem.RESet
SYStem.BdmClock 4.0MHz
SYStem.DETECT.CPU
SYStem.Option.WATCHDOG OFF
SYStem.Up
; Initialize internal SRAM (only partially used)
Data.Set EA:0x40000000--0x4000FFFF %Quad 0
; ------------------------------------------------------------------------------
; UTEST address space
FLASH.Create 1. 0x00400000--0x00403FFF TARGET Quad 0x0500 /INFO "UTEST (OTP)"
FLASH.TARGET E:0x40000000 E:0x40002000 0x1000 ~~/demo/powerpc/flash/quad/c55fm5746m.bin /STACKSIZE 0x0200
; ------------------------------------------------------------------------------
DIALOG.YESNO "DCF records programming prepared. Program DCF records now? Click Yes to program UTEST FLASH. Click No for continue."
ENTRY &progflash
IF &progflash
(
FLASH.Program ALL
; here insert DCF records you want to program
data.set 0x00400370 %QUAD 0x00002EDE01000000 ;DCF_UTEST_Miscellaneous
data.set 0x00400378 %QUAD 0x0000D12101000000
data.set 0x00400380 %QUAD 0x8000176F01000000
FLASH.Program OFF
)
As you can see the address is unique for every project, however DCF record could be same.
All you have to do is just program 64bit DCF record (HSM if you like) to first available address in flash starting from 0x400300. In my case it was 0x400370.
If you don''t know how to construct DCF records have a look at guide in reference manual as I have already wrote:
Peter
"0x00400370", how do you find this first free available address?
Hi,
I simply looked into memory dump of my micro in debugger.
Peter
This is what my memory at the given address looks like, please tell me how and where I can write my HSM enable DCF client::
Program your DCF records for HSM enable at address 0x400380.
0xFFFF_FFFF means stop record. No record after this pattern is processed.
Peter
Why nothing has been mentioned about SHE functional specification in the reference manual or security reference manual? how are we suppose to procure it?
SHE Functional Specification is a separate document owned by HIS members.
Hi
I understood that. I need to know the way to update the DCF record.
It is simple flash programing like in all other parts of flash. UTEST is programmed as normal flash.
1. from application code
2. via external tool (for example debugger, programming machine, etc... ) - I have already shared Lauterbach debugger programming script example.
Peter
@Peter NOW,I have no Lauterbach debugger, how can I programme from application code? Can you give me an example?
Regards
Hi
Do you found any way to update DCF records without using Lauterbach debugger? If you found please help me to update the DCF record. I am using S32DS and working on MPC5748G LCEVB. What should I do to add DCF records using S32DS?
Is there any examples available to you?
Regards
Hi, Yes you can do it via S32DS.
Stanislav Sliva wrote a guide how to update DCF records:
HOWTO: Program DCF record into UTEST flash in S32 Design Studio for Power
Peter
PS: It took me 20 seconds to find it here on community.
Thank you very much,now I can program DCF record into UTEST flash,it have worked,but,I find some problem, I can't debug the program in the MPC5748G, I have wrote the email,so,can you help me to solve the problem? thank you very much
Regards
How do you update the DCF record? I tried to update the DCF record as mentioned in the following link https://community.nxp.com/docs/DOC-334094. But I can't able to update the DCF record in MPC5748G LCEVB. What should I do to update the DCF record?
Regards
Rahul Ramakrishnan
Hi,
How do you update the DCF record?
Simply add new DCF record in first available space in UTEST memory. SSCM module will take in account the last valid (of same record) DCF record found in memory.
Peter
Hi,
thank you for creating ticket.
as we are not allow to discuss security theme on community.
Peter
OK,thank you very much