Modify BMC busy flag mailbox register value
BMC busy period is the time for which BMC is busy (e.g. Flashing).
PFR-Manager should not send the security packets to BMC during that
interval. This commit corrects the BMC Busy Mailbox register value
to 0x80 as per the PFR HAS.
Tested:
Before update :
root@bmc-maca4bf018ce3a0:~#
busctl call xyz.openbmc_project.PFR.Manager
/xyz/openbmc_project/pfr xyz.openbmc_project.PFR.Mailbox
ReadMBRegister u 0x63
y 0
After update :
root@bmc-maca4bf018ce3a0:~#
busctl call xyz.openbmc_project.PFR.Manager
/xyz/openbmc_project/pfr xyz.openbmc_project.PFR.Mailbox
ReadMBRegister u 0x63
y 0x80
Change-Id: I633a2d34dd889465309f7417f4e0e7c892d8d174
Signed-off-by: Alex Antony <alexx.kanjirathingal.antony@intel.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
diff --git a/libpfr/src/pfr.cpp b/libpfr/src/pfr.cpp
index d17a679..998c7b9 100644
--- a/libpfr/src/pfr.cpp
+++ b/libpfr/src/pfr.cpp
@@ -566,7 +566,7 @@
int setBMCBusy(bool setValue)
{
uint32_t bmcBusyReg = 0x63;
- uint8_t valHigh = 0x01;
+ uint8_t valHigh = 0x80;
uint8_t mailBoxReply = 0;
if (getMBRegister(bmcBusyReg, mailBoxReply))
@@ -576,7 +576,7 @@
uint8_t readValue = mailBoxReply | valHigh;
if (setValue == false)
{
- readValue &= 0b11111110;
+ readValue &= 0b01111111;
}
if (!setMBRegister(bmcBusyReg, readValue))
{