dbs_boot/lib.rs
1// Copyright 2021-2022 Alibaba Cloud. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#![deny(missing_docs)]
5
6//! Constants, Structs and Utilities to setup boot environment for virtual machines.
7
8#[cfg(target_arch = "x86_64")]
9mod x86_64;
10#[cfg(target_arch = "x86_64")]
11pub use x86_64::*;
12
13#[cfg(target_arch = "aarch64")]
14mod aarch64;
15#[cfg(target_arch = "aarch64")]
16pub use aarch64::*;
17
18/// Specialized [std::result::Result] for boot related operations.
19pub type Result<T> = std::result::Result<T, Error>;
20
21/// Type for passing information about the initrd in the guest memory.
22pub struct InitrdConfig {
23 /// Load address of initrd in guest memory
24 pub address: vm_memory::GuestAddress,
25 /// Size of initrd in guest memory
26 pub size: usize,
27}