From 1a380b0a106eb9194fb271212e821141d09f0812 Mon Sep 17 00:00:00 2001 From: Karthick Sundarrajan Date: Mon, 25 Nov 2019 12:17:26 -0800 Subject: Change the CapabilitiesFlags property into booleans 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 --- settings/include/defaults.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/settings/include/defaults.hpp b/settings/include/defaults.hpp index 8095746..c83e608 100644 --- a/settings/include/defaults.hpp +++ b/settings/include/defaults.hpp @@ -244,7 +244,11 @@ inline void loadSettings(sdbusplus::asio::object_server &objectServer, "/xyz/openbmc_project/control/chassis_capabilities_config", "xyz.openbmc_project.Control.ChassisCapabilities"); - setting->addProperty("CapabilitiesFlags", static_cast(0)); + setting->addProperty("CapabilitiesFlags", static_cast(7)); + setting->addProperty("ChassisIntrusionEnabled", true); + setting->addProperty("ChassisFrontPanelLockoutEnabled", true); + setting->addProperty("ChassisNMIEnabled", true); + setting->addProperty("ChassisPowerInterlockEnabled", false); setting->addProperty("FRUDeviceAddress", static_cast(32)); setting->addProperty("SDRDeviceAddress", static_cast(32)); setting->addProperty("SELDeviceAddress", static_cast(32)); -- cgit v1.2.3