Пример #1
0
def gen_acpi_info(config):
    """This will parser the sys node form SYS_PATH and generate ACPI info
    :param config: file pointer that opened for writing board config information
    """
    read_pm_sstate(SYS_PATH[1] + 'FACP', config)

    print("{0}".format("\t<S3_INFO>"), file=config)
    read_pm_sdata(SYS_PATH[1] + 'DSDT', '_S3_', config)
    print("{0}".format("\t</S3_INFO>\n"), file=config)

    print("{0}".format("\t<S5_INFO>"), file=config)
    read_pm_sdata(SYS_PATH[1] + 'DSDT', '_S5_', config)
    print("{0}".format("\t</S5_INFO>\n"), file=config)

    print("{0}".format("\t<DRHD_INFO>"), file=config)
    dmar.write_dmar_data(SYS_PATH[1] + 'DMAR', config)
    print("{0}".format("\t</DRHD_INFO>\n"), file=config)

    print("{0}".format("\t<CPU_BRAND>"), file=config)
    store_cpu_info(SYS_PATH[0], config)
    print("{0}".format("\t</CPU_BRAND>\n"), file=config)

    print("{0}".format("\t<CX_INFO>"), file=config)
    store_cx_data(SYS_PATH[2] + 'cpuidle/current_driver',
                  SYS_PATH[2] + 'cpu0/cpuidle/', config)
    print("{0}".format("\t</CX_INFO>\n"), file=config)

    print("{0}".format("\t<PX_INFO>"), file=config)
    store_px_data(SYS_PATH[2], config)
    print("{0}".format("\t</PX_INFO>\n"), file=config)
Пример #2
0
def gen_acpi_info(board_fp):
    """This will parser the sys node form SYS_PATH and generate ACPI info"""
    read_pm_sstate(SYS_PATH[1] + 'FACP', board_fp)

    print("{0}".format("\t<S3_INFO>"), file=board_fp)
    read_pm_sdata(SYS_PATH[1] + 'DSDT', '_S3_', board_fp)
    print("{0}".format("\t</S3_INFO>\n"), file=board_fp)

    print("{0}".format("\t<S5_INFO>"), file=board_fp)
    read_pm_sdata(SYS_PATH[1] + 'DSDT', '_S5_', board_fp)
    print("{0}".format("\t</S5_INFO>\n"), file=board_fp)

    print("{0}".format("\t<DRHD_INFO>"), file=board_fp)
    dmar.write_dmar_data(SYS_PATH[1] + 'DMAR', board_fp)
    print("{0}".format("\t</DRHD_INFO>\n"), file=board_fp)

    print("{0}".format("\t<CPU_BRAND>"), file=board_fp)
    store_cpu_info(SYS_PATH[0], board_fp)
    print("{0}".format("\t</CPU_BRAND>\n"), file=board_fp)

    print("{0}".format("\t<CX_INFO>"), file=board_fp)
    store_cx_data(SYS_PATH[2]+'cpuidle/current_driver', SYS_PATH[2]+'cpu0/cpuidle/', board_fp)
    print("{0}".format("\t</CX_INFO>\n"), file=board_fp)

    print("{0}".format("\t<PX_INFO>"), file=board_fp)
    store_px_data(SYS_PATH[2], board_fp)
    print("{0}".format("\t</PX_INFO>\n"), file=board_fp)