Skip to content

Commit 7b3fca5

Browse files
(feat):add PSCI version reporting in DT system info
-extract PSCI version from linux_tools/psci/psci_kernel.log during ACS info generation -add DT band detection from acs_config Band field to include PSCI version only for SystemReady Devicetree band -pass psci_kernel.log path from main_log_parser.sh into acs_info.py -propagate PSCI version from acs_info.json into the generated ACS summary system information -update ACS results schema to allow and require PSCI version for SystemReady Devicetree band system info Signed-off-by: Ashish Sharma ashish.sharma2@arm.com Change-Id: I3462ef37e6c2f53886cf9f18efcb79da5d5e41e5
1 parent b698515 commit 7b3fca5

4 files changed

Lines changed: 28 additions & 1 deletion

File tree

common/log_parser/acs_info.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,27 @@ def get_bmc_firmware_version(ipmitool_log_path):
149149
value = extract_bmc_firmware_from_ipmitool_log(ipmitool_log_path)
150150
return value if value else "Unknown"
151151

152+
def get_psci_version(psci_kernel_log_path):
153+
"""Return PSCI version from kernel log or Unknown if missing."""
154+
if not psci_kernel_log_path or not os.path.isfile(psci_kernel_log_path):
155+
return "Unknown"
156+
157+
version_re = re.compile(r"psci:\s+PSCIv([\d.]+)\s+detected in firmware\.", re.IGNORECASE)
158+
with open(psci_kernel_log_path, "r", errors="replace") as f:
159+
for raw in f:
160+
match = version_re.search(raw.strip())
161+
if match:
162+
return f"PSCI v{match.group(1)}"
163+
return "Unknown"
164+
152165
def is_systemready_band(acs_conf):
153166
# Return True only for SystemReady (not DeviceTree) band.
154167
band_val = (acs_conf or {}).get("Band", "").strip().lower()
155168
return band_val == "systemready band"
156169

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

158174

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

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

common/log_parser/generate_acs_summary.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,8 @@ def generate_html(system_info, acs_results_summary,
959959
acs_info_system = read_acs_info_system_info(args.acs_info_json)
960960
if isinstance(acs_info_system, dict) and "BMC Firmware Version" in acs_info_system:
961961
system_info["BMC Firmware Version"] = acs_info_system.get("BMC Firmware Version", "N/A")
962+
if isinstance(acs_info_system, dict) and "PSCI version" in acs_info_system:
963+
system_info["PSCI version"] = acs_info_system.get("PSCI version", "Unknown")
962964

963965
# 4) Extract summary date from system_info
964966
summary_generated_date = system_info.pop('Summary Generated On Date/time', 'Unknown')

common/log_parser/main_log_parser.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ mkdir -p "$JSONS_DIR"
8282

8383
#echo "Gathering ACS info into acs_info.txt and acs_info.json..."
8484
IPMITOOL_LOG="$LOGS_PATH/linux_dump/ipmitool.txt"
85+
PSCI_KERNEL_LOG="$LOGS_PATH/linux_tools/psci/psci_kernel.log"
8586
python3 "$SCRIPTS_PATH/acs_info.py" \
8687
--acs_config_path "$ACS_CONFIG_PATH" \
8788
--system_config_path "$SYSTEM_CONFIG_PATH" \
8889
--uefi_version_log "$LOGS_PATH/uefi_dump/uefi_version.log" \
8990
--dmidecode_log "$LOGS_PATH/linux_dump/dmidecode.txt" \
9091
--ipmitool_log "$IPMITOOL_LOG" \
92+
--psci_kernel_log "$PSCI_KERNEL_LOG" \
9193
--output_dir "$JSONS_DIR"
9294
echo ""
9395
printf "Test category: %s\n\n" "$test_category"

common/tools/acs-results-schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@
12211221
"PFDI version": {
12221222
"type": "string"
12231223
},
1224+
"PSCI version": {
1225+
"type": "string"
1226+
},
12241227
"product website": {
12251228
"type": "string"
12261229
},
@@ -1276,7 +1279,8 @@
12761279
"SCMI version",
12771280
"Device Tree Version",
12781281
"EBBR version",
1279-
"PFDI version"
1282+
"PFDI version",
1283+
"PSCI version"
12801284
]
12811285
}
12821286
},

0 commit comments

Comments
 (0)