sof-ri-info

sof-ri-info is a python3 script that parses manifests that are included in the sof binary. It prints extracted metadata in readable form. The output is manifest-type dependent content. The binary file layout displays when verbose mode is selected.

Currently, the following can be parsed:

name

signature

CSE Manifest

$CPD

CSS Manifest

ADSP Manifest

$AM1, $AME

Extended Manifest

$AE1, XMan

Examples

Note

Run sof_ri_info.py -h to see how to switch to the appropriate display mode.

Code Block 12 Example of “headers only” mode.
 1$ python ./sof_ri_info.py --no_colors --headers sof-cnl.ri
 2SOF Binary sof-cnl.ri size 0x5b000
 3
 4
 5  CSE Manifest ver 0x101 checksum 0xf1 partition name ADSP
 6
 7    ADSP.man (CSS Manifest) type 0x4 ver 0x10000 date 2020/07/16
 8      Rsvd0 0x0
 9      Modulus size (dwords) 64
10        85 00 e1 68 aa eb d2 07 ... 5a 96 28 27 19 af 43 b9 (Community key)
11      Exponent size (dwords) 1
12        01 00 01 00
13      Signature
14        86 67 47 b1 d5 00 7a e9 ... f5 30 10 9c 56 16 f1 90
15
16      Plat Fw Auth Extension name ADSP vcn 0x0 bitmap 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 svn 0x0
17
18      Other Extension type 0x50534441 length 0x5b000
19
20    cavs0015.met (ADSP Metadata File Extension) ver 0x0 base offset 0x2000 limit offset 0x5cb80
21      IMR type 0x3
22      Attributes
23        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
24
25    cavs0015
26
27  cavs0015 (ADSP Manifest) name ADSPFW build ver 1.5.0.1 feature mask 0x1ff image flags 0x0
28    HW buffers base address 0x0 length 0x0
29    Load offset 0x30000
30
31Intel Cannonlake
32  imr                                 0xb0000000 (8192 + 136579200  0.01% used)
33    BRNGUP.text                         0xb0038000 (4096)
34    BRNGUP.rodata                       0xb0039000 (4096)
35  l2 hpsram                           0xbe000000 (999424 + 2146304  31.77% used)
36    BASEFW.text                         0xbe00c000 (184320)
37    BASEFW.rodata                       0xbe039000 (147456)
38    BASEFW.bss                          0xbe05d000 (667648)
39  l2 lpsram                           0xbe800000 (65536)
Code Block 13 Example of “verbose” mode.
 1$ python ./sof_ri_info.py --no_colors -v sof-cnl.ri
 2Reading SOF ri image sof-cnl.ri
 3File size 0x5b000 (372736)
 40x0     Looking for Extended Manifest
 50x0     info: Extended Manifest not found (sig = $CPD)
 60x0     Looking for CSE Manifest
 70x0     CSE Manifest ($CPD)
 80x8     # of entries 3
 90x10    Looking for CSE Manifest entry
100x28    CSE Entry name ADSP.man length 888
110x58    Parsing CSS Manifest
120x58    CSS Manifest type 4
130x58    Parsing CSS Manifest type 4
140x2dc   Parsing CSS Manifest extensions end 0x3d0
150x2e0   Reading extension type 0xf
160x350   Reading extension type 0x50534441
170x28    Looking for CSE Manifest entry
180x40    CSE Entry name cavs0015.met length 96
190x40    Looking for CSE Manifest entry
200x58    CSE Entry name cavs0015 length 371584
210x2000  ADSP Manifest ($AM1)
220x2034  Module Entry signature found ($AME)
230x20a8  Module Entry signature found ($AME)
24Parsing finished
25SOF Binary sof-cnl.ri size 0x5b000
26
27
28  CSE Manifest ver 0x101 checksum 0xf1 partition name ADSP
29
30    ADSP.man (CSS Manifest) type 0x4 ver 0x10000 date 2020/07/16
31      Rsvd0 0x0
32      Modulus size (dwords) 64
33        85 00 e1 68 aa eb d2 07 ... 5a 96 28 27 19 af 43 b9 (Community key)
34      Exponent size (dwords) 1
35        01 00 01 00
36      Signature
37        86 67 47 b1 d5 00 7a e9 ... f5 30 10 9c 56 16 f1 90
38
39      Plat Fw Auth Extension name ADSP vcn 0x0 bitmap 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 svn 0x0
40
41      Other Extension type 0x50534441 length 0x5b000
42
43    cavs0015.met (ADSP Metadata File Extension) ver 0x0 base offset 0x2000 limit offset 0x5cb80
44      IMR type 0x3
45      Attributes
46        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
47
48    cavs0015
49
50  cavs0015 (ADSP Manifest) name ADSPFW build ver 1.5.0.1 feature mask 0x1ff image flags 0x0
51    HW buffers base address 0x0 length 0x0
52    Load offset 0x30000
53
54    BRNGUP    2b79e4f3-4675-f649-89df-3bc194a91aeb
55      entry point 0xb0038000 type 0x21 ( loadable LL )
56      cfg offset 0 count 0 affinity 0x3 instance max count 1 stack size 0x1
57      .text   0xb0038000 file offset 0x8000 flags 0x1001f ( contents alloc load readonly code type=0 pages=1 )
58      .rodata 0xb0039000 file offset 0x9000 flags 0x1012f ( contents alloc load readonly data type=1 pages=1 )
59      .bss    0x0 file offset 0x0 flags 0xf00 ( type=15 pages=0 )
60
61    BASEFW    0e398c32-5ade-ba4b-93b1-c50432280ee4
62      entry point 0xbe00c400 type 0x21 ( loadable LL )
63      cfg offset 0 count 0 affinity 0x3 instance max count 1 stack size 0x1
64      .text   0xbe00c000 file offset 0xa000 flags 0x2d001f ( contents alloc load readonly code type=0 pages=45 )
65      .rodata 0xbe039000 file offset 0x37000 flags 0x24012f ( contents alloc load readonly data type=1 pages=36 )
66      .bss    0xbe05d000 file offset 0x0 flags 0xa30202 ( alloc type=2 pages=163 )
67
68Intel Cannonlake
69  imr                                 0xb0000000 (8192 + 136579200  0.01% used)
70    BRNGUP.text                         0xb0038000 (4096)
71    BRNGUP.rodata                       0xb0039000 (4096)
72  l2 hpsram                           0xbe000000 (999424 + 2146304  31.77% used)
73    BASEFW.text                         0xbe00c000 (184320)
74    BASEFW.rodata                       0xbe039000 (147456)
75    BASEFW.bss                          0xbe05d000 (667648)
76  l2 lpsram                           0xbe800000 (65536)
Code Block 14 Example of “full bytes” mode - complete content of relevant binary objects is printed out.
 1$ python ./sof_ri_info.py --no_colors --full_bytes sof-cnl.ri
 2SOF Binary sof-cnl.ri size 0x5b000
 3
 4
 5  CSE Manifest ver 0x101 checksum 0xf1 partition name ADSP
 6
 7    ADSP.man (CSS Manifest) type 0x4 ver 0x10000 date 2020/07/16
 8      Rsvd0 0x0
 9      Modulus size (dwords) 64
10        85 00 e1 68 aa eb d2 07 1b 7c 5e ed d6 e7 e5 f9 c1 0e 47 d4 4c ab 8c f0 e8 ee 8b 40 36 35 58 8f f4 6f fc fd 0f dd 55 8b 45 8c f0 47 dc b4 ac 21 3b 4b 20 e6 81 b3 cc 90 d4 5e f1 a4 9b 68 52 c8 f1 2d f9 c4 77 c6 4d a9 90 c7 10 fd 43 c8 4b 6b 23 5e 92 f5 8f ac d5 7d 60 27 36 7c 21 4e 21 99 de cb c0 45 f3 04 22 b8 7d 16 68 40 f9 5c f0 b9 7e 8c 05 b6 fc 28 bb 3d d8 ff b6 a4 d4 54 27 3b 1a 42 4e f5 a6 a8 5e 44 e2 9e ed 68 6a 27 60 13 8d 2f 27 70 cd 57 c9 18 a3 b0 30 a1 f4 e6 32 12 89 2a af 40 a5 fd 52 f1 aa 8a a4 ef 20 3d 10 a3 70 f2 39 c5 05 99 22 10 81 83 6e 45 a4 f3 5a 9d 6a b8 88 fe 69 40 d1 b1 cb 2a db 28 05 de 54 bf 3d 86 5f 39 8b c1 f4 af 00 61 86 01 fa 22 ac f6 2c a4 17 6a a7 d8 0a 8c 9f bf 1f 62 b2 2e 68 52 3f 82 8f e5 28 4d db b5 5a 96 28 27 19 af 43 b9
11      Exponent size (dwords) 1
12        01 00 01 00
13      Signature
14        86 67 47 b1 d5 00 7a e9 11 61 47 3a aa fe d1 df a2 9a 52 56 d6 fc 1a 4c 01 2d a0 cf 92 2e 14 3e 0b 60 29 4e 1e 42 f5 29 ba a2 57 da 73 54 f1 be 75 63 cb 41 c5 8f 8a ec 98 5b 49 61 19 c3 a9 5b e6 d6 6b 72 2e 8c 5c 30 af f6 9b 33 50 6f 3b 44 cc 82 90 a6 bc 09 38 75 99 d8 81 e0 42 e2 9d bb ad 6c 8a 0c e9 bb 06 d3 c7 d1 25 82 24 07 b8 10 3d 53 ca 3b 1d 82 f3 55 97 39 1f ad 25 7a dc 1b 8d 85 bb 54 6f 15 3f ed e0 a6 3e 18 20 d9 15 69 0e da b7 b5 f3 d7 8c 56 ad 8b be 7a dc 2f ba 33 59 a0 95 f4 b3 42 db c5 77 4a d0 f3 3c d0 39 47 54 0e 58 87 6b 50 b0 22 6d 78 bd d8 62 7b 04 24 95 e6 00 49 72 c6 bc fb 13 03 1c 3e 95 e2 51 da 83 30 6d 49 19 76 a2 7b 28 68 d9 97 32 85 c3 e7 f6 b4 f1 13 a6 c2 27 a1 a2 fc c0 9b a9 1a 62 9b dd 3f c5 81 6a 70 a5 3f f5 30 10 9c 56 16 f1 90
15
16      Plat Fw Auth Extension name ADSP vcn 0x0 bitmap 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 svn 0x0
17
18      Other Extension type 0x50534441 length 0x5b000
19
20    cavs0015.met (ADSP Metadata File Extension) ver 0x0 base offset 0x2000 limit offset 0x5cb80
21      IMR type 0x3
22      Attributes
23        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
24
25    cavs0015
26
27  cavs0015 (ADSP Manifest) name ADSPFW build ver 1.5.0.1 feature mask 0x1ff image flags 0x0
28    HW buffers base address 0x0 length 0x0
29    Load offset 0x30000
30
31    BRNGUP    2b79e4f3-4675-f649-89df-3bc194a91aeb
32      entry point 0xb0038000 type 0x21 ( loadable LL )
33      cfg offset 0 count 0 affinity 0x3 instance max count 1 stack size 0x1
34      .text   0xb0038000 file offset 0x8000 flags 0x1001f ( contents alloc load readonly code type=0 pages=1 )
35      .rodata 0xb0039000 file offset 0x9000 flags 0x1012f ( contents alloc load readonly data type=1 pages=1 )
36      .bss    0x0 file offset 0x0 flags 0xf00 ( type=15 pages=0 )
37
38    BASEFW    0e398c32-5ade-ba4b-93b1-c50432280ee4
39      entry point 0xbe00c400 type 0x21 ( loadable LL )
40      cfg offset 0 count 0 affinity 0x3 instance max count 1 stack size 0x1
41      .text   0xbe00c000 file offset 0xa000 flags 0x2d001f ( contents alloc load readonly code type=0 pages=45 )
42      .rodata 0xbe039000 file offset 0x37000 flags 0x24012f ( contents alloc load readonly data type=1 pages=36 )
43      .bss    0xbe05d000 file offset 0x0 flags 0xa30202 ( alloc type=2 pages=163 )
44
45Intel Cannonlake
46  imr                                 0xb0000000 (8192 + 136579200  0.01% used)
47    BRNGUP.text                         0xb0038000 (4096)
48    BRNGUP.rodata                       0xb0039000 (4096)
49  l2 hpsram                           0xbe000000 (999424 + 2146304  31.77% used)
50    BASEFW.text                         0xbe00c000 (184320)
51    BASEFW.rodata                       0xbe039000 (147456)
52    BASEFW.bss                          0xbe05d000 (667648)
53  l2 lpsram                           0xbe800000 (65536)