openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Bruce Lee (李昀峻)" <Bruce_Lee@quantatw.com>
To: Nan Zhou <nanzhou@google.com>,
	"edtanous@google.com" <edtanous@google.com>,
	"rhanley@google.com" <rhanley@google.com>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Fan PWM settings via Redfish
Date: Fri, 12 Mar 2021 06:37:29 +0000	[thread overview]
Message-ID: <PSAPR04MB423111B8AD11A19255C79215F86F9@PSAPR04MB4231.apcprd04.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5760 bytes --]

Hi All,

We are designing and implementing the Fan PWM settings via Redfish. The goal is that clients can set sensor value to bmc via Redfish.

We divide the work into three phases.

Phase 1 is to remove the definition “BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE” and use new definition to “BMCWEB_SPECIAL_MODE_SENSOR_OVERRIDE”.
The “BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE” was added by Intel group, please refer to https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/30000,
The Intel solution has 4 conditions needs to match one of them and that can be work to override sensor but actually not all project needs those conditions, so we want to propose to remove the insecure definition and use new definition to include the intel solution and execute when compile. It would be no compile time with option for common project. And the insecure issue we will discuss in phase 2.

Example below:
-----------------------------------------------------------------------------------------------------
[Before modified]
#ifdef BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE
// Proceed with sensor override
setSensorsOverride(sensorAsyncResp, allCollections);
return;
#endif
doIntelSpecialModeManager code …
-----------------------------------------------------------------------------------------------------
[After modified]
#ifdef BMCWEB_SPECIAL_MODE_SENSOR_OVERRIDE
      doIntelSpecialModeManager code …
      return;
#endif
//Proceed with sensor override
setSensorsOverride(sensorAsyncResp, allCollections);
-----------------------------------------------------------------------------------------------------


Phase 2 is to add a condition to check the sensor name’s Mutable value of EM if the value is true do the sensor override function else not do.
The Mutable value can be set in the sensor configuration of Entity-Manage, when using the patch command to override the sensor, it needs to check the EntityManager subtree’s sensor name and its interface “xyz.openbmc_project.Configuration.I2CFan.Connector” to check the corresponding property name’s mutable value to decide whether executing the override function.
This achieves feature parity with the ipmi::sensor::Mutability parameter of the old hardcoded YAML configuration files

Execute steps:

1.       Patch command to override sensor.

2.       Check the EM of sensor’s Mutable value

3.       If Mutable value is true do sensor override action else not do.


Phase 3 is to add a new get command to get the Zone_$id’s "Manual" value and patch command to change the fan mode from auto to manual mode ("Manual":true).
Because the fan control is use package phosphor-pid-control, when we need to set fan pwm, it needs to set the fan mode from auto mode to manual mode, for now, the phosphor-pid-control has already provided ipmi-oem command to achieve this feature, so we need to implement this fan mode change via redfish command.

Example URLs                            |Method     |Example Payload
--------------------------------------- |-------------- |--
/redfish/v1/Managers/bmc      |GET           |"Oem": {
                                                      |                   |         Fan": {
                                                     |                   |                    "FanZones": {
                                                      |                   |                              "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones",
                                                      |                   |                              "@odata.type": "#OemManager.FanZones",
                                                      |                   |                              "Zone_0": {
                                                      |                   |                                         "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone_0",
                                                      |                   |                                         "@odata.type": "#OemManager.FanZone",
                                                      |                   |                                         "Chassis": {
                                                      |                   |                                                    "@odata.id": "/redfish/v1/Chassis/GSZ_EVT"
                                                      |                   |                                         },
                                                      |                   |                                         "FailSafePercent": 100.0,
                                                      |                   |                                         "MinThermalOutput": 0.0,
                                                      |                   |                                         "ZoneIndex": 0.0,
                                                      |                   |                                         "Manual":false
                                                      |                   |                              },
                                                      |                   |                   },
                                                      |                   |         },
                                                     |                   |}
--------------------------------------- |-------------- |----

/redfish/v1/Managers/bmc    | PATCH      |"Oem": { "Fan": { "FanZones": { "Zone_0": { "Manual":true } } }

If any thoughts on this topic, feel free to give your comments. Thanks!

Sincerely,
Bruce

[-- Attachment #2: Type: text/html, Size: 34641 bytes --]

             reply	other threads:[~2021-03-12  6:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  6:37 Bruce Lee (李昀峻) [this message]
2021-03-12 17:40 ` Fan PWM settings via Redfish Ed Tanous
2021-03-16  8:34   ` Bruce Lee (李昀峻)
2021-03-16  9:34   ` Bruce Lee (李昀峻)
2021-03-16 15:18     ` Ed Tanous
2021-03-17 10:17       ` Bruce Lee (李昀峻)
2021-03-17 15:52         ` Ed Tanous
2021-03-18  9:24           ` Bruce Lee (李昀峻)
2021-03-18 16:08             ` Ed Tanous
2021-03-25  7:28               ` Bruce Lee (李昀峻)
2021-03-31  6:46                 ` Bruce Lee (李昀峻)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PSAPR04MB423111B8AD11A19255C79215F86F9@PSAPR04MB4231.apcprd04.prod.outlook.com \
    --to=bruce_lee@quantatw.com \
    --cc=edtanous@google.com \
    --cc=nanzhou@google.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=rhanley@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).