Lines Matching +full:aux +full:- +full:bus
6 #include <linux/i2c-dev.h>
11 #include <systemd/sd-bus.h>
23 #include <phosphor-logging/elog-errors.hpp>
24 #include <phosphor-logging/lg2.hpp>
47 extern sd_bus* bus;
87 "/usr/share/ipmi-providers/master_write_read_white_list.json";
119 ipmi::getAllDbusObjects(*ctx->bus, softwareRoot, redundancyIntf); in getActiveSoftwareVersionInfo()
133 ipmi::getService(*ctx->bus, redundancyIntf, softObject.first); in getActiveSoftwareVersionInfo()
135 ipmi::getManagedObjects(*ctx->bus, service, softwareRoot); in getActiveSoftwareVersionInfo()
185 sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()}; in getCurrentBmcState() local
189 ipmi::getDbusObject(bus, bmc_state_interface); in getCurrentBmcState()
191 ipmi::getDbusProperty(bus, bmcObject.second, bmcObject.first, in getCurrentBmcState()
306 * @param sysAcpiState - ACPI system power state to set
307 * @param devAcpiState - ACPI device power state to set
316 sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()}; in ipmiSetAcpiPowerState() local
345 value = found->first; in ipmiSetAcpiPowerState()
350 ipmi::getDbusObject(bus, acpi_state::acpiInterface); in ipmiSetAcpiPowerState()
351 ipmi::setDbusProperty(bus, acpiObject.second, acpiObject.first, in ipmiSetAcpiPowerState()
393 value = found->first; in ipmiSetAcpiPowerState()
398 ipmi::getDbusObject(bus, acpi_state::acpiInterface); in ipmiSetAcpiPowerState()
399 ipmi::setDbusProperty(bus, acpiObject.second, acpiObject.first, in ipmiSetAcpiPowerState()
423 * - ACPI system power state
424 * - ACPI device power state
434 sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()}; in ipmiGetAcpiPowerState() local
438 auto acpiObject = ipmi::getDbusObject(bus, acpi_state::acpiInterface); in ipmiGetAcpiPowerState()
441 bus, acpiObject.second, acpiObject.first, acpi_state::acpiInterface, in ipmiGetAcpiPowerState()
448 bus, acpiObject.second, acpiObject.first, acpi_state::acpiInterface, in ipmiGetAcpiPowerState()
466 uint8_t aux[4]; member
472 /* version = 2.14.0-dev */
474 /* | |---------------- Minor */
475 /* |------------------ Major */
485 /* matches[2]: matched index for aux[0] (set 0 to skip) */
486 /* matches[3]: matched index for aux[1] (set 0 to skip) */
487 /* matches[4]: matched index for aux[2] (set 0 to skip) */
488 /* matches[5]: matched index for aux[3] (set 0 to skip) */
490 /* regex = "([\d]+).([\d]+).([\d]+)-dev-([\d]+)-g([0-9a-fA-F]{2}) */
491 /* ([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})" */
493 /* version = 2.14.0-dev-750-g37a7c5ad1-dirty */
496 /* | | | | | | | |-- Aux byte 3 (0xAD), index 8 */
497 /* | | | | | | |---- Aux byte 2 (0xC5), index 7 */
498 /* | | | | | |------ Aux byte 1 (0xA7), index 6 */
499 /* | | | | |-------- Aux byte 0 (0x37), index 5 */
500 /* | | | |------------- Not used, index 4 */
501 /* | | |------------------- Not used, index 3 */
502 /* | |---------------------- Minor (14), index 2 */
503 /* |------------------------ Major (2), index 1 */
518 return -1; in convertVersion()
527 return -1; in convertVersion()
532 // have major version between 0 - 99. If the major version is in convertVersion()
534 // converted to 0 - 99. in convertVersion()
549 return -1; in convertVersion()
554 // convert aux bytes in convertVersion()
568 { // failed to convert aux byte string in convertVersion()
572 r.aux[i] = val & 0xFF; in convertVersion()
576 { // something wrong durign converting aux bytes in convertVersion()
577 return -1; in convertVersion()
586 return -1; in convertVersion()
590 * @param[in] ctx - shared_ptr to an IPMI context struct
593 * - Device ID (manufacturer defined)
594 * - Device revision[4 bits]; reserved[3 bits]; SDR support[1 bit]
595 * - FW revision major[7 bits] (binary encoded); available[1 bit]
596 * - FW Revision minor (BCD encoded)
597 * - IPMI version (0x02 for IPMI 2.0)
598 * - device support (bitfield of supported options)
599 * - MFG IANA ID (3 bytes)
600 * - product ID (2 bytes)
601 * - AUX info (4 bytes)
611 uint32_t // AUX info
624 uint32_t aux; in ipmiAppGetDeviceId() member
628 const char* filename = "/usr/share/ipmi-providers/dev_id.json"; in ipmiAppGetDeviceId()
636 int r = -1; in ipmiAppGetDeviceId()
653 // or self-initialization in progress. in ipmiAppGetDeviceId()
660 std::memcpy(&devId.aux, rev.aux, sizeof(rev.aux)); in ipmiAppGetDeviceId()
686 devId.aux = data.value("aux", 0); in ipmiAppGetDeviceId()
730 devId.addnDevSupport, devId.manufId, devId.prodId, devId.aux); in ipmiAppGetDeviceId()
733 auto ipmiAppGetSelfTestResults() -> ipmi::RspType<uint8_t, uint8_t> in ipmiAppGetSelfTestResults()
736 // 55h - No error. in ipmiAppGetSelfTestResults()
737 // 56h - Self Test function not implemented in this controller. in ipmiAppGetSelfTestResults()
738 // 57h - Corrupted or inaccesssible data or devices. in ipmiAppGetSelfTestResults()
739 // 58h - Fatal hardware error. in ipmiAppGetSelfTestResults()
740 // FFh - reserved. in ipmiAppGetSelfTestResults()
741 // all other: Device-specific 'internal failure'. in ipmiAppGetSelfTestResults()
744 // For byte 2 = 58h, all other: Device-specific in ipmiAppGetSelfTestResults()
745 // For byte 2 = 57h: self-test error bitfield. in ipmiAppGetSelfTestResults()
764 // UUID is in RFC4122 format. Ex: 61a39523-78f2-11e5-9862-e6402cfc3223 in rfc4122ToIpmi()
773 rfc4122.erase(std::remove(rfc4122.begin(), rfc4122.end(), '-'), in rfc4122ToIpmi()
804 uuid[uuidBinaryLength - (ind / 2) - 1] = static_cast<uint8_t>(b); in rfc4122ToIpmi()
810 -> ipmi::RspType<std::array<uint8_t, uuidBinaryLength>> in ipmiAppGetDeviceGuid()
812 // return a fixed GUID based on /etc/machine-id in ipmiAppGetDeviceGuid()
816 // generated by systemd-id128 -p new as per man page in ipmiAppGetDeviceGuid()
821 // create the UUID from /etc/machine-id via the systemd API in ipmiAppGetDeviceGuid()
832 -> ipmi::RspType<uint8_t, uint8_t, uint8_t, uint8_t, uint8_t> in ipmiAppGetBtCapabilities()
837 constexpr uint8_t inputBufferSize = MAX_IPMI_BUFFER - 1; in ipmiAppGetBtCapabilities()
838 constexpr uint8_t outputBufferSize = MAX_IPMI_BUFFER - 1; in ipmiAppGetBtCapabilities()
847 -> ipmi::RspType<std::array<uint8_t, 16>> in ipmiAppGetSystemGuid()
864 // UUID is in RFC4122 format Ex: 61a39523-78f2-11e5-9862-e6402cfc3223 in ipmiAppGetSystemGuid()
901 * @param[in] busp - Dbus obj
902 * @param[in] service - service name
903 * @param[in] obj - object path
986 const std::string service = itr->first; in ipmiAppCloseSession()
1027 * @param[in] ctx - context of current session.
1028 * @param[in] sessionIndex - request session index
1029 * @param[in] payload - input payload
1030 * @param[in] reqSessionId - unpacked session Id will be asigned
1031 * @param[in] reqSessionHandle - unpacked session handle will be asigned
1052 ipmi::getChannelInfo(ctx->channel, chInfo); in getSessionInfoRequestData()
1065 if (ctx->sessionId == session::sessionZero) in getSessionInfoRequestData()
1069 reqSessionId = ctx->sessionId; in getSessionInfoRequestData()
1129 /** Alias SessionDetails - contain the optional information about an
1132 * @param userID - uint6_t session user ID (0-63)
1133 * @param reserved - uint2_t reserved
1134 * @param privilege - uint4_t session privilege (0-5)
1135 * @param reserved - uint4_t reserved
1136 * @param channel - uint4_t session channel number
1137 * @param protocol - uint4_t session protocol
1138 * @param remoteIP - uint32_t remote IP address
1139 * @param macAddr - std::array<uint8_t, 6> mac address
1140 * @param port - uint16_t remote port
1148 * @param[in] ctx - ipmi::Context pointer for accessing D-Bus
1149 * @param[in] service - D-Bus service name to fetch details from
1150 * @param[in] objPath - D-Bus object path for session
1151 * @param[out] sessionHandle - return session handle for session
1152 * @param[out] sessionState - return session state for session
1153 * @param[out] details - return a SessionDetails tuple containing other
1155 * @return - ipmi::Cc success or error code
1256 std::string service = itr->first; in ipmiAppGetSessionInfo()
1300 * - Get all of object paths that include in getSysFWVersion()
1302 * - Get the Purpose property of above object paths. in getSysFWVersion()
1303 * - If the Purpose is Host then get the Version property. in getSysFWVersion()
1392 std::optional<std::vector<uint8_t>>> // data2-17
1425 sysInfoParamStore->update(IPMI_SYSINFO_SYSTEM_NAME, in ipmiAppGetSystemInfo()
1437 sysInfoParamStore->update(IPMI_SYSINFO_SYSTEM_FW_VERSION, *fwVersion); in ipmiAppGetSystemInfo()
1442 sysInfoParamStore->lookup(paramSelector); in ipmiAppGetSystemInfo()
1464 configParameterLength - configData.size(), 0x00); in ipmiAppGetSystemInfo()
1469 size_t offset = (setSelector * fullChunkSize) - configDataOverhead; in ipmiAppGetSystemInfo()
1474 count = std::min(paramString.length() - offset, fullChunkSize); in ipmiAppGetSystemInfo()
1523 (configParameterLength - configData.size()), 0x00); in ipmiAppSetSystemInfo()
1529 sysInfoParamStore->update(IPMI_SYSINFO_SYSTEM_NAME, in ipmiAppSetSystemInfo()
1535 sysInfoParamStore->lookup(paramSelector); in ipmiAppSetSystemInfo()
1563 size_t offset = (setSelector * fullChunkSize) - configDataOverhead; in ipmiAppSetSystemInfo()
1568 count = std::min(paramString.length() - offset, configData.size()); in ipmiAppSetSystemInfo()
1571 sysInfoParamStore->update(paramSelector, paramString); in ipmiAppSetSystemInfo()
1618 // "Description": "Allow full read - ignore first byte write value in populateI2CControllerWRAllowlist()
1627 // "Description": "Allow full read - first byte match 0x05 and in populateI2CControllerWRAllowlist()
1712 // Skip as no-match, if requested write data is more than the in isCmdAllowlisted()
1735 * low-level I2C/SMBus write, read or write-read access
1736 * @param isPrivateBus -to indicate private bus usage
1737 * @param busId - bus id
1738 * @param channelNum - channel number
1739 * @param reserved - skip 1 bit
1740 * @param targetAddr - target address
1741 * @param read count - number of bytes to be read
1742 * @param writeData - data to be written
1745 * - readData - i2c response data
1767 "bus: {BUS}, addr: {ADDR}", in ipmiControllerWriteRead()
1768 "BUS", static_cast<uint8_t>(busId), "ADDR", lg2::hex, in ipmiControllerWriteRead()
1774 "/dev/i2c-" + std::to_string(static_cast<uint8_t>(busId)); in ipmiControllerWriteRead()