a0248b09 |
1 | \r |
2 | === HOW TO USE VTF0 ===\r |
3 | \r |
4 | Add this line to your FDF FV section:\r |
5 | INF RuleOverride=RESET_VECTOR USE = IA32 UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.inf\r |
6 | (For X64 SEC/PEI change IA32 to X64 => 'USE = X64')\r |
7 | \r |
8 | In your FDF FFS file rules sections add:\r |
9 | [Rule.Common.SEC.RESET_VECTOR]\r |
10 | FILE RAW = $(NAMED_GUID) {\r |
11 | RAW RAW |.raw\r |
12 | }\r |
13 | \r |
14 | === VTF0 Boot Flow ===\r |
15 | \r |
16 | 1. Transition to IA32 flat mode\r |
17 | 2. Locate BFV (Boot Firmware Volume) by checking every 4kb boundary\r |
18 | 3. Locate SEC image\r |
19 | 4. X64 VTF0 transitions to X64 mode\r |
20 | 5. Call SEC image entry point\r |
21 | \r |
22 | == VTF0 SEC input parameters ==\r |
23 | \r |
24 | All inputs to SEC image are register based:\r |
25 | EAX/RAX - Initial value of the EAX register (BIST: Built-in Self Test)\r |
26 | DI - 'BP': boot-strap processor, or 'AP': application processor\r |
27 | EBP/RBP - Pointer to the start of the Boot Firmware Volume\r |
28 | \r |
29 | === HOW TO BUILD VTF0 ===\r |
30 | \r |
31 | Dependencies:\r |
32 | * Python 2.5~2.7\r |
33 | * Nasm with x86-64 support\r |
34 | \r |
35 | To rebuild the VTF0 binaries:\r |
36 | 1. Change to VTF0 source dir: UefiCpuPkg/ResetVector/Vtf0\r |
37 | 2. nasm and python should be in executable path\r |
38 | 3. Run this command:\r |
39 | python Build.py\r |
40 | 4. Binaries output will be in UefiCpuPkg/ResetVector/Vtf0/Bin\r |
41 | \r |