summaryrefslogtreecommitdiff
path: root/intel-pfr-manager
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-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-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-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>
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-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-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-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-07Updated PFR event log codeAppaRao Puli1-43/+65
Updated PFR event log code to use latest Redfish Event log message registry entries defined per components(BMC, BIOS, ME, CPLD) basis. This commit updates only Panic reason and Recovery reason event log messages. Tested: Loaded image on PFR enabled platform and checked Last panic reason by skipping BMC check point setting, Recovery action by corrupting recovery image. Change-Id: If38a385154571ef5924ca3bd7c1c52a2a380a284 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-10-30Modified PFR property names to UpperCamelCaseAppaRao Puli1-2/+2
Updated PFR property names such as UfmProvisioned, UfmLocked to UpperCamelCase as per coding guidelines. Tested: Checked the properties from redfish along with other commit and observed expected result on PFR platforms. Change-Id: I10112001754448bcd41abfa61b4191dd15a13c46 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-10-14PFR: Reading bmc version from SPIAppaRao Puli4-49/+201
Added support to pull BMC active and recovery image version from PFM region of associated MTD device instead of CPLD. Becuase CPLD has provision to hold only major and minor version but PFM in PFR image will have more information about version (major, minor, build number and build hash etc...). So added SPI device read capability and read BMC active/recovery image version from PFM. Tested: Fetched FirmwareInventory information from redfish, using below URI and verified BMC active & recovery version has build number along with major and minor numbers. URI: /redfish/v1/UpdateService/FirmwareInventory/bmc_active /redfish/v1/UpdateService/FirmwareInventory/bmc_recovery RESPONSE: "Version": "00.11-07-1e5c2d" Change-Id: I3d8176f776992a1b0454046a1b8ebd33d84a91d3 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-10-14PFR: PFR manager ad-hoc fixesAppaRao Puli3-39/+41
PFR manager miscellaneous fixes - Updated redfish EventLog ID and Args. - Updated panic/recovery reasons as per new spec. - Corrected referrence pointer in readCpldReg function. Tested: Loaded image in wht and validate Redfish event logs Change-Id: I4bccbfe650271bcfcc24037c50d385c5fa17dbf1 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-10-09Removed company prefix from 'intel-pfr' nameAppaRao Puli4-8/+6
Removed 'Intel' Prefix from D-Bus path and interface related to PFR as it is generic feature. Different OEM's can have their own way of implementing the PFR feature but the D-Bus interface for exposing properties like Provisioning and locking status should be implementation agnostic. So remove 'Intel' Prefix from D-Bus path and interface names in Intel PFR manager implementation. Tested: Verified using redfish URI '/redfish/v1/Systems/system' along with dependent patch in bmcweb and observed correct response on PFR enabled platform. RESPONSE: ........ "Oem": { "OpenBmc": { "FirmwareProvisioning": { "Locked": true, "Provisioned": true } } } ..... Change-Id: Id70ea5b54427d8d884147204f9028d7d9b2da99e Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-08-13Merge "Support to update PFR D-Bus properties cache data"Puli, Apparao3-63/+148
2019-07-31Support to update PFR D-Bus properties cache dataAppaRao Puli3-63/+148
1) Added support to update the PFR D-Bus properties cache data when Host/Chassis State changes. 2) Optimized code to use list for creating Software versions object. 3) Added missing "ufm_locked" state property to Attributes. Tested: Did chassis power on/off/soft/reset using ipmitool and validated the d-bus properties updated or not. Also checked for proper object creation with right data. Change-Id: I706e53d47c2bcca5f3374e632b300622429f6f1b Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-31Correcting the CPLD mailbox register addressAppaRao Puli1-6/+6
There are some changes in CPLD HAS document and CPLD mailbox register addresses are changed. So corrected it as per new documentation. Tested: Cross validated addresses with specification and loaded new CPLD firmware and checked versions info. Change-Id: Ib05c03052dca3986c137103067ac42add8c62d46 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-31PFR: Setting BMC boot finished checkpointAppaRao Puli4-0/+111
Adding support to monitor the StartupFinished systemd signal and setting the "bmc boot finished" checkpoint to cpld. Tested: Did BMC reset and cross verified bmc boot finished check-point properly set or not. Change-Id: I14e6aa8b364b28da6cd6b2473cde8502d1ebd77c Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-30Adding PFR Redfish event log support.AppaRao Puli3-0/+347
This commit adds the support to read cpld for any events and log them in Redfish events. There are 3 Types are events logged, 1) Platform firmware panic events 2) Platform firmware recovery events 3) Platforms firmware error code events Tested: Restarted BMC, performed power operation on/off etc.. and verified the event mointor/timer star and stop functionality. Also verified the redfish event logs using postman tool. URI: /redfish/v1/Systems/system/LogServices/EventLog/Entries METHOD: GET Change-Id: Icd9793d637121621933f84520b7e70fa66c16364 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-22Adding Activation for associated Version interfaceAppaRao Puli1-0/+15
Activation interface should be associated with Version interface to represents the activation state. Its missed in initial commit and causing redfish query failing for these Software Objects. Tested: Validated the redfish response by using below request URI URI: /redfish/v1/UpdateService/FirmwareInventory/cpld METHOD: GET Change-Id: Ifb3fa779ddbbac2cfee12ec7d3cb0093fd87089f Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-22Adding intel-pfr-manager serviceAppaRao Puli6-0/+284
This commit adds the intel-pfr-manager service which creates the dbus service, objects and interfaces by reading data from CPLD. This is used to report PFR properties for use of user interfaces. 1) PFR provisioning status 2) BMC active/recovery version 3) BIOS active/recovery version 4) CPLD version Tested: Loaded new service and verified functionality using busctl. End-to-end testing will be done with redfish interface. Change-Id: I352a70fa9cb26a0e9e448e64e0b029fd18f9368a Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
2019-07-19Added library support for CPLD communicationAppaRao Puli7-0/+596
Added library support for CPLD communciation. This library exposes the API's used for fetching the versions(bmc/bios/cpld active & recovery) information from CPLD. Tested: Loadded this library as part of intel pfr manager service(other commit) and verified functionality. Change-Id: Ibeffd183cacd9d5cc528665eabe4a7ecb5ef7e6a Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>