Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions common/log_parser/acs_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,27 @@ def get_bmc_firmware_version(ipmitool_log_path):
value = extract_bmc_firmware_from_ipmitool_log(ipmitool_log_path)
return value if value else "Unknown"

def get_psci_version(psci_kernel_log_path):
"""Return PSCI version from kernel log or Unknown if missing."""
if not psci_kernel_log_path or not os.path.isfile(psci_kernel_log_path):
return "Unknown"

version_re = re.compile(r"psci:\s+PSCIv([\d.]+)\s+detected in firmware\.", re.IGNORECASE)
with open(psci_kernel_log_path, "r", errors="replace") as f:
for raw in f:
match = version_re.search(raw.strip())
if match:
return f"PSCI v{match.group(1)}"
return "Unknown"

def is_systemready_band(acs_conf):
# Return True only for SystemReady (not DeviceTree) band.
band_val = (acs_conf or {}).get("Band", "").strip().lower()
return band_val == "systemready band"

def is_systemready_dt_band(acs_conf):
band_val = (acs_conf or {}).get("Band", "").strip().lower()
return band_val == "systemready devicetree band"


def main():
Expand All @@ -167,6 +183,7 @@ def main():
parser.add_argument("--dmidecode_log", default=".", help="Path to dmidecode log")
parser.add_argument("--output_dir", default=".", help="Directory where acs_info.txt and acs_info.json will be created.")
parser.add_argument("--ipmitool_log", default="", help="Path to ipmitool mc info log for BMC firmware extraction")
parser.add_argument("--psci_kernel_log", default="", help="Path to psci_kernel.log for PSCI version extraction")
args = parser.parse_args()

# Gather system info from dmidecode
Expand All @@ -187,6 +204,8 @@ def main():
uefi_ver = get_uefi_version(args.uefi_version_log)
if uefi_ver != 'Unknown':
system_info['UEFI Version'] = uefi_ver
if is_systemready_dt_band(acs_conf):
system_info['PSCI version'] = get_psci_version(args.psci_kernel_log)
if is_systemready_band(acs_conf):
system_info['BMC Firmware Version'] = get_bmc_firmware_version(args.ipmitool_log)

Expand Down
2 changes: 2 additions & 0 deletions common/log_parser/generate_acs_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,8 @@ def generate_html(system_info, acs_results_summary,
acs_info_system = read_acs_info_system_info(args.acs_info_json)
if isinstance(acs_info_system, dict) and "BMC Firmware Version" in acs_info_system:
system_info["BMC Firmware Version"] = acs_info_system.get("BMC Firmware Version", "N/A")
if isinstance(acs_info_system, dict) and "PSCI version" in acs_info_system:
system_info["PSCI version"] = acs_info_system.get("PSCI version", "Unknown")

# 4) Extract summary date from system_info
summary_generated_date = system_info.pop('Summary Generated On Date/time', 'Unknown')
Expand Down
2 changes: 2 additions & 0 deletions common/log_parser/main_log_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ mkdir -p "$JSONS_DIR"

#echo "Gathering ACS info into acs_info.txt and acs_info.json..."
IPMITOOL_LOG="$LOGS_PATH/linux_dump/ipmitool.txt"
PSCI_KERNEL_LOG="$LOGS_PATH/linux_tools/psci/psci_kernel.log"
python3 "$SCRIPTS_PATH/acs_info.py" \
--acs_config_path "$ACS_CONFIG_PATH" \
--system_config_path "$SYSTEM_CONFIG_PATH" \
--uefi_version_log "$LOGS_PATH/uefi_dump/uefi_version.log" \
--dmidecode_log "$LOGS_PATH/linux_dump/dmidecode.txt" \
--ipmitool_log "$IPMITOOL_LOG" \
--psci_kernel_log "$PSCI_KERNEL_LOG" \
--output_dir "$JSONS_DIR"
echo ""
printf "Test category: %s\n\n" "$test_category"
Expand Down
6 changes: 5 additions & 1 deletion common/tools/acs-results-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,9 @@
"PFDI version": {
"type": "string"
},
"PSCI version": {
"type": "string"
},
"product website": {
"type": "string"
},
Expand Down Expand Up @@ -1276,7 +1279,8 @@
"SCMI version",
"Device Tree Version",
"EBBR version",
"PFDI version"
"PFDI version",
"PSCI version"
]
}
},
Expand Down
Loading