Skip to content

Commit

Permalink
Prototype function for reading init process from disk
Browse files Browse the repository at this point in the history
  • Loading branch information
kennystrawnmusic authored Aug 27, 2022
1 parent 9e79168 commit a64ae80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ pub fn printk_init(buffer: &'static mut [u8], info: ModeInfo) {
info!("CryptOS v. 0.1.0");
}

pub fn read_init_from_disk(blkdev: &mut BlockIOMedia) -> ElfFile<'static> {
todo!()
}

pub static SYSTEM_TABLE_ADDR: Mutex<Option<u64>> = Mutex::new(None);

pub fn get_current_system_table<View: SystemTableView>() -> &'static SystemTable<View> {
Expand Down Expand Up @@ -132,8 +136,7 @@ fn maink(image: Handle, mut table: SystemTable<Boot>) -> Status {
let bio = unsafe { table.boot_services().locate_protocol::<BlockIO>()? };
let bio = unsafe { &mut *bio.get() };

let bio_media_addr = bio.media() as *const _ as usize;
let init_proc = todo!();
let _bio_media_addr = bio.media() as *const _ as usize;

// TODO: try freeing pool manually and remapping it as CONVENTIONAL before exiting boot services to see if that makes a difference
// shadow the boot table with the runtime table so access can't be attempted after boot services are exited
Expand Down

0 comments on commit a64ae80

Please sign in to comment.