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