Skip to content

Commit e4e361e

Browse files
khashaikakky16
authored andcommitted
AMD: Fix issue in RAS APP to generate the ras cper file for Node-2 in 2 X 1P mode
1 parent b31d38f commit e4e361e

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

src/apml_manager.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void Manager::registerEventHandler()
547547
requestGPIOEvents(socketNames[i],
548548
std::bind(&ras::apml::Manager::alertEventHandler,
549549
this, std::ref(gpioEventDescriptors[i]),
550-
std::ref(gpioLines[i]), i),
550+
std::ref(gpioLines[i]), socIndex[i]),
551551
gpioLines[i], gpioEventDescriptors[i]);
552552
}
553553
}
@@ -637,7 +637,7 @@ void Manager::clearSbrmiAlertMask(uint8_t socNum)
637637
void Manager::alertSrcHandler(struct apml_udev_monitor* udev_mon,
638638
uint8_t socket)
639639
{
640-
uint8_t soc_num = 0;
640+
uint8_t soc_num = (node == "2") ? socket1 : socket0;
641641
uint32_t src = 0;
642642
bool block = false;
643643
oob_status_t ret;
@@ -2149,7 +2149,13 @@ bool Manager::decodeInterrupt(uint8_t socNum, uint32_t src)
21492149
}
21502150
}
21512151

2152-
cpuAlertProcessed[socNum] = true;
2152+
// Map physical socNum to logical index in cpuAlertProcessed
2153+
auto socIt = std::find(socIndex.begin(), socIndex.end(),
2154+
static_cast<size_t>(socNum));
2155+
if (socIt != socIndex.end())
2156+
{
2157+
cpuAlertProcessed[std::distance(socIndex.begin(), socIt)] = true;
2158+
}
21532159

21542160
if (fchHangError == true || runtimeError == true ||
21552161
nonMcaShutdownError == true)
@@ -2696,7 +2702,14 @@ bool Manager::decodeInterrupt(uint8_t socNum)
26962702
}
26972703
}
26982704

2699-
cpuAlertProcessed[socNum] = true;
2705+
// Map physical socNum to logical index in cpuAlertProcessed
2706+
auto socIt = std::find(socIndex.begin(), socIndex.end(),
2707+
static_cast<size_t>(socNum));
2708+
if (socIt != socIndex.end())
2709+
{
2710+
cpuAlertProcessed[std::distance(socIndex.begin(), socIt)] =
2711+
true;
2712+
}
27002713

27012714
// Clear RAS status register
27022715
// 0x4c is a SB-RMI register acting as write to clear

0 commit comments

Comments
 (0)