# Definitions of the vendor platform IDs.
use constant {
- HISILICON_KUNPENG_920 => "Kunpeng920",
HISILICON_KUNPENG_9XX => "Kunpeng9xx",
};
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
- # HiSilicon Kunpeng920 errors
- if ($platform_id eq HISILICON_KUNPENG_920) {
+ # HiSilicon Kunpeng9xx errors
+ if ($platform_id eq HISILICON_KUNPENG_9XX) {
$found_platform = 1;
$query = "select err_severity, module_id, count(*) from hip08_oem_type1_event_v2 group by err_severity, module_id";
$query_handle = $dbh->prepare($query);
$out .= "\t$module_id: $count\n";
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 OEM type1 error events summary:\n$out\n";
- } else {
- print "No HiSilicon Kunpeng920 OEM type1 errors.\n\n";
+ print "HiSilicon Kunpeng9xx OEM type1 error events summary:\n$out\n";
}
$query_handle->finish;
$out .= "\t$module_id: $count\n";
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 OEM type2 error events summary:\n$out\n";
- } else {
- print "No HiSilicon Kunpeng920 OEM type2 errors.\n\n";
+ print "HiSilicon Kunpeng9xx OEM type2 error events summary:\n$out\n";
}
$query_handle->finish;
$out .= "\t$sub_module_id: $count\n";
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 PCIe controller error events summary:\n$out\n";
- } else {
- print "No HiSilicon Kunpeng920 PCIe controller errors.\n\n";
+ print "HiSilicon Kunpeng9xx PCIe controller error events summary:\n$out\n";
}
$query_handle->finish;
- }
- # HiSilicon Kunpeng9xx common errors
- if ($platform_id eq HISILICON_KUNPENG_9XX) {
- $found_platform = 1;
$query = "select err_severity, module_id, count(*) from hisi_common_section_v2 group by err_severity, module_id";
$query_handle = $dbh->prepare($query);
$query_handle->execute();
}
if ($out ne "") {
print "HiSilicon Kunpeng9xx common error events summary:\n$out\n";
- } else {
- print "No HiSilicon Kunpeng9xx common errors.\n\n";
}
$query_handle->finish;
}
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
- # HiSilicon Kunpeng920 errors
- if ($platform_id eq HISILICON_KUNPENG_920) {
+ # HiSilicon Kunpeng9xx errors
+ if ($platform_id eq HISILICON_KUNPENG_9XX) {
$found_platform = 1;
$query = "select id, timestamp, version, soc_id, socket_id, nimbus_id, module_id, sub_module_id, err_severity, regs_dump from hip08_oem_type1_event_v2 order by id, module_id, err_severity";
$query_handle = $dbh->prepare($query);
}
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 OEM type1 error events:\n$out\n";
+ print "HiSilicon Kunpeng9xx OEM type1 error events:\n$out\n";
}
$query_handle->finish;
}
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 OEM type2 error events:\n$out\n";
+ print "HiSilicon Kunpeng9xx OEM type2 error events:\n$out\n";
}
$query_handle->finish;
}
}
if ($out ne "") {
- print "HiSilicon Kunpeng920 PCIe controller error events:\n$out\n";
+ print "HiSilicon Kunpeng9xx PCIe controller error events:\n$out\n";
}
$query_handle->finish;
- }
- # HiSilicon Kunpeng9xx common errors
- if ($platform_id eq HISILICON_KUNPENG_9XX) {
- $found_platform = 1;
$query = "select id, timestamp, version, soc_id, socket_id, totem_id, nimbus_id, sub_system_id, module_id, sub_module_id, core_id, port_id, err_type, pcie_info, err_severity, regs_dump from hisi_common_section_v2 order by id, module_id, err_severity";
$query_handle = $dbh->prepare($query);
$query_handle->execute();
}
if ($out ne "") {
print "HiSilicon Kunpeng9xx common error events:\n$out\n";
- } else {
- print "No HiSilicon Kunpeng9xx common errors.\n";
}
$query_handle->finish;
}
sub vendor_platforms
{
print "\nSupported platforms for the vendor-specific errors:\n";
- print "\tHiSilicon Kunpeng920, platform-id=\"", HISILICON_KUNPENG_920, "\"\n";
print "\tHiSilicon Kunpeng9xx, platform-id=\"", HISILICON_KUNPENG_9XX, "\"\n";
print "\n";
}