Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aml: make resource descriptor fields public #228

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions aml/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ pub enum AddressSpaceDecodeType {

#[derive(Debug, PartialEq, Eq)]
pub struct AddressSpaceDescriptor {
resource_type: AddressSpaceResourceType,
is_maximum_address_fixed: bool,
is_minimum_address_fixed: bool,
decode_type: AddressSpaceDecodeType,

granularity: u64,
address_range: (u64, u64),
translation_offset: u64,
length: u64,
pub resource_type: AddressSpaceResourceType,
pub is_maximum_address_fixed: bool,
pub is_minimum_address_fixed: bool,
pub decode_type: AddressSpaceDecodeType,

pub granularity: u64,
pub address_range: (u64, u64),
pub translation_offset: u64,
pub length: u64,
}

#[derive(Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -425,10 +425,10 @@ pub enum DMATransferTypePreference {

#[derive(Debug, PartialEq, Eq)]
pub struct DMADescriptor {
channel_mask: u8,
supported_speeds: DMASupportedSpeed,
is_bus_master: bool,
transfer_type_preference: DMATransferTypePreference,
pub channel_mask: u8,
pub supported_speeds: DMASupportedSpeed,
pub is_bus_master: bool,
pub transfer_type_preference: DMATransferTypePreference,
}

pub fn dma_format_descriptor(bytes: &[u8]) -> Result<Resource, AmlError> {
Expand Down Expand Up @@ -485,10 +485,10 @@ pub fn dma_format_descriptor(bytes: &[u8]) -> Result<Resource, AmlError> {

#[derive(Debug, PartialEq, Eq)]
pub struct IOPortDescriptor {
decodes_full_address: bool,
memory_range: (u16, u16),
base_alignment: u8,
range_length: u8,
pub decodes_full_address: bool,
pub memory_range: (u16, u16),
pub base_alignment: u8,
pub range_length: u8,
}

fn io_port_descriptor(bytes: &[u8]) -> Result<Resource, AmlError> {
Expand Down
Loading