This commit is contained in:
parent
311755c812
commit
c6b1893bb0
30 changed files with 181 additions and 108 deletions
|
|
@ -2,8 +2,7 @@ use alloc::vec::Vec;
|
|||
use mammoth::{cap::Capability, mem::MemoryRegion, syscall, zion::ZError};
|
||||
|
||||
use crate::header::{
|
||||
PciCapabilityPointer, PciDeviceHeader, PciHeaderType, PciMsiCapability, PciMsiControl,
|
||||
get_header_type,
|
||||
PciCapabilityPointer, PciDeviceHeader, PciHeaderType, PciMsiCapability, get_header_type,
|
||||
};
|
||||
|
||||
pub struct PciDevice {
|
||||
|
|
@ -11,7 +10,7 @@ pub struct PciDevice {
|
|||
}
|
||||
|
||||
impl PciDevice {
|
||||
pub fn from(mut memory_region: MemoryRegion) -> Result<Self, ZError> {
|
||||
pub fn from(memory_region: MemoryRegion) -> Result<Self, ZError> {
|
||||
match get_header_type(&memory_region)? {
|
||||
PciHeaderType::Device => {}
|
||||
t => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue