Skip to content

Make the inner value of PciAddress public #38

@alexkingnz

Description

@alexkingnz

I'm not sure the reason the inner value is private. I am writing a concrete type for ConfigRegionAccess using PCI Configuration Space Access Mechanism 1, and the inner type is already the correct configuration, I just need to mask out the segment and shift it...

Else I've got to extract bits using bus, device and function methods; then check bounds and re-pack them back into the same format as they are already in.

Making this field public would meet my needs admirably.

(Another idea would be to have a pub fn (&self, offset: u16) -> Option<u32> method, where the u32 is a Configuration Space Access Mechanism 1 address. (https://wiki.osdev.org/PCI#Configuration_Space_Access_Mechanism_#1) Even better if there is a type for that.)

Let me know if you'd like a PR for this.

Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions