summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-02-27Update PFR event mappings in mainapp.HEADmasterChalapathi1-30/+13
Updated the last panic reason, recovery reason and major/minor code event log mappings, as per latest PFR document changes Tested: 1. Update BIOS fw via Redfish POST: https://<BMC_IP>/redfish/v1/UpdateService Upload binary: <BIOS binary file> 2. Validate in redfish event logs: GET: https://<BMC_IP>/redfish/v1/Systems/system/LogServices/EventLog/Entries { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog /Entries/1581504982", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-02-12T10:56:22+00:00", "EntryType": "Event", "Id": "1581504982", "Message": "BIOS firmware update to version 10069-fixme completed successfully.", "MessageArgs": [ "BIOS", "10069-fixme" ], "MessageId": "OpenBMC.0.1.FirmwareUpdateCompleted", "Name": "System Event Log Entry", "Severity": "OK" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog /Entries/1581505600_2", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2020-02-12T11:06:40+00:00", "EntryType": "Event", "Id": "1581505600_2", "Message": "BMC firmware panic occurred due to BMC update intent.", "MessageArgs": [ "BMC update intent" ], "MessageId": "OpenBMC.0.1.BMCFirmwarePanicReason", "Name": "System Event Log Entry", "Severity": "Warning" } Change-Id: Ic6eb10757ba7af9e610f8563a86d9a3ec2b83a4c Signed-off-by: Chalapathi <chalapathix.venkataramashetty@intel.com>
2020-02-27Add WrEndPointConfig MMIO to peci_cmdsJason M. Bills1-0/+42
This adds WrEndPointConfig MMIO support to the peci_cmds utility. Tested: Ran this command: peci_cmds WrEndpointConfigMMIO 6 0 0 0x7e 0x1a 0x0 0x224e0 0x5f5a56 and got the expected command buffer in the driver log: [ 795.207278] peci_aspeed 1e78b000.peci-bus: HEAD : 0x00011730 [ 795.212980] TX : c5 00 05 00 00 00 06 00 d0 7e e0 24 02 00 00 00 .........~.$.... [ 795.220556] TX : 00 00 56 5a 5f 00 a8 ..VZ_.. Change-Id: Ibccaa8c390b89556162b7c131f7176b4883e06ec Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-02-27Add WrEndPointConfig MMIO to the PECI libraryJason M. Bills2-0/+85
This adds WrEndPointConfig MMIO support to the PECI library. Tested: Combined with the peci_cmds change, ran this command: peci_cmds WrEndpointConfigMMIO 6 0 0 0x7e 0x1a 0x0 0x224e0 0x5f5a56 and got the expected command buffer in the driver log: [ 795.207278] peci_aspeed 1e78b000.peci-bus: HEAD : 0x00011730 [ 795.212980] TX : c5 00 05 00 00 00 06 00 d0 7e e0 24 02 00 00 00 .........~.$.... [ 795.220556] TX : 00 00 56 5a 5f 00 a8 ..VZ_.. Change-Id: I991ab7b1138981cd773f7344a7ad33cbc5292e08 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-02-24Change the CapabilitiesFlags property into booleansKarthick Sundarrajan1-1/+5
Each bit in CapabilitiesFlags dbus property is a chassis capability. Setting a capability overwrites other capabilities. Read-and-update of the property results in race condition/confusion. To tackle this, added a boolean property for each of chassis capability. The new properties will be read and updated in ipmi command handling code. The capabilities listed below are supported by Intel and so enabled the corresponding bits/properties by default. 1. Intrusion sensor (bit 0) 2. Front panel lockout (bit 1) 3. NMI (bit 2) The original CapabilitiesFlags property will be deprecated once the changes are made to use new booleans in all the repos. Tested: ------ root@intel-obmc:~# ipmitool raw 0x00 0x00 07 22 44 66 88 aa Change-Id: I7f9ec00c1bf94d550dd000634011ef8e7a460967 Signed-off-by: Karthick Sundarrajan <karthick.sundarrajan@intel.com>
2020-02-20Add handling of exit code property.Agata Olender1-6/+11
Property returns exit code value from nbd-client process for proxy mode and from nbdkit process for legacy mode. The initial value for this property is -1 and will be returned before starting the process and in the process execution time. Tested manually for proxy and legacy mode: - initial value before process first run - initial value in process execution time - 0 value for successful exit - specific value for forced process termination Change-Id: I4cefa423bade522fc2fac0cab620cbba0b66cce2 Signed-off-by: Agata Olender <agata.olender@intel.com>
2020-02-13Increase the timeout value to fix netipmid crash issue during stress testYong Li1-3/+3
During stress test, netipmid service will crash with "bad executor" error, the current Character Accumulate Interval is too small, after increase it to 100, no more crash issue. Tested: Start "ipmitool sel list", "ipmitool sensor list" and "ipmitool sol looptest 200 500" at the same time, no "sol looptest fail" error Change-Id: Idf8ba1fdc3478bda408cf668f671411a02574b68 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2020-02-08Add updateable association to PFR fw objectsAppaRao Puli1-11/+26
All the PFR firmware objects are programmable. So add 'updateable' associations to those objects for fetching all programmable firmware components in system. Remove BMC and BIOS objects from 'functional' association as there is redundant firmware version objects exist for same. BMC version is fetched from /etc/os-release and BIOS version is fetched from SMBIOS, those will have more version information which can't be fetched from PFR CPLD today. Down the line we need to remove the redundant firmware version objects and stick to one. Tested: - Redfish firmware inventory shows appropriate 'Updateable' Property values. - There will be single functional association object per component. Change-Id: Ie5dc5cfaa7da268e0b9ea746e63bf4e9c48cf817 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2020-02-08[Mfg-mode]: Configure root user with null passwdRichard Marian Thomaiyar3-142/+7
Configure special user with null password when entering manufacturing mode and special user password is in disabled state. Note: This feature is under VALIDATION_UNSECURE flag, and hence will be available for reference only image. Tested: 1. Built the image without debug-tweaks and flashed the same 2. Confirmed that root user is not enabled during regular boot 3. Pressed power button for 15 seconds during AC Cycle, and entered manufacturing mode 4. Able to login to root user with no password and updated the password to new one, due to enforcement 5. Verified upon rebooting, the newly configured password can be used to login to the serial console. 6. Entered Manufacturing mode again, to make sure root user password is not set to null again as it is already configured. Change-Id: I6aab8713a7c4d7d75b63b1b58ee063b09d9db990 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2020-02-07Print the completion code on errorJason M. Bills1-0/+11
In some cases, such as timeout, the PECI completion code can still provide additional data, so print it along with the error code. Tested: peci_cmds RdPCIConfig 0 0 0 ERROR 6: command failed cc:0x40 Change-Id: Ib4e8cdc5f6c45e2cd873df344a4e5d2e237a98ee Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-02-06Add PECI_CC_TIMEOUT responseJason M. Bills2-0/+6
If the driver times-out on a PECI call and returns ETIMEDOUT, return a new PECI_CC_TIMEOUT response to the caller. Tested: Ran a PECI command with a timeout and confirmed that it returns PECI_CC_TIMEOUT. Change-Id: I93e25948ef05d0e7f137500310a4dfa99ed8980c Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-02-06Authentication support for Legacy modeAgata Olender3-13/+336
This change introduces new 'Mount' API argument - UNIX_FD for named pipe. This named pipe is utilized to securely send secret data over D-Bus. Currently data consists of null-terminated char buffers with username and password. Data on receiving side is encapsulated into classes whose role is to: - keep secret as short-lived as possible - erase secret from memory when it's not needed - pass secrets (and format them) to another secure container with above capabilities New classes: - Credentials: is a class encapsulating login and password. It zeroes them at destruction. - CredentialProvider: contains Credentials, specifies SecureBuffer, allows to store credentials in SecureBuffer - SecureBuffer: char vector which zeroes itself at destruction, used to provision secret data - VolatileFile: class creating temporary file with 'owner-only' permissions in /tmp; at destruction overwrites it's contents with '*' and removes it New behavior: - when UNIX_FD is provided over D-Bus it's treated as open unix pipe. Data is read from this pipe and stored securely into CredentialsProvider - credentials are stored in applications inside CredentialsProvider object, encapsulated by unique_ptr for as long as it's needed - strings containing secrets are zeroed immediately after use - VolatileFile is used to securely pass credentials to nbdkit curl plugin instead of command line parameters. Tested: Manual and automated tests on WilsonCity platform: - positive and negative tests for authentication on both CIFS and HTTPS resources - error injection (ill-formed data transfered over pipe, pipe broken etc.) Change-Id: I608ae0380b8ad57110bc0939f71eb48604e7dc99 Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> Signed-off-by: Agata Olender <agata.olender@intel.com>
2020-02-06Detailed error handlingAgata Olender1-18/+50
Previously implemented error handling for Mount checks only if mounting was successful and returns boolean with the result. Following change introduces optional error to existing ReadyState (a.k.a. "idle state"). If state machine enters ReadyState with error it is stored into ReadyState field with std::errc and std::string message. In the case of mount failure with such error information stored, Mount returns graceful D-Bus error reply with specific error code. Tested: Manual and automated tests on WilsonCity platform: - negative tests for invalid network share, unauthorized share access, error injection (renaming expected unix socket names etc) Change-Id: I22cf9b17e9e6342aad0ae68766853734fac79b8e Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> Signed-off-by: Agata Olender <agata.olender@intel.com>
2020-02-06Integration with NBDKit for Legacy modeAgata Olender5-30/+269
This change introduces integration of virtual-media application with NBDKit. NBDKit is used here to connect to externally provided image on web and expose NBD device internally in BMC for NBD subsystem (already implemented in Proxy mode) to use. 'Mount' D-Bus call accepts 's imgUrl' and 'b rw'. Based on 's imgUrl' prefix (https:// or smb://) proper mount type is attempted. 'b rw' determines Read-Only mode for both USB Gadget and NBD stack. When 'Mount' is called, virtual-media parses arguments, determines mounting options and attempts to mount external share. For SMB protocol native CIFS Linux module is used: 1) mount(8) call is used to mound provided CIFS share 2) NBDKit loads file on mounted filesystem and exposes NBD Server on internal unix socket 3) Pre-existing code takes care of mouting gadget automatically (connecting socket to /dev/nbdX and then /dev/nbdX to USB Gadget) For HTTPS protocol provisioning is performed by NBDKit: 1) NBDKit connects to provided resource and exposes NBD Server on internal unix socket 2) Pre-existing code takes care of mouting gadget automatically (connecting socket to /dev/nbdX and then /dev/nbdX to USB Gadget) Tested: Manual and automated tests on WilsonCity platform: - mounting and unmounting images over CIFS and HTTPS (single, multiple at the same time etc) - positive and negative tests for D-Bus calls - ensuring proper information is exposed on D-Bus Change-Id: Ia2b6e8c13603521063f5c94cdfdb06f2e872e9e7 Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> Signed-off-by: Agata Olender <agata.olender@intel.com>
2020-01-30Configure special user, if not set and in mfg modeRichard Marian Thomaiyar4-0/+267
Configure special user with default passwod 0penBmc1, when the root user is not set with any password, and mark the password as expired, so that it will be forced to update on first login. This method can be used when Host interface is not available and we still need to enable root user. Note: This feature is under VALIDATION_UNSECURE flag, and hence will be available for reference only image. Tested: 1. Built the image without debug-tweaks and flashed the same 2. Confirmed that root user is not enabled during regular boot 3. Pressed power button for 15 seconds during AC Cycle, and entered manufacturing mode 4. Able to login to root user with password "0penBmc1" and updated the password to the new one, due to force password update 5. Verified upon rebooting, the newly configured password can be used to login to the serial console Change-Id: I53e68ebbe24110a116816a29fe1bf5b3142b8bc2 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2020-01-29Only rescan FRU on pmbus when PSU changesCheng C Yang1-3/+6
When a new PSU is inserted, only rescan the FRU on pmbus instead of rescan all the FRU on the system. Tested: Insert a new PSU, Redfish can show correct FRU of this PSU. Change-Id: I6868210868dda8f5f9f5fc5a52dad472cb129f88 Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
2020-01-29Gadget inactivity timeoutAgata Olender4-0/+94
MountPoints being inactive for time defined by InactivityTimeout will be unmounted. Inacitivity is measured based on USB gadget R/W statitics. InactivityTimeout must be set in json configuration and is common for all MountPoints. Remaining time to unmount inactive media is exposed per MountPoint on dbus using RemainingInactivityTimeout property. Change-Id: Ieb80e67dae6c3b4cb0482d801b5b4208884b0809 Signed-off-by: Agata Olender <agata.olender@intel.com>
2020-01-29Manage remote media state transitionsCzarnowski, Przemyslaw2-2/+782
This is a first part of bigger functionality which provides host to use virtual media. First part provides skeleton and definitions of states and events defining state machine, also brings working implementation of proxy mode and some starting point to implement legacy mode. There are at least three additional patchsets implementing legacy mode with https and cifs support and secure passing of secrets. Specifically this change adds StateMachine class used to keep track state of each mount point: - StateMachine is made as std::variant of object derived from BasicState. - Each state has its own possible transitions defined (events). - Transitions defines appropriate behavior. - Specific event triggers transition from one to other specific state (1:1 relation). Tested: Manual tests on WilsonCity platform: - mounting and unmounting using redfish and webui - check state on dbus interfaces Change-Id: I4b13085e1f8884fcedd7d97e76910c21e87ab7f8 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Czarnowski, Przemyslaw <przemyslaw.hawrylewicz.czarnowski@intel.com>
2020-01-28minor fix: PFR version BCD encoded representationAppaRao Puli1-7/+10
Major, Minor and Build number in version string should be BCD encoded. Also added 'g' prefix before hash value to sync with current BMC version representation. Tested: Read all versions exposed via PFR manager service and works fine. BMC version : "0.36-0-g1389b2" CPLD version : "1.0" BIOS version : "0.0" Change-Id: I2d6412e2daac0f7e11466bee2c265f819e72d804 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2020-01-17Add configuration classCzarnowski, Przemyslaw2-3/+244
Configuration class is used to read configration from file and validate entries. Also exposes API to serve stored data. Change-Id: Id4989ff45ff4a5cf7af7acf76a89b1c5838862f4 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Czarnowski, Przemyslaw <przemyslaw.hawrylewicz.czarnowski@intel.com>
2020-01-17Add Process and DeviceMonitor class with dependenciesCzarnowski, Przemyslaw2-1/+593
Added DeviceMonitor which watches for ndb device changes. Contains: - Udev library wrappers. - NBDevice object to manage nbd devices in errorless manner. - Process library, which manages process spawning. Change-Id: Iaf3caec56cd6084f1c17ccc5657b9b14c8e82d33 Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Czarnowski, Przemyslaw <przemyslaw.hawrylewicz.czarnowski@intel.com>
2020-01-14Fix: PFR D-Bus introspect timeout errorAppaRao Puli1-25/+29
Request bus name on connection will do a phosphor-mapper introspect. If there is delay between io->run and request_name causes the phosphor-mapper introspect failure. Due to this timing issue, some times PFR version interfaces are not advertised over D-Bus resulting in unavailability of version objects. Moved request_name close to the io->run. Also isolated all signal matchers from main. Tested: No timeout messages observed. Also Refish inventory items populates all versions properly. Change-Id: I18003e3ad0f6fa8821a4ec35a80cad017b3208c9 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2020-01-13Change the bios version dbus interface to align with bmcwebYong Li1-7/+0
bmcweb uses the software interface for bios version query in redfish, to align with it, the settings service implements the software interface, this reference needs to be changed too Tested: AC cycle the host, BiosVersion is the correct bios version: https://$BMCIP/redfish/v1/Systems/system Change-Id: I619de9ff1a2356b7da1c59cfa139344cc2114eeb Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2020-01-11Add Security Manager - ASD/User security EventSuryakanth Sekar8-0/+1065
Daemon for below functionalities 1. To start the AtScaleDebug service when remote debug on jumper & special user status and enabled. 2. To stop the AtScaleDebug service when remote debug jumper disabled and disabled the special user status. 3. Log the corresponding AtScaleDebug Events 4. Check for user security breach and log the user security event. Tested: Detecting Remote Debug jumper - enabled or disabled Enable the ASD/Disable the ASD based on jumper and spl user password Corresponding the ASD security Event should be logged Check for unsupported shell- user security event: Change shell parameter for enabled user by usermod --shell=/bin/csh <enabled username> "SecurityUserUnsupportedShellEnabled" Event should be logged Check for unsupported shell removed - user security event: change shell parameter for enabled user by usermod --shell=/bin/sh <enabled username> "SecurityUserUnsupportedShellRemoved" Event should be logged Check for Weak Password hashing algorithm Event: change the password hashing algorithm by edit file : /etc/pam.d/common-password -->sha512 to md5 set new password for any user. "SecurityUserWeakHashAlgoEnabled" Event should be logged similar change from md5 to sha512 in /etc/pam.d/common-password file Set new password for any user. "SecurityUserStrongHashAlgoRestored" Event should be logged If root user is enabled "SecurityUserRootEnabled" Event should be logged If root user is disabled "SecurityUserRootDisabled" Event should be logged Change-Id: I88f8614df31df3f35e7d08d2e84aeef7a39edea4 Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
2020-01-10Entry commit for new VM codeCzarnowski, Przemyslaw2-1026/+101
Introducing Virtual Media based on State Machine. - Logging class added - Stub for Main application Change-Id: I05ef576c170e2f9acf90800708f4447452f4050f Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> Signed-off-by: Czarnowski, Przemyslaw <przemyslaw.hawrylewicz.czarnowski@intel.com>
2019-12-23Fix: Ignore Timer when in validation unsecureRichard Marian Thomaiyar1-0/+7
Ignore timer handler, when we are in validation unsecure mode, and reside in validation unsecure mode itself. i.e. Validation unsecure must be persistent and must not be reseted based on a timer, which will get activated when we execute manufacturing command. Tested: 1. Verfied the Get Security mode command, ipmitool raw 0x30 0xB3 and saw no changes in validation unsecure mode after mfg command execution, and after 15 minutes timeout. Change-Id: Ifb338e13bf3f0a923bc488284cced8448043a2e5 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-12-21Fix: PFR CPLD boot complete checkpoint 9AppaRao Puli3-31/+47
Sometimes BMC boot complete Checkpoint 9 is not been set which is causing the BMC WDT trigger running in CPLD. This commit has a correction in timer thread which is used for checking BMC boot complete and setting checkpoint. Also enhanced debug logs for identifing any further issues in checkpoint. Tested: Flashed image on PFR enabled system and it boots fine. Change-Id: I94c7c716ebcebf533fa5a6c8066a2fb3b96f7646 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-12-19PFR: Adding functional endpoints assosicationsAppaRao Puli1-13/+19
Added functional endpoints assosications to all "Active" image objects like bmc_active, bios_active, cpld_active. This will make bmcweb happy while querying active component versions. Tested: Flashed PFR image and from redfish checked the BMC active version info by querying "/redfish/v1/Managers/bmc". Change-Id: Ief7b8f92be3a24c06ef172bf0d9d7a95bce32c15 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-12-18Fix: Changing ObjectMapper root path for PFRAppaRao Puli1-1/+4
Changed root path of PFR service manager from '/' to '/xyz/openbmc_project/pfr' for allow dynamically getting service name from ObjectMapper under that object. This will make sure the isolation of root patch specific for PFR. Tested: Flashed image with change and saw PFR Manager service works fine. Change-Id: Ic8e8a9786b2fb8a8a7cca036b6e0be16e3b5c460 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-12-18Implement Software interface to support bios version in redfishYong Li1-0/+27
bmcweb uses the Software.Activation interface to query the bios version, implement the Software.Activation and Association.Definitions to support the query. Tested: https://$BMCIP/redfish/v1/Systems/system contains the BiosVersion: "BiosVersion": "NA", Change-Id: I77fdefc5962bfc7715b125ccfec0ec57e9dd0f55 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2019-12-06PFR Manager minor fix for conditional statetmentVikram Bodireddy1-6/+14
PFR Manager minor fix for a line that uses lengthy conditinal check, instead we use if-else conditional. Change-Id: I03b2b08e6acb86d933aa952a81f51006cddd2355 Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
2019-12-06Adding RequestedApplyTime property to settingsVikram Bodireddy1-0/+8
Added "RequestedApplyTime" to settings service which will be used in firmware update. This will give option for user to set the firmware image activation like activate image 'Immediate' or Activate image on 'OnReset' etc. Tested: Changed the setting using Redfish, rebooted BMC and validated the preserved 'RequestedApplyTime' setting. Change-Id: Ib08bb82fcc651f5489d69928ddaa7e1f05ebfdcf Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
2019-12-06Add CPLD recovery image supportVikram Bodireddy4-4/+12
Support added to expose the CPLD recovery image inventory details. Tested: Verified that CPLD recovery inventory object is exposed in Redfish Software inventory query. Change-Id: Ifd92e31f7c940647c7cb2cfb353ec58220032545 Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
2019-12-06Expose recovery img state as StandbySpareVikram Bodireddy1-1/+4
In order to differentiate the recovery & active image, StandbySpare or Active value will be advertised accordingly by the inventory objects. Tested: 1. Verified that BMC / BIOS active or recovery image advertise the changes as Active / StandbySpare for the Activation state 2. With changes in bmcweb, the same will be marked as enabled / StandbySpare in the redfish schema query for the State property Change-Id: I511013c0f9e343a6b40607095057f889cd33e2af Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
2019-12-05settings: match upstream service nameJames Feist2-1/+2
Match it so the waits on things are the same. Tested: name changed Change-Id: I88171677a39d8a36fd2976122fe4f725b029735e Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-12-05Update usage info of peci_cmds utilityKarthick Sundarrajan1-5/+4
peci_cmds utility is modified to accept both decimal and hex numbers recently. Updating the usage/help information accordingly. Tested: Usage: ./peci_cmds [-a <addr>] [-s <size>] <command> [parameters] Options: -h Display this help information -v Display additional information about the command -a Address of the target. Accepted values are 48-55 (0x30-0x37). Default is 48 (0x30) -s Size of data to read or write in bytes. Accepted values are 1, 2, 4, 8, and 16. Default is 4 Commands: Ping Ping the target GetTemp Get the temperature GetDIB Get the DIB RdPkgConfig Read Package Config <Index Parameter> WrPkgConfig Write Package Config <Index Parameter Data> RdIAMSR MSR Read <Thread Address> RdPCIConfig PCI Read <Bus Dev Func [Reg]> RdPCIConfigLocal Local PCI Read <Bus Dev Func [Reg]> WrPCIConfigLocal Local PCI Write <Bus Dev Func Reg Data> RdEndpointConfigPCILocal Endpoint Local PCI Config Read <Seg Bus Dev Func Reg> WrEndpointConfigPCILocal Endpoint Local PCI Config Write <Seg Bus Dev Func Reg Data> RdEndpointConfigPCI Endpoint PCI Config Read <Seg Bus Dev Func Reg> WrEndpointConfigPCI Endpoint PCI Config Write <Seg Bus Dev Func Reg Data> RdEndpointConfigMMIO Endpoint MMIO Read <AType Bar Seg Bus Dev Func Reg> raw Raw PECI command in bytes Change-Id: I91c9a3775dde47051e558dba7fc54dfeadb924e4 Signed-off-by: Karthick Sundarrajan <karthick.sundarrajan@intel.com>
2019-12-05Change mdrv2 to match upstream dimm propertiesCheng C Yang2-21/+34
According to the commit change e59bc11535c21ca8134bc390403dc085d015837e in phosphor-dbus-interface, update mdrv2 to match the new dimm properties. Tested: Redfish can show correct DIMM information. Change-Id: I0727a195a988cbeae7d5706ae080c739617302ee Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
2019-12-05Change mdrv1 to match upstream dimm propertiesCheng C Yang2-21/+34
According to the commit change e59bc11535c21ca8134bc390403dc085d015837 in phosphor-dbus-interface, update mdrv1 to match the new dimm properties. Tested: Redfish can show correct DIMM information. Change-Id: I93f68755d2b8d1f8b3cfbb0ffa037da41915b407 Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
2019-12-05Fix the peci_cmds utilityKarthick Sundarrajan1-53/+53
At present, the peci_cmds utility just accepts hex for all numerical inputs. Fixed it to accept numericals in decimal or hex or octals. Tested: The index and Param in the output are in hex. root@intel-obmc:~# peci_cmds rdpkgconfig 10 16 -v PECI target[0x30]: Pkg Read of Index 0a Param 0010 cc:0x40 0x00000a9c root@intel-obmc:~# peci_cmds rdpkgconfig 0x10 0x16 -v PECI target[0x30]: Pkg Read of Index 10 Param 0016 cc:0x40 0x00690a00 Change-Id: Idce477653de9ad394b857196b652c66bd02e1e5c Signed-off-by: Karthick Sundarrajan <karthick.sundarrajan@intel.com>
2019-12-03Make SOL progess not persistJames Feist1-3/+3
This gets initialized in IPMI to 0 every boot anyways, might as well just make it not persist. Tested: Doesn't persist Change-Id: I068cc0fc48533f334752da68d8f51b208cfdbe48 Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-12-03Change the LED status for redundancy loss eventYong Li1-2/+2
EPS defines the redundancy loss as degraded state: Blinking green led. The log priority should be warn, to align with redfish event log. Tested: With two PSUs, disconnected one PSU to trigger this event, the green led will blink. Change-Id: I66f654f31af8cc6749741bbad4eae6491492cf35 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2019-11-26Add peci_WrEndPointConfig_seq for sequential writeKenny L. Ku2-20/+41
Tested: Verified with peci_cmds. Signed-off-by: Kenny K. Ku <kenny.k.ku@intel.com> Change-Id: I72ff9de2a765b5f98ec287783764f71a226cb9cf
2019-11-26Separate stepping from model in peci_GetCPUID()Jason M. Bills2-12/+17
Including the stepping in the CPUID was too granular and was causing a lot of unnecessary updates to code that uses it. This change returns the CPU model as the main parameter for identifying the processor and gives the stepping as a separate parameter in case it is needed. Tested: Combined with the changes in the consumers of this library, verified that the CPU model can correctly be retreived and used to determine the correct PECI calls to use. Change-Id: Ifef3ed4c952bf303bcb43aebb6a013e91719756e Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-11-25Remove host error monitorJason M. Bills6-1704/+0
Host error monitor moved to its own repo, so remove it from here. Change-Id: Ie8e16cf1931a80cb7674b410a2e1e68c47acb111 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-11-22Sync configuration data between settings and PSU redundancy serviceYong Li4-29/+108
Add support for reading configuration from settings service, and store all these data into dbus; Rank order configuration needs to be queried from PSU redundancy service, since it will be changed from time to time. Tested: Applied https://gerrit.openbmc-project.xyz/#/c/openbmc/intel-ipmi-oem/+/27220/, With two PSUs, AC cycle the board, // two PSUs available ipmitool raw 0x30 0x2E 0x05 05 02 // Return the default order 0,0, instead of the default settings is 0 root@intel-obmc:~# ipmitool raw 0x30 0x2E 0x03 03 01 00 00 Wait for 2 minutes, the order will be changed to ascending order, and start the rotation ipmitool raw 0x30 0x2e 0x3 03 00 01 02 // Set a new order 1,2 root@intel-obmc:~# ipmitool raw 0x30 0x2d 0x03 0x01 0x01 0x02 00 // Return the new order root@intel-obmc:~# ipmitool raw 0x30 0x2E 0x03 03 01 01 02 Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I50c469ae7b2f089d3e7cc70932e5eed4f7164f74
2019-11-18Update special mode mgr as per D-Bus interfaceRichard Marian Thomaiyar3-28/+55
Updated special-mode-mgr service to expose the property as per the D-Bus interface SpecialMode in the community Tested 1. Verified that manufacturing mode entered as per 15 second power buttong press during AC cycle 2. Verified that expired based on timeout or restriction mode property change 3. Verified validation unsecure features works as expected Change-Id: I87b67424f657a1a19545b4dc18a80a2fddf8ee44 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-11-13PFR Firmware resiliency error eventsAppaRao Puli1-10/+36
Adding support to log the PFR firmware resiliency major and minor error events to redfish. This change uses new event registry entries. Tested: Simulated the PFR error and checked the redfish events using below URI. URI: /redfish/v1/Systems/system/LogServices/EventLog/Entries RESPONSE: { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/172", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:02:52+00:00", "EntryType": "Event", "Id": "172", "Message": "BMC firmware resiliency error. Error reason: BMC image authentication failed(MinorCode:0x01).", "MessageArgs": [ "BMC image authentication failed(MinorCode:0x01)" ], "MessageId": "OpenBMC.0.1.BMCFirmwareResiliencyError", "Name": "System Event Log Entry", "Severity": "Critical" } Change-Id: I7566c5572170d12278313522f097fce250ea87aa Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-11-13PFR: CPLD mailbox i2c address change to 0x38Vikram Bodireddy1-1/+2
This commit change the PFR mailbox i2c address as the earlier address 0x70 had got conflicts with HSBP. Tested: tested on platform with debug CPLD. Change-Id: I99a2d89c7d558f5c7c2890151474afc647406aed Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
2019-11-11Fix Settings Vector ProblemJames Feist1-1/+1
{} only initalizes the std::optional, not the thing in the optional. Intialize it correctly. Tested: Warnings went away, on reboot changes persisted Change-Id: I3c40317f077d241f0dc938910a28876f911d8021 Signed-off-by: James Feist <james.feist@linux.intel.com>
2019-11-11Add LED Support for Power RedundancyCheng C Yang2-2/+40
Add status LED support for Power Unit Redundancy. Tested: AC off or remove one PSU, status LED changes to amber blinking. AC on the PSU again, status LED changes back to solid green. Change-Id: I86c9e03c0e2a5f035a6bf5140c850c1551fb40a7 Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
2019-11-07Added support for validation unsecure modeRichard Marian Thomaiyar3-1/+36
Support added for validation unsecure mode under compile flag which will be enabled only with debug-tweaks. Default is disabled. Tested: Along with intel-ipmi-oem changes for set security mode command 1. Verified that system goes to validation unsecure mode as per the Set Security Mode command. 2. Able to execute all the manufacturing mode command in this state 3. Mode preserved during reboot and not in reset to defaults Change-Id: Ice33d2c02ac8c0c0276ba16651f8acbd3d5b8cd4 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>