Skip to content

Commit d3a8906

Browse files
committed
doc: add boot protocol page for cpu templates
Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 0aec0e4 commit d3a8906

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Boot protocol register settings
2+
3+
Firecracker makes certain modifications to the guest's registers
4+
regardless of whether a CPU template is used to comply with the boot protocol.
5+
If a CPU template is used the boot protocol settings are performed _after_ the
6+
CPU template is applied. That means that if the CPU template configures CPUID
7+
bits used in the boot protocol settings, they will be overwritten.
8+
9+
See also: [CPUID normalization](cpuid-normalization.md)
10+
11+
## Boot protocol MSRs (x86_64 only)
12+
13+
On x86_64, the following MSRs are set to `0`:
14+
15+
- MSR_IA32_SYSENTER_CS
16+
- MSR_IA32_SYSENTER_ESP
17+
- MSR_IA32_SYSENTER_EIP
18+
- MSR_STAR
19+
- MSR_CSTAR
20+
- MSR_KERNEL_GS_BASE
21+
- MSR_SYSCALL_MASK
22+
- MSR_LSTAR
23+
- MSR_IA32_TSC
24+
25+
and MSR_IA32_MISC_ENABLE is set to `1`.
26+
27+
## Boot protocol ARM registers (aarch64 only)
28+
29+
On aarch64, the following registers are set:
30+
31+
- PSTATE to PSR_MODE_EL1h | PSR_A_BIT | PSR_F_BIT | PSR_I_BIT | PSR_D_BIT
32+
- PC to kernel load address (vCPU0 only)
33+
- X0 to DTB/FDT address (vCPU0 only)

0 commit comments

Comments
 (0)