morpheus_network/boot/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! Boot integration module.
//!
//! Handles the transition from UEFI boot services to bare metal.
//!
//! # Two-Phase Boot Model
//!
//! ## Phase 1: UEFI Boot Services Active
//! - Calibrate TSC using UEFI Stall()
//! - Allocate DMA region via PCI I/O Protocol
//! - Scan PCI for NIC and block devices
//! - Populate BootHandoff structure
//! - Call ExitBootServices()
//!
//! ## Phase 2: Bare Metal (Post-EBS)
//! - Validate BootHandoff
//! - Initialize NIC driver
//! - Initialize block device driver (optional)
//! - Enter main poll loop
//!
//! # Reference
//! NETWORK_IMPL_GUIDE.md ยง7

pub mod handoff;
pub mod init;

// Re-exports
pub use handoff::{
    has_invariant_tsc, read_tsc_raw, BootHandoff, HandoffError, TscCalibration, BLK_TYPE_AHCI,
    BLK_TYPE_NONE, BLK_TYPE_NVME, BLK_TYPE_VIRTIO, HANDOFF_MAGIC, HANDOFF_VERSION,
    NIC_TYPE_BROADCOM, NIC_TYPE_INTEL, NIC_TYPE_NONE, NIC_TYPE_REALTEK, NIC_TYPE_VIRTIO,
};

pub use init::{post_ebs_init, InitError, InitResult, TimeoutConfig};