mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: acpi_tables: Fix PM timer I/O port width
Ensure that the width of the I/O port is correctly set to 32-bits in the generic address used for the X_PM_TMR_BLK. Do this by type parameterising GenericAddress::io_port_address() fuction. TEST=Boot with clocksource=acpi_pm and observe no errors in the dmesg. Fixes: #1496 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
5cad2334dd
commit
9ae44aeada
@@ -13,12 +13,12 @@ pub struct GenericAddress {
|
||||
}
|
||||
|
||||
impl GenericAddress {
|
||||
pub fn io_port_address(address: u16) -> Self {
|
||||
pub fn io_port_address<T>(address: u16) -> Self {
|
||||
GenericAddress {
|
||||
address_space_id: 1,
|
||||
register_bit_width: 8,
|
||||
register_bit_width: 8 * std::mem::size_of::<T>() as u8,
|
||||
register_bit_offset: 0,
|
||||
access_size: 1,
|
||||
access_size: std::mem::size_of::<T>() as u8,
|
||||
address: u64::from(address),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user