[Denali] Begin porting to rust.
This commit is contained in:
parent
72e5d8c618
commit
51478e7ccf
12 changed files with 110 additions and 16 deletions
29
rust/sys/denali/src/bin/denali.rs
Normal file
29
rust/sys/denali/src/bin/denali.rs
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue