forked from koniifer/ableos
pci work
This commit is contained in:
parent
d4e4d70461
commit
38a8ae6e20
|
@ -33,7 +33,14 @@ run-args = [
|
||||||
# A simple example of a boot image
|
# A simple example of a boot image
|
||||||
"-drive",
|
"-drive",
|
||||||
"file=disk.qcow2,if=none,id=drive0",
|
"file=disk.qcow2,if=none,id=drive0",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"-device",
|
||||||
|
"virtio-rng",
|
||||||
|
|
||||||
|
|
||||||
"-qmp",
|
"-qmp",
|
||||||
"unix:../qmp-sock,server,nowait"
|
"unix:../qmp-sock,server,nowait"
|
||||||
|
|
||||||
|
|
|
@ -24,16 +24,19 @@ pub fn scratchpad() {
|
||||||
for x in dev_list {
|
for x in dev_list {
|
||||||
let device_name = format!("{:?}-{}", DeviceClass::from_u8(x.id.class), x.id.device_id);
|
let device_name = format!("{:?}-{}", DeviceClass::from_u8(x.id.class), x.id.device_id);
|
||||||
|
|
||||||
device_table.devices.insert(device_name, Device::Pci(x));
|
device_table
|
||||||
}
|
.devices
|
||||||
|
.insert(device_name.clone(), Device::Pci(x));
|
||||||
for (key, _value) in device_table.devices.iter() {
|
|
||||||
debug!("{}", key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
for (key, _value) in device_table.devices.iter() {
|
||||||
|
debug!("{}", key);
|
||||||
|
}
|
||||||
|
*/
|
||||||
// interp();
|
// interp();
|
||||||
|
|
||||||
rhai_shell();
|
// rhai_shell();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct PciIO {}
|
pub struct PciIO {}
|
||||||
|
|
Loading…
Reference in a new issue