Hello!
I'am trying to understand SEC 4.4 and how to use it from bootloader (simple custom bootloader, written with assembly). I just need to compute CRC of boot image but I can't find some code examples to figure out how to start. Is there any examples how to use it?
The recommended way to perform a CRC or hash operation over memory is
by constructing and submitting a Job Descriptor via the Job Ring
interface. Below is a simple descriptor to calculate a CRC over a
contiguous block of memory:
[00] B0800009 jobhdr: stidx->[00] len=9
[01] 8490002C operation: cls2-op crc ietf3385 init-final dec
[02] 24540000 fifold: class2 msg-last2 ext
[03] 00000000 ptr->@0x0fdec4080
[04] FDEC4080
[05] 00449D00 extlen=4496640
[06] 54200004 str: ccb2-ctx len=4 offs=0
[07] 00000000 ptr->@0x0feb95140
[08] FEB95140
Simple routines for creating and managing SEC jobs can be found in
u-Boot SEC driver: