Lines Matching +full:auto +full:- +full:boot

3  * Copyright (c)  2018-present Facebook.
9 * http://www.apache.org/licenses/LICENSE-2.0
22 #include <ipmid/api-types.hpp>
27 #include <phosphor-logging/log.hpp>
29 #include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
30 #include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
31 #include <xyz/openbmc_project/Control/Boot/Type/server.hpp>
75 constexpr const char* certPath = "/mnt/data/host/bios-rootcert";
81 static constexpr const char* FRU_EEPROM = "/sys/bus/i2c/devices/6-0054/eeprom";
103 constexpr auto ROOT = "/xyz/openbmc_project/network";
104 constexpr auto SERVICE = "xyz.openbmc_project.Network";
105 constexpr auto IPV4_TYPE = "ipv4";
106 constexpr auto IPV6_TYPE = "ipv6";
107 constexpr auto IPV4_PREFIX = "169.254";
108 constexpr auto IPV6_PREFIX = "fe80";
109 constexpr auto IP_INTERFACE = "xyz.openbmc_project.Network.IP";
110 constexpr auto MAC_INTERFACE = "xyz.openbmc_project.Network.MACAddress";
111 constexpr auto IPV4_PROTOCOL = "xyz.openbmc_project.Network.IP.Protocol.IPv4";
112 constexpr auto IPV6_PROTOCOL = "xyz.openbmc_project.Network.IP.Protocol.IPv6";
124 auto objectTree = getAllDbusObjects(bus, serviceRoot, interface, ethdev); in getIPObject()
134 for (auto& object : objectTree) in getIPObject()
136 auto variant = in getIPObject()
137 ipmi::getDbusProperty(bus, object.second.begin()->first, in getIPObject()
144 variant = ipmi::getDbusProperty(bus, object.second.begin()->first, in getIPObject()
147 objectInfo = std::make_pair(object.first, object.second.begin()->first); in getIPObject()
149 // if LinkLocalIP found look for Non-LinkLocalIP in getIPObject()
164 namespace boot namespace
167 sdbusplus::xyz::openbmc_project::Control::Boot::server::Source::Sources;
169 sdbusplus::xyz::openbmc_project::Control::Boot::server::Mode::Modes;
171 sdbusplus::xyz::openbmc_project::Control::Boot::server::Type::Types;
200 static constexpr auto bootEnableIntf = "xyz.openbmc_project.Object.Enable";
201 static constexpr auto bootModeIntf = "xyz.openbmc_project.Control.Boot.Mode";
202 static constexpr auto bootSourceIntf =
203 "xyz.openbmc_project.Control.Boot.Source";
204 static constexpr auto bootTypeIntf = "xyz.openbmc_project.Control.Boot.Type";
205 static constexpr auto bootSourceProp = "BootSource";
206 static constexpr auto bootModeProp = "BootMode";
207 static constexpr auto bootTypeProp = "BootType";
208 static constexpr auto bootEnableProp = "Enabled";
214 "/xyz/openbmc_project/control/" + hostName + "/boot"; in objPath()
218 /* Helper functions to set boot order */
225 "Invalid Boot order length received"); in setBootOrder()
233 // SETTING BOOT MODE PROPERTY in setBootOrder()
235 auto bootValue = ipmi::boot::modeIpmiToDbus.at(bootModeBit); in setBootOrder()
238 sdbusplus::message::convert_to_string<boot::BootMode>(bootValue); in setBootOrder()
241 getService(*dbus, ipmi::boot::bootModeIntf, bootObjPath); in setBootOrder()
242 setDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootModeIntf, in setBootOrder()
243 ipmi::boot::bootModeProp, bootOption); in setBootOrder()
245 // SETTING BOOT SOURCE PROPERTY in setBootOrder()
246 auto bootOrder = ipmi::boot::sourceIpmiToDbus.at(bootSeq.at(1)); in setBootOrder()
248 sdbusplus::message::convert_to_string<boot::BootSource>(bootOrder); in setBootOrder()
250 service = getService(*dbus, ipmi::boot::bootSourceIntf, bootObjPath); in setBootOrder()
251 setDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootSourceIntf, in setBootOrder()
252 ipmi::boot::bootSourceProp, bootSource); in setBootOrder()
254 // SETTING BOOT TYPE PROPERTY in setBootOrder()
256 auto bootTypeVal = ipmi::boot::typeIpmiToDbus.at(bootTypeBit); in setBootOrder()
259 sdbusplus::message::convert_to_string<boot::BootType>(bootTypeVal); in setBootOrder()
261 service = getService(*dbus, ipmi::boot::bootTypeIntf, bootObjPath); in setBootOrder()
263 setDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootTypeIntf, in setBootOrder()
264 ipmi::boot::bootTypeProp, bootType); in setBootOrder()
266 // Set the valid bit to boot enabled property in setBootOrder()
267 service = getService(*dbus, ipmi::boot::bootEnableIntf, bootObjPath); in setBootOrder()
269 setDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootEnableIntf, in setBootOrder()
270 ipmi::boot::bootEnableProp, in setBootOrder()
281 /* Initialize boot sequence array */ in setBootOrder()
286 oemData[bootOrderKey][KEY_BOOT_SEQ][i - 1] = "NA"; in setBootOrder()
288 oemData[bootOrderKey][KEY_BOOT_SEQ][i - 1] = in setBootOrder()
300 /* Return default boot order 0100090203ff */ in getBootOrder()
309 "Set default boot order"); in getBootOrder()
319 getService(*dbus, ipmi::boot::bootModeIntf, bootObjPath); in getBootOrder()
321 getDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootModeIntf, in getBootOrder()
322 ipmi::boot::bootModeProp); in getBootOrder()
324 auto bootMode = sdbusplus::message::convert_from_string<boot::BootMode>( in getBootOrder()
327 uint8_t bootOption = ipmi::boot::modeDbusToIpmi.at(bootMode); in getBootOrder()
331 service = getService(*dbus, ipmi::boot::bootTypeIntf, bootObjPath); in getBootOrder()
333 getDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootTypeIntf, in getBootOrder()
334 ipmi::boot::bootTypeProp); in getBootOrder()
336 auto bootType = sdbusplus::message::convert_from_string<boot::BootType>( in getBootOrder()
339 // Get the valid bit to boot enabled property in getBootOrder()
340 service = getService(*dbus, ipmi::boot::bootEnableIntf, bootObjPath); in getBootOrder()
342 getDbusProperty(*dbus, service, bootObjPath, ipmi::boot::bootEnableIntf, in getBootOrder()
343 ipmi::boot::bootEnableProp); in getBootOrder()
347 uint8_t bootTypeVal = ipmi::boot::typeDbusToIpmi.at(bootType); in getBootOrder()
362 std::string seqStr = oemData[hostName][KEY_BOOT_SEQ][i - 1]; in getBootOrder()
370 } // namespace boot
372 //----------------------------------------------------------------------
374 //----------------------------------------------------------------------
426 return -1; in readDimmType()
430 auto obj = dimmObj[dimmKey]["short_name"]; in readDimmType()
447 auto ipObjectInfo = ipmi::network::getIPObject( in getNetworkData()
451 auto properties = ipmi::getAllDbusProperties( in getNetworkData()
464 auto ipObjectInfo = ipmi::network::getIPObject( in getNetworkData()
468 auto properties = ipmi::getAllDbusProperties( in getNetworkData()
481 auto macObjectInfo = in getNetworkData()
485 auto variant = ipmi::getDbusProperty( in getNetworkData()
522 static constexpr const auto depth = 0; in getMotherBoardFruPath()
525 auto mapperCall = dbus.new_method_call( in getMotherBoardFruPath()
529 static constexpr auto interface = { in getMotherBoardFruPath()
535 auto reply = dbus.call(mapperCall); in getMotherBoardFruPath()
544 for (const auto& path : paths) in getMotherBoardFruPath()
561 auto value = ipmi::getDbusProperty( in getMotherBoardFruName()
577 static constexpr const auto depth = 0; in getFruData()
595 phosphor::logging::entry("ERRNO=0x%X", -ret)); in getFruData()
597 return -1; in getFruData()
600 auto mapperCall = dbus.new_method_call( in getFruData()
610 auto reply = dbus.call(mapperCall); in getFruData()
616 return -1; in getFruData()
619 for (const auto& path : paths) in getFruData()
637 auto found = path.find(machinePath); in getFruData()
647 auto Value = ipmi::getDbusProperty( in getFruData()
654 return -1; in getFruData()
676 return -1; in sysConfig()
684 return -1; in sysConfig()
699 return -1; in sysConfig()
702 for (auto& j : dimmObj.items()) in sysConfig()
714 auto speed = (res[1] << 8 | res[0]); in sysConfig()
762 return -1; in procInfo()
769 return -1; in procInfo()
781 std::sregex_token_iterator(s.begin(), s.end(), regex, -1), in procInfo()
801 //----------------------------------------------------------------------
803 //----------------------------------------------------------------------
819 //----------------------------------------------------------------------
821 //----------------------------------------------------------------------
841 //----------------------------------------------------------------------
843 //----------------------------------------------------------------------
879 //----------------------------------------------------------------------
881 //----------------------------------------------------------------------
918 //----------------------------------------------------------------------
920 //----------------------------------------------------------------------
954 //----------------------------------------------------------------------
956 //----------------------------------------------------------------------
982 //----------------------------------------------------------------------
984 //----------------------------------------------------------------------
1015 //----------------------------------------------------------------------
1017 //----------------------------------------------------------------------
1028 //----------------------------------------------------------------------
1030 //----------------------------------------------------------------------
1034 auto postCodeService = "xyz.openbmc_project.State.Boot.PostCode" + in ipmiOemGet80PortRecord()
1035 std::to_string(ctx->hostIdx + 1); in ipmiOemGet80PortRecord()
1036 auto postCodeObjPath = "/xyz/openbmc_project/State/Boot/PostCode" + in ipmiOemGet80PortRecord()
1037 std::to_string(ctx->hostIdx + 1); in ipmiOemGet80PortRecord()
1038 constexpr auto postCodeInterface = in ipmiOemGet80PortRecord()
1039 "xyz.openbmc_project.State.Boot.PostCode"; in ipmiOemGet80PortRecord()
1041 constexpr const auto maxPostCodeLen = in ipmiOemGet80PortRecord()
1048 auto conn = getSdBus(); in ipmiOemGet80PortRecord()
1050 auto msg = in ipmiOemGet80PortRecord()
1051 conn->new_method_call(postCodeService.c_str(), postCodeObjPath.c_str(), in ipmiOemGet80PortRecord()
1057 auto reply = conn->call(msg); in ipmiOemGet80PortRecord()
1072 for (int j = postCodeSize - 1; j >= 0; --j) in ipmiOemGet80PortRecord()
1083 startIndex = resData.size() - maxPostCodeLen; in ipmiOemGet80PortRecord()
1091 //----------------------------------------------------------------------
1092 // Set Boot Order (CMD_OEM_SET_BOOT_ORDER)
1093 //----------------------------------------------------------------------
1102 "Invalid Boot order length received"); in ipmiOemSetBootOrder()
1106 std::optional<size_t> hostId = findHost(ctx->hostIdx); in ipmiOemSetBootOrder()
1114 auto [bootObjPath, hostName] = ipmi::boot::objPath(*hostId); in ipmiOemSetBootOrder()
1116 ipmi::boot::setBootOrder(bootObjPath, bootSeq, hostName); in ipmiOemSetBootOrder()
1121 //----------------------------------------------------------------------
1122 // Get Boot Order (CMD_OEM_GET_BOOT_ORDER)
1123 //----------------------------------------------------------------------
1128 std::optional<size_t> hostId = findHost(ctx->hostIdx); in ipmiOemGetBootOrder()
1136 auto [bootObjPath, hostName] = ipmi::boot::objPath(*hostId); in ipmiOemGetBootOrder()
1138 ipmi::boot::getBootOrder(bootObjPath, bootSeq, hostName); in ipmiOemGetBootOrder()
1143 //----------------------------------------------------------------------
1160 if (req->chassis_type >= sizeof(chassisType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1164 chassisType[req->chassis_type]; in ipmiOemSetMachineCfgInfo()
1166 if (req->mb_type >= sizeof(mbType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1169 oemData[KEY_MC_CONFIG][KEY_MC_MB_TYPE] = mbType[req->mb_type]; in ipmiOemSetMachineCfgInfo()
1171 oemData[KEY_MC_CONFIG][KEY_MC_PROC_CNT] = req->proc_cnt; in ipmiOemSetMachineCfgInfo()
1172 oemData[KEY_MC_CONFIG][KEY_MC_MEM_CNT] = req->mem_cnt; in ipmiOemSetMachineCfgInfo()
1173 oemData[KEY_MC_CONFIG][KEY_MC_HDD35_CNT] = req->hdd35_cnt; in ipmiOemSetMachineCfgInfo()
1174 oemData[KEY_MC_CONFIG][KEY_MC_HDD25_CNT] = req->hdd25_cnt; in ipmiOemSetMachineCfgInfo()
1176 if (req->riser_type >= sizeof(riserType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1179 oemData[KEY_MC_CONFIG][KEY_MC_RSR_TYPE] = riserType[req->riser_type]; in ipmiOemSetMachineCfgInfo()
1183 if (req->pcie_card_loc & BIT_0) in ipmiOemSetMachineCfgInfo()
1185 if (req->pcie_card_loc & BIT_1) in ipmiOemSetMachineCfgInfo()
1187 if (req->pcie_card_loc & BIT_2) in ipmiOemSetMachineCfgInfo()
1189 if (req->pcie_card_loc & BIT_3) in ipmiOemSetMachineCfgInfo()
1192 if (req->slot1_pcie_type >= sizeof(pcieType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1196 pcieType[req->slot1_pcie_type]; in ipmiOemSetMachineCfgInfo()
1198 if (req->slot2_pcie_type >= sizeof(pcieType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1202 pcieType[req->slot2_pcie_type]; in ipmiOemSetMachineCfgInfo()
1204 if (req->slot3_pcie_type >= sizeof(pcieType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1208 pcieType[req->slot3_pcie_type]; in ipmiOemSetMachineCfgInfo()
1210 if (req->slot4_pcie_type >= sizeof(pcieType) / sizeof(uint8_t*)) in ipmiOemSetMachineCfgInfo()
1214 pcieType[req->slot4_pcie_type]; in ipmiOemSetMachineCfgInfo()
1216 oemData[KEY_MC_CONFIG][KEY_MC_AEP_CNT] = req->aep_mem_cnt; in ipmiOemSetMachineCfgInfo()
1223 //----------------------------------------------------------------------
1225 //----------------------------------------------------------------------
1237 //----------------------------------------------------------------------
1239 //----------------------------------------------------------------------
1261 //----------------------------------------------------------------------
1263 //----------------------------------------------------------------------
1294 //----------------------------------------------------------------------
1296 //----------------------------------------------------------------------
1309 int fd = -1; in setGUID()
1315 auto device = getMbFruDevice(); in setGUID()
1318 auto [bus, address] = *device; in setGUID()
1320 ss << "/sys/bus/i2c/devices/" << static_cast<int>(bus) << "-" in setGUID()
1329 if (access(eepromPath.c_str(), F_OK) == -1) in setGUID()
1337 if (fd == -1) in setGUID()
1359 //----------------------------------------------------------------------
1361 //----------------------------------------------------------------------
1373 uint8_t bicAddr = (uint8_t)ctx->hostIdx << 2; in ipmiOemSetSystemGuid()
1375 if (sendBicCmd(ctx->netFn, ctx->cmd, bicAddr, reqData, respData)) in ipmiOemSetSystemGuid()
1404 //----------------------------------------------------------------------
1406 //----------------------------------------------------------------------
1416 //----------------------------------------------------------------------
1418 //----------------------------------------------------------------------
1506 //----------------------------------------------------------------------
1508 //----------------------------------------------------------------------
1596 //----------------------------------------------------------------------
1598 //----------------------------------------------------------------------
1611 // Ex. Intel(R) Xeon(R) CPU E5-2685 v3 @ 2.60GHz
1630 auto hostId = findHost(ctx->hostIdx); in ipmiOemQSetProcInfo()
1654 //----------------------------------------------------------------------
1656 //----------------------------------------------------------------------
1669 // Ex. Intel(R) Xeon(R) CPU E5-2685 v3 @ 2.60GHz
1688 auto hostId = findHost(ctx->hostIdx); in ipmiOemQGetProcInfo()
1715 //----------------------------------------------------------------------
1717 //----------------------------------------------------------------------
1751 // 0x01 – DDR-1 RAM
1753 // 0x03 – DDR-2 RAM
1755 // 0x05 – DDR-3 RAM
1756 // 0x06 – DDR-4 RAM
1763 // Byte 1..20 –Module Part Number (JEDEC Standard No. 21-C)
1766 // Byte 1..4 –Module Serial Number (JEDEC Standard No. 21-C)
1769 // Byte 1 - Module Manufacturer ID, LSB
1770 // Byte 2 - Module Manufacturer ID, MSB
1782 auto hostId = findHost(ctx->hostIdx); in ipmiOemQSetDimmInfo()
1810 //----------------------------------------------------------------------
1846 // 0x01 – DDR-1 RAM
1848 // 0x03 – DDR-2 RAM
1850 // 0x05 – DDR-3 RAM
1851 // 0x06 – DDR-4 RAM
1858 // Byte 1..20 –Module Part Number (JEDEC Standard No. 21-C)
1861 // Byte 1..4 –Module Serial Number (JEDEC Standard No. 21-C)
1864 // Byte 1 - Module Manufacturer ID, LSB
1865 // Byte 2 - Module Manufacturer ID, MSB
1877 auto hostId = findHost(ctx->hostIdx); in ipmiOemQGetDimmInfo()
1906 //----------------------------------------------------------------------
1908 //----------------------------------------------------------------------
1964 // Byte 5..12 - HDD Block Number, LSB
1968 // Byte 1 - Max HDD Quantity
1987 uint8_t ctrlType = req->hddCtrlType & 0x0f; in ipmiOemQSetDriveInfo()
1995 if (len < 6 || req->paramSel < 1 || req->paramSel >= numParam || in ipmiOemQSetDriveInfo()
2003 len = len - 6; // Get Actual data length in ipmiOemQSetDriveInfo()
2006 ss << std::setw(2) << std::setfill('0') << (int)req->hddIndex; in ipmiOemQSetDriveInfo()
2007 oemData[KEY_Q_DRIVE_INFO][KEY_HDD_CTRL_TYPE] = req->hddCtrlType; in ipmiOemQSetDriveInfo()
2009 req->hddIndex; in ipmiOemQSetDriveInfo()
2011 str = bytesToStr(req->data, len); in ipmiOemQSetDriveInfo()
2013 [driveInfoKey[req->paramSel]] = str.c_str(); in ipmiOemQSetDriveInfo()
2019 //----------------------------------------------------------------------
2021 //----------------------------------------------------------------------
2048 uint8_t ctrlType = req->hddCtrlType & 0x0f; in ipmiOemQGetDriveInfo()
2055 if (req->paramSel < 1 || req->paramSel >= numParam || ctrlType > 2) in ipmiOemQGetDriveInfo()
2067 ss << std::setw(2) << std::setfill('0') << (int)req->hddIndex; in ipmiOemQGetDriveInfo()
2074 dimmInfoKey[req->paramSel]) == in ipmiOemQGetDriveInfo()
2079 [dimmInfoKey[req->paramSel]]; in ipmiOemQGetDriveInfo()
2096 uint8_t bicAddr = (uint8_t)ctx->hostIdx << 2; in sendDCMICmd()
2098 if (sendBicCmd(ctx->netFn, ctx->cmd, bicAddr, cmdData, respData)) in sendDCMICmd()
2147 // Https Boot related functions
2154 const auto* pReq = reinterpret_cast<const HttpsDataReq*>(reqData.data()); in ipmiOemGetHttpsData()
2156 auto fileSize = std::filesystem::file_size(certPath, ec); in ipmiOemGetHttpsData()
2160 if (pReq->offset >= fileSize) in ipmiOemGetHttpsData()
2167 auto readLen = std::min<uint16_t>(pReq->length, fileSize - pReq->offset); in ipmiOemGetHttpsData()
2170 file.seekg(pReq->offset); in ipmiOemGetHttpsData()
2189 auto fileSize = std::filesystem::file_size(certPath, ec); in ipmiOemGetHttpsAttr()
2257 const auto* pBank = reinterpret_cast<const CrdMcaBank*>(data.data()); in handleMcaBank()
2260 ss << std::format(" MCA_CTRL : 0x{:016X}\n", pBank->mcaCtrl); in handleMcaBank()
2261 ss << std::format(" MCA_STATUS : 0x{:016X}\n", pBank->mcaSts); in handleMcaBank()
2262 ss << std::format(" MCA_ADDR : 0x{:016X}\n", pBank->mcaAddr); in handleMcaBank()
2263 ss << std::format(" MCA_MISC0 : 0x{:016X}\n", pBank->mcaMisc0); in handleMcaBank()
2264 ss << std::format(" MCA_CTRL_MASK : 0x{:016X}\n", pBank->mcaCtrlMask); in handleMcaBank()
2265 ss << std::format(" MCA_CONFIG : 0x{:016X}\n", pBank->mcaConfig); in handleMcaBank()
2266 ss << std::format(" MCA_IPID : 0x{:016X}\n", pBank->mcaIpid); in handleMcaBank()
2267 ss << std::format(" MCA_SYND : 0x{:016X}\n", pBank->mcaSynd); in handleMcaBank()
2268 ss << std::format(" MCA_DESTAT : 0x{:016X}\n", pBank->mcaDestat); in handleMcaBank()
2269 ss << std::format(" MCA_DEADDR : 0x{:016X}\n", pBank->mcaDeaddr); in handleMcaBank()
2270 ss << std::format(" MCA_MISC1 : 0x{:016X}\n", pBank->mcaMisc1); in handleMcaBank()
2283 const auto* pBank = reinterpret_cast<const T*>(data.data()); in handleVirtualBank()
2285 if (data.size() < sizeof(T) + sizeof(BankCorePair) * pBank->mcaCount) in handleVirtualBank()
2293 ss << std::format(" S5_RESET_STATUS : 0x{:08X}\n", pBank->s5ResetSts); in handleVirtualBank()
2294 ss << std::format(" PM_BREAKEVENT : 0x{:08X}\n", pBank->breakevent); in handleVirtualBank()
2297 ss << std::format(" WARMCOLDRSTSTATUS : 0x{:08X}\n", pBank->rstSts); in handleVirtualBank()
2299 ss << std::format(" PROCESSOR NUMBER : 0x{:04X}\n", pBank->procNum); in handleVirtualBank()
2300 ss << std::format(" APIC ID : 0x{:08X}\n", pBank->apicId); in handleVirtualBank()
2301 ss << std::format(" EAX : 0x{:08X}\n", pBank->eax); in handleVirtualBank()
2302 ss << std::format(" EBX : 0x{:08X}\n", pBank->ebx); in handleVirtualBank()
2303 ss << std::format(" ECX : 0x{:08X}\n", pBank->ecx); in handleVirtualBank()
2304 ss << std::format(" EDX : 0x{:08X}\n", pBank->edx); in handleVirtualBank()
2306 for (size_t i = 0; i < pBank->mcaCount; i++) in handleVirtualBank()
2308 ss << std::format("(0x{:02X},0x{:02X}) ", pBank->mcaList[i].bankId, in handleVirtualBank()
2309 pBank->mcaList[i].coreId); in handleVirtualBank()
2326 const auto* pBank = reinterpret_cast<const CrdCpuWdtBank*>(data.data()); in handleCpuWdtBank()
2331 pBank->hwAssertStsHi[i]); in handleCpuWdtBank()
2333 pBank->hwAssertStsLo[i]); in handleCpuWdtBank()
2335 pBank->origWdtAddrLogHi[i]); in handleCpuWdtBank()
2337 pBank->origWdtAddrLogLo[i]); in handleCpuWdtBank()
2339 pBank->hwAssertMskHi[i]); in handleCpuWdtBank()
2341 pBank->hwAssertMskLo[i]); in handleCpuWdtBank()
2343 pBank->origWdtAddrLogStat[i]); in handleCpuWdtBank()
2369 pBank->hwAssertStsHi[i]); in handleHwAssertBank()
2371 pBank->hwAssertStsLo[i]); in handleHwAssertBank()
2373 pBank->hwAssertMskHi[i]); in handleHwAssertBank()
2375 pBank->hwAssertMskLo[i]); in handleHwAssertBank()
2392 const auto* pBank = reinterpret_cast<const CrdPcieAerBank*>(data.data()); in handlePcieAerBank()
2393 ss << std::format(" [Bus{} Dev{} Fun{}]\n", pBank->bus, pBank->dev, in handlePcieAerBank()
2394 pBank->fun); in handlePcieAerBank()
2396 pBank->cmd); in handlePcieAerBank()
2398 pBank->sts); in handlePcieAerBank()
2400 pBank->slot); in handlePcieAerBank()
2402 pBank->secondBus); in handlePcieAerBank()
2404 pBank->vendorId); in handlePcieAerBank()
2406 pBank->devId); in handlePcieAerBank()
2408 pBank->classCodeHi, pBank->classCodeLo); in handlePcieAerBank()
2410 pBank->secondSts); in handlePcieAerBank()
2412 pBank->ctrl); in handlePcieAerBank()
2414 pBank->uncorrErrSts); in handlePcieAerBank()
2416 pBank->uncorrErrMsk); in handlePcieAerBank()
2418 pBank->uncorrErrSeverity); in handlePcieAerBank()
2420 pBank->corrErrSts); in handlePcieAerBank()
2422 pBank->corrErrMsk); in handlePcieAerBank()
2424 pBank->hdrLogDw0); in handlePcieAerBank()
2426 pBank->hdrLogDw1); in handlePcieAerBank()
2428 pBank->hdrLogDw2); in handlePcieAerBank()
2430 pBank->hdrLogDw3); in handlePcieAerBank()
2432 pBank->rootErrSts); in handlePcieAerBank()
2434 pBank->corrErrSrcId); in handlePcieAerBank()
2436 pBank->errSrcId); in handlePcieAerBank()
2438 pBank->laneErrSts); in handlePcieAerBank()
2450 const auto* pBank = reinterpret_cast<const CrdWdtRegBank*>(data.data()); in handleWdtRegBank()
2451 if (data.size() < sizeof(CrdWdtRegBank) + sizeof(uint32_t) * pBank->count) in handleWdtRegBank()
2458 ss << std::format(" [NBIO{}] {}\n", pBank->nbio, pBank->name); in handleWdtRegBank()
2459 ss << std::format(" Address: 0x{:08X}\n", pBank->addr); in handleWdtRegBank()
2460 ss << std::format(" Data Count: {}\n", pBank->count); in handleWdtRegBank()
2462 for (size_t i = 0; i < pBank->count; i++) in handleWdtRegBank()
2464 ss << std::format(" {}: 0x{:08X}\n", i, pBank->data[i]); in handleWdtRegBank()
2481 const auto* pBank = reinterpret_cast<const CrdHdrBank*>(data.data()); in handleCrdHdrBank()
2483 ss << std::format(" CPU PPIN : 0x{:016X}\n", pBank->ppin); in handleCrdHdrBank()
2484 ss << std::format(" UCODE VERSION : 0x{:08X}\n", pBank->ucodeVer); in handleCrdHdrBank()
2485 ss << std::format(" PMIO 80h : 0x{:08X}\n", pBank->pmio); in handleCrdHdrBank()
2487 … " BIT0 - SMN Parity/SMN Timeouts PSP/SMU Parity and ECC/SMN On-Package Link Error : {}\n", in handleCrdHdrBank()
2488 pBank->pmio & 0x1); in handleCrdHdrBank()
2489 ss << std::format(" BIT2 - PSP Parity and ECC : {}\n", in handleCrdHdrBank()
2490 (pBank->pmio & 0x4) >> 2); in handleCrdHdrBank()
2491 ss << std::format(" BIT3 - SMN Timeouts SMU : {}\n", in handleCrdHdrBank()
2492 (pBank->pmio & 0x8) >> 3); in handleCrdHdrBank()
2493 ss << std::format(" BIT4 - SMN Off-Package Link Packet Error : {}\n", in handleCrdHdrBank()
2494 (pBank->pmio & 0x10) >> 4); in handleCrdHdrBank()
2506 for (const auto& entry : std::filesystem::directory_iterator(dir)) in getFilename()
2542 const std::filesystem::path dumpDir = "/var/lib/fb-ipmi-oem"; in handleCtrlBank()
2548 auto now = std::chrono::system_clock::to_time_t( in handleCtrlBank()
2551 << std::put_time(std::localtime(&now), "%Y-%m-%d %H:%M:%S") in handleCtrlBank()
2576 const auto* pHdr = reinterpret_cast<const CrashDumpHdr*>(reqData.data()); in ipmiOemCrashdump()
2578 reqData.size() - sizeof(CrashDumpHdr)}; in ipmiOemCrashdump()
2581 switch (pHdr->bankHdr.bankType) in ipmiOemCrashdump()
2587 if (pHdr->bankHdr.version >= 3) in ipmiOemCrashdump()
2771 /* FB OEM BOOT ORDER COMMANDS */ in registerOEMFunctions()
2774 ipmiOemGetBootOrder); // Get Boot Order in registerOEMFunctions()
2778 ipmiOemSetBootOrder); // Set Boot Order in registerOEMFunctions()