cloud-hypervisor/acpi_tables/src/lib.rs
Rob Bradford a4ce596f7b acpi_tables: aml: Add support for generating AML name paths
Root ("\"), single, dual and multi-part names are supported. "^" is not
supported (not widely used.)

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-10-24 10:55:02 +01:00

13 lines
251 B
Rust

// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
pub mod aml;
pub mod rsdp;
pub mod sdt;
fn generate_checksum(data: &[u8]) -> u8 {
(255 - data.iter().fold(0u8, |acc, x| acc.wrapping_add(*x))).wrapping_add(1)
}