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 thiserror::Error;
12use vm_topology::processor::aarch64::Aarch64VpInfo;
13
14/// VP state that can be set for initial boot.
15#[derive(Debug, PartialEq, Eq, Protobuf)]
16pub struct Aarch64InitialRegs {
17    /// Register state to be set on the BSP.
18    pub registers: vp::Registers,
19    /// System register state for the BSP.
20    pub system_registers: vp::SystemRegisters,
21}
22
23impl Aarch64InitialRegs {
24    pub fn at_reset(caps: &Aarch64PartitionCapabilities, bsp: &Aarch64VpInfo) -> Self {
25        Self {
26            registers: vp::Registers::at_reset(caps, bsp),
27            system_registers: vp::SystemRegisters::at_reset(caps, bsp),
28        }
29    }
30}
31
32#[derive(Debug, Inspect)]
33pub struct Aarch64PartitionCapabilities {}
34
35#[derive(Error, Debug)]
36pub enum Aarch64PartitionCapabilitiesError {}