mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-04 22:47:00 +00:00
1. add misc.py to get systemd ram and root device 2. add more specify comments for arguments of functions v1-v2: typo: Parser -> Parse some grammar check v2-v3: add the message for Cx state Tracked-On: #3602 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Terry Zou <terry.zou@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
23 lines
604 B
Python
23 lines
604 B
Python
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
import parser_lib
|
|
|
|
CMDS = {
|
|
'PCI_DEVICE':"lspci -vv",
|
|
'PCI_VID_PID':"lspci -n",
|
|
}
|
|
|
|
|
|
def generate_info(board_info):
|
|
"""Get the pci info
|
|
:param board_info: this is the file which stores the hardware board information
|
|
"""
|
|
with open(board_info, 'a+') as config:
|
|
parser_lib.dump_execute(CMDS['PCI_DEVICE'], 'PCI_DEVICE', config)
|
|
print("", file=config)
|
|
parser_lib.dump_execute(CMDS['PCI_VID_PID'], 'PCI_VID_PID', config)
|
|
print("", file=config)
|