pci: Add a helper to set the BAR type

A BAR can be three different types: IO, 32 bits Memory, or 64 bits
Memory. The VMM needs a way to set the right type depending on its
needs.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2019-07-17 12:13:20 -07:00
parent ee39e46568
commit 185b1082fb

View File

@ -632,6 +632,11 @@ impl PciBarConfiguration {
pub fn get_size(&self) -> u64 {
self.size
}
pub fn set_region_type(mut self, region_type: PciBarRegionType) -> Self {
self.region_type = region_type;
self
}
}
#[cfg(test)]