def test_rsdp(): data = acpi.get_table("RSD PTR ") if data is None: return # Checksum the first 20 bytes per ACPI 1.0 csum = sum(ord(c) for c in data[:20]) % 0x100 testsuite.test('ACPI 1.0 table first 20 bytes cummulative checksum must equal 0', csum == 0) testsuite.print_detail("Cummulative checksum = {} (Expected 0)".format(csum)) test_table_checksum(data) rsdp = acpi.parse_rsdp()
def test_rsdp(): data = acpi.get_table("RSD PTR ") if data is None: return # Checksum the first 20 bytes per ACPI 1.0 csum = sum(ord(c) for c in data[:20]) % 0x100 testsuite.test('ACPI 1.0 table first 20 bytes cummulative checksum must equal 0', csum == 0) testsuite.print_detail("Cummulative checksum = {} (Expected 0)".format(csum)) test_table_checksum(data) rsdp = acpi.RSDP(data)
def test_xsdt(): data = acpi.get_table("XSDT") if data is None: return test_table_checksum(data) xsdt = acpi.XSDT(data)
def test_mpst(): data = acpi.get_table("MPST") if data is None: return test_table_checksum(data) mpst = acpi.MPST(data)
def test_hpet(): data = acpi.get_table("HPET") if data is None: return test_table_checksum(data) hpet = acpi.HPET(data)
def test_facp(): data = acpi.get_table("FACP") if data is None: return test_table_checksum(data) facp = acpi.FACP(data)
def test_dsdt(): data = acpi.get_table("DSDT") if data is None: return test_table_checksum(data)
def test_apic(): data = acpi.get_table("APIC") if data is None: return test_table_checksum(data) apic = acpi.APIC(data)
def test_xsdt(): data = acpi.get_table("XSDT") if data is None: return test_table_checksum(data) xsdt = acpi.parse_xsdt()
def test_hpet(): data = acpi.get_table("HPET") if data is None: return test_table_checksum(data) hpet = acpi.parse_hpet()
def test_facp(): data = acpi.get_table("FACP") if data is None: return test_table_checksum(data) facp = acpi.parse_facp()
def test_apic(): data = acpi.get_table("APIC") if data is None: return test_table_checksum(data) apic = acpi.parse_apic()