virt\aarch64/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4pub mod gic_software_device;
5pub mod vm;
6pub mod vp;
7
8use crate::state::StateElement;
9use inspect::Inspect;
10use mesh_protobuf::Protobuf;
11use vm_topology::processor::aarch64::Aarch64VpInfo;
12
13/// VP state that can be set for initial boot.
14#[derive(Debug, PartialEq, Eq, Protobuf)]
15pub struct Aarch64InitialRegs {
16    /// Register state to be set on the BSP.
17    pub registers: vp::Registers,
18    /// System register state for the BSP.
19    pub system_registers: vp::SystemRegisters,
20}
21
22impl Aarch64InitialRegs {
23    pub fn at_reset(caps: &Aarch64PartitionCapabilities, bsp: &Aarch64VpInfo) -> Self {
24        Self {
25            registers: vp::Registers::at_reset(caps, bsp),
26            system_registers: vp::SystemRegisters::at_reset(caps, bsp),
27        }
28    }
29}
30
31#[derive(Debug, Inspect)]
32pub struct Aarch64PartitionCapabilities {}