mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 19:32:20 +00:00
acpi_tables: aml: Implement Aml::append_aml_bytes() for Memory32Fixed
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
4f496e39a1
commit
3c00a696b5
@ -354,15 +354,13 @@ impl Memory32Fixed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Aml for Memory32Fixed {
|
impl Aml for Memory32Fixed {
|
||||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
|
||||||
let mut bytes = vec![0x86]; /* Memory32Fixed */
|
bytes.push(0x86); /* Memory32Fixed */
|
||||||
bytes.append(&mut 9u16.to_le_bytes().to_vec());
|
bytes.append(&mut 9u16.to_le_bytes().to_vec());
|
||||||
|
|
||||||
// 9 bytes of payload
|
// 9 bytes of payload
|
||||||
bytes.push(self.read_write as u8);
|
bytes.push(self.read_write as u8);
|
||||||
bytes.append(&mut self.base.to_le_bytes().to_vec());
|
bytes.append(&mut self.base.to_le_bytes().to_vec());
|
||||||
bytes.append(&mut self.length.to_le_bytes().to_vec());
|
bytes.append(&mut self.length.to_le_bytes().to_vec());
|
||||||
bytes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user