acpi: Implement SPCR on AArch64

This commit implements an AArch64-required ACPI table: Serial
Port Console Redirection Table (SPCR). The table provides
information about the configuration and use of the serial port
or non-legacy UART interface.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Henry Wang
2021-01-31 14:27:01 +08:00
committed by Sebastien Boeuf
parent 9c5528490e
commit 213da7d862
2 changed files with 81 additions and 6 deletions

View File

@@ -22,6 +22,15 @@ impl GenericAddress {
address: u64::from(address),
}
}
pub fn mmio_address<T>(address: u64) -> Self {
GenericAddress {
address_space_id: 0,
register_bit_width: 8 * std::mem::size_of::<T>() as u8,
register_bit_offset: 0,
access_size: std::mem::size_of::<T>() as u8,
address,
}
}
}
pub struct Sdt {