]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Tools/UserManuals/SplitFspBinUserManual.md
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2Pkg / Tools / UserManuals / SplitFspBinUserManual.md
1 # SplitFspBin.py is a python script to support some operations on Intel FSP 1.x/2.x image.
2
3 It supports:
4
5 - Split Intel FSP 2.x image into individual FSP-T/M/S/O component
6
7 - Rebase Intel FSP 1.x/2.x components to different base addresses
8
9 - Generate Intel FSP 1.x/2.x C header file
10
11 - Display Intel FSP 1.x/2.x information header for each FSP component
12
13 ## Split Intel FSP 2.x image
14
15 FSP 1.x image is not supported by split command.
16 To split individual FSP component in Intel FSP 2.x image, the following
17 command can be used:
18
19 **python SplitFspBin.py split [-h] -f FSPBINARY [-o OUTPUTDIR] [-n NAMETEMPLATE]**
20
21 For example:
22
23 `python SplitFspBin.py split -f FSP.bin`
24
25 It will create FSP_T.bin, FSP_M.bin and FSP_S.bin in current directory.
26
27 ## Rebase Intel FSP 1.x/2.x components
28
29 To rebase one or multiple FSP components in Intel FSP 1.x/2.x image, the following
30 command can be used:
31
32 **python SplitFspBin.py rebase [-h] -f FSPBINARY -c {t,m,s,o} [{t,m,s,o} ...] -b FSPBASE [FSPBASE ...] [-o OUTPUTDIR] [-n OUTPUTFILE]**
33
34 For example:
35
36 `python SplitFspBin.py rebase -f FSP.bin -c t -b 0xFFF00000 -n FSP_new.bin`
37
38 It will rebase FSP-T component inside FSP.bin to new base 0xFFF00000 and save the
39 rebased Intel FSP 2.x image into file FSP_new.bin.
40 For FSP 1.x image there is only one component in binary so above command also
41 works for FSP 1.x image.
42
43 `python SplitFspBin.py rebase -f FSP.bin -c t m -b 0xFFF00000 0xFEF80000 -n FSP_new.bin`
44
45 It will rebase FSP-T and FSP-M components inside FSP.bin to new base 0xFFF00000
46 and 0xFEF80000 respectively, and save the rebased Intel FSP 2.x image into file
47 FSP_new.bin file.
48
49 ## Generate Intel FSP 1.x/2.x C header file
50
51 To generate Intel FSP 1.x/2.x C header file, the following command can be used:
52
53 **Python SplitFspBin.py genhdr [-h] -f FSPBINARY [-o OUTPUTDIR] [-n HFILENAME]**
54
55 For example:
56
57 `python SplitFspBin.py genhdr -f FSP.bin -n FSP.h`
58
59 It will create the C header file FSP.h containing the image ID, revision, offset
60 and size for each individual FSP component.
61
62 ## Display Intel FSP 1.x/2.x information header
63
64 To display Intel FSP 1.x/2.x information headers, the following command can be used:
65
66 **Python SplitFspBin.py info [-h] -f FSPBINARY**
67
68 For example:
69
70 `python SplitFspBin.py info -f FSP.bin`
71
72 It will print out the FSP information header for each FSP component.