From 38a8ae6e20f339e2ff46aefe75ab72e516101d2d Mon Sep 17 00:00:00 2001 From: Able Date: Fri, 18 Feb 2022 02:24:10 -0600 Subject: [PATCH] pci work --- ableos/Cargo.toml | 9 ++++++++- ableos/src/scratchpad.rs | 15 +++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ableos/Cargo.toml b/ableos/Cargo.toml index 4a6072c..ecfd00f 100644 --- a/ableos/Cargo.toml +++ b/ableos/Cargo.toml @@ -33,7 +33,14 @@ run-args = [ # A simple example of a boot image "-drive", "file=disk.qcow2,if=none,id=drive0", - + + + + + "-device", +"virtio-rng", + + "-qmp", "unix:../qmp-sock,server,nowait" diff --git a/ableos/src/scratchpad.rs b/ableos/src/scratchpad.rs index 36300c4..c0e7a60 100644 --- a/ableos/src/scratchpad.rs +++ b/ableos/src/scratchpad.rs @@ -24,16 +24,19 @@ pub fn scratchpad() { for x in dev_list { let device_name = format!("{:?}-{}", DeviceClass::from_u8(x.id.class), x.id.device_id); - device_table.devices.insert(device_name, Device::Pci(x)); - } - - for (key, _value) in device_table.devices.iter() { - debug!("{}", key); + device_table + .devices + .insert(device_name.clone(), Device::Pci(x)); } + /* + for (key, _value) in device_table.devices.iter() { + debug!("{}", key); + } + */ // interp(); - rhai_shell(); + // rhai_shell(); } pub struct PciIO {}