[Denali] Begin porting to rust.

This commit is contained in:
Drew Galbraith 2024-08-30 00:38:15 -07:00
parent 72e5d8c618
commit 51478e7ccf
12 changed files with 110 additions and 16 deletions

View file

@ -0,0 +1,29 @@
#![no_std]
#![no_main]
extern crate alloc;
use mammoth::{define_entry, zion::z_err_t};
use denali::ahci::AhciController;
define_entry!();
#[no_mangle]
extern "C" fn main() -> z_err_t {
mammoth::debug!("IN Denali!");
let yellowstone = yellowstone_yunq::from_init_endpoint();
let ahci_info = yellowstone
.get_ahci_info()
.expect("Failed to get ahci info");
let ahci_controller = AhciController::new(
mammoth::mem::MemoryRegion::from_cap(mammoth::cap::Capability::take(ahci_info.ahci_region))
.unwrap(),
);
mammoth::debug!("AHCI ABAR {:#x}", ahci_controller.pci_header().abar as u64);
0
}