Home
last modified time | relevance | path

Searched full:occ (Results 1 – 25 of 247) sorted by relevance

12345678910

/openbmc/linux/drivers/fsi/
H A Dfsi-occ.c16 #include <linux/fsi-occ.h>
42 struct occ { struct
58 #define to_occ(x) container_of((x), struct occ, mdev) argument
69 struct occ *occ; member
84 struct occ *occ = to_occ(mdev); in occ_open() local
95 client->occ = occ; in occ_open()
98 get_device(occ->dev); in occ_open()
160 * Copy the user command (assume user data follows the occ command in occ_write()
180 rc = fsi_occ_submit(client->occ->dev, cmd, data_length + 6, cmd, in occ_write()
202 put_device(client->occ->dev); in occ_release()
[all …]
/openbmc/linux/drivers/hwmon/occ/
H A Dsysfs.c14 /* OCC status register */
17 /* OCC extended status register */
31 struct occ *occ = dev_get_drvdata(dev); in occ_active_store() local
37 rc = occ_active(occ, active); in occ_active_store()
49 struct occ *occ = dev_get_drvdata(dev); in occ_sysfs_show() local
53 if (occ->active) { in occ_sysfs_show()
54 rc = occ_update_response(occ); in occ_sysfs_show()
58 header = (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_show()
119 struct occ *occ = dev_get_drvdata(dev); in occ_error_show() local
121 occ_update_response(occ); in occ_error_show()
[all …]
H A Dcommon.c21 #define OCC_ERROR_COUNT_THRESHOLD 2 /* required by OCC spec */
32 /* OCC sensor type and version definitions */
133 static int occ_poll(struct occ *occ) in occ_poll() argument
144 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll()
149 rc = occ->send_cmd(occ, cmd, sizeof(cmd), &occ->resp, sizeof(occ->resp)); in occ_poll()
151 occ->last_error = rc; in occ_poll()
152 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll()
153 occ->error = rc; in occ_poll()
159 occ->error_count = 0; in occ_poll()
160 occ->last_error = 0; in occ_poll()
[all …]
H A Dp9_sbe.c7 #include <linux/fsi-occ.h>
21 struct occ occ; member
30 #define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ)
37 struct occ *occ = dev_get_drvdata(kobj_to_dev(kobj)); in ffdc_read() local
38 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in ffdc_read()
83 static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p9_sbe_occ_send_cmd() argument
87 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in p9_sbe_occ_send_cmd()
96 sysfs_notify(&occ->bus_dev->kobj, NULL, in p9_sbe_occ_send_cmd()
137 struct occ *occ; in p9_sbe_occ_probe() local
146 occ = &ctx->occ; in p9_sbe_occ_probe()
[all …]
H A Dcommon.h16 * Same response format for all OCC versions.
71 * OCC only provides one sensor data block of each type, but any number of
91 struct occ { struct
98 u8 poll_cmd_data; /* to perform OCC poll command */
99 int (*send_cmd)(struct occ *occ, u8 *cmd, size_t len, void *resp, argument
103 struct mutex lock; /* lock OCC access */
114 unsigned long last_safe; /* time OCC entered "safe" state */
128 int occ_active(struct occ *occ, bool active); argument
129 int occ_setup(struct occ *occ);
130 int occ_setup_sysfs(struct occ *occ);
[all …]
H A Dp8_i2c.c6 #include <linux/fsi-occ.h>
18 /* OCB (on-chip control bridge - interface to OCC) registers */
23 /* OCC SRAM address space */
30 struct occ occ; member
34 #define to_p8_i2c_occ(x) container_of((x), struct p8_i2c_occ, occ)
51 /* data from OCC is big-endian */ in p8_i2c_occ_getscom()
114 static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p8_i2c_occ_send_cmd() argument
122 struct p8_i2c_occ *ctx = to_p8_i2c_occ(occ); in p8_i2c_occ_send_cmd()
138 /* trigger OCC attention */ in p8_i2c_occ_send_cmd()
154 /* wait for OCC */ in p8_i2c_occ_send_cmd()
[all …]
/openbmc/qemu/hw/ppc/
H A Dpnv_occ.c2 * QEMU PowerPC PowerNV Emulation of a few OCC related registers
34 /* OCC sensors */
52 static void pnv_occ_set_misc(PnvOCC *occ, uint64_t val) in pnv_occ_set_misc() argument
58 occ->occmisc = val; in pnv_occ_set_misc()
60 qemu_set_irq(occ->psi_irq, irq_state); in pnv_occ_set_misc()
66 PnvOCC *occ = PNV_OCC(opaque); in pnv_occ_power8_xscom_read() local
72 val = occ->occmisc; in pnv_occ_power8_xscom_read()
75 qemu_log_mask(LOG_UNIMP, "OCC Unimplemented register: Ox%" in pnv_occ_power8_xscom_read()
84 PnvOCC *occ = PNV_OCC(opaque); in pnv_occ_power8_xscom_write() local
89 pnv_occ_set_misc(occ, occ->occmisc & val); in pnv_occ_power8_xscom_write()
[all …]
/openbmc/openbmc-test-automation/openpower/
H A Dtest_occ_power.robot2 Documentation Suite to test OCC power module.
16 Verify OCC Object Count
17 [Documentation] Verify that OCC and inventory entries match.
40 ... msg=OCC and inventory entry counts are mismatched.
43 Verify OCC State When Host Is Booted
44 [Documentation] Verify OCC state when host is booted.
47 Verify OCC State ${1}
50 Verify OCC State After Host Reboot
51 [Documentation] Verify OCC state and count after host reboot.
54 ${occ_count_before}= Count OCC Object Entry
[all …]
/openbmc/openpower-occ-control/
H A Docc_status.hpp13 #include <org/open_power/OCC/Status/server.hpp>
26 namespace occ namespace
30 namespace Base = sdbusplus::org::open_power::OCC::server;
42 // OCC status instance. Ex. for "occ0", the instance is 0
45 // IPMI sensor ID for a given OCC instance
51 // OCC sensors definitions in the map
54 // OCC sysfs name prefix
55 const std::string sysfsName = "occ-hwmon";
64 * @brief Implementation of OCC Active Status
81 * @param[in] manager - OCC manager instance
[all …]
H A Docc_pass_through.hpp7 #include <org/open_power/OCC/PassThrough/server.hpp>
17 namespace occ namespace
21 sdbusplus::org::open_power::OCC::server::PassThrough>;
27 * @brief Implements org.open_power.OCC.PassThrough
46 std::unique_ptr<open_power::occ::powermode::PowerMode>& powerModeRef
50 /** @brief Pass through command to OCC from dbus
52 * @returns OCC response as an array
56 /** @brief Pass through command to OCC from openpower-occ-control
58 * @returns OCC response as an array
72 /** @brief Pass-through occ path on the bus */
[all …]
H A Docc_manager.hpp27 namespace occ namespace
44 /** @brief Default time, in seconds, between OCC poll commands */
60 * @brief Builds and manages OCC objects
72 /** @brief Adds OCC pass-through and status objects on the bus
122 // I2C OCC status objects are initialized directly in Manager()
140 * @param[in] instance - the OCC instance id
158 * @brief Set all sensor values of this OCC to NaN.
159 * @param[in] id - Id of the OCC.
163 /** @brief Set all sensor values of this OCC to NaN and non functional.
165 * @param[in] id - Id of the OCC.
[all …]
H A Dpldm.hpp29 using namespace open_power::occ;
36 using InstanceToEffecter = std::map<open_power::occ::instanceID, EffecterID>;
40 using SensorToInstance = std::map<SensorID, open_power::occ::instanceID>;
43 /** @brief OCC instance starts with 0 for example "occ0" */
44 constexpr open_power::occ::instanceID start = 0;
54 * @brief Abstracts the PLDM details related to the OCC
66 /** @brief Constructs the PLDM Interface object for OCC functions
68 * @param[in] occActiveCallBack - callBack handler to invoke when the OCC
76 std::function<bool(open_power::occ::instanceID, bool)> in Interface()
78 std::function<void(open_power::occ::instanceID, bool)> sbeCallBack, in Interface()
[all …]
H A DREADME.md1 # OpenPOWER OCC Control Service
3 This service will handle communications to the On-Chip Controller (OCC) on Power
4 processors. The OCC provides processor and memory temperatures, power readings,
5 power cap support, system power mode support, and idle power saver support. OCC
6 Control will be interfacing with the OCC to collect the temperatures and power
21 Server status: `systemctl status org.open_power.OCC.Control.service`
23 To restart the service: `systemctl restart org.open_power.OCC.Control.service`
36 OCC Firmware Interface Spec for Power10:
37 <https://github.com/open-power/docs/blob/P10/occ/OCC_P10_FW_Interfaces_v1_17.pdf>
39 OCC Firmware: <https://github.com/open-power/occ/tree/master-p10>
[all …]
H A Docc_command.hpp6 #include <org/open_power/OCC/PassThrough/server.hpp>
16 namespace occ namespace
93 * @brief Send commands and process respsonses from the OCC
104 /** @brief Ctor to set up which OCC the command will go to
106 * @param[in] instance - OCC instance
117 /** @brief Send the command to the OCC and collect the response.
128 /** @brief Instance number of the target OCC */
131 /** @brief OCC path on the bus */
134 /** @brief OCC device path
143 /** @brief Indicates whether or not the OCC is currently active */
[all …]
H A Docc_status.cpp14 namespace occ namespace
27 lg2::info("Status::occActive OCC{INST} changed to {STATE}", "INST", in occActive()
37 // Reset last OCC state in occActive()
50 "Status::occActive: Unable to add error watch(s) for OCC{INST} watch: {ERROR}", in occActive()
56 // Update the OCC active sensor in occActive()
61 // Update powercap bounds from OCC in occActive()
97 // Clear throttles (OCC not active after disabling device) in occActive()
107 * In it's constructor, Status checks Device::bound() to see if OCC is in occActive()
127 … "Status::occActive: Unable to add error watch(s) again for OCC{INST} watch: {ERROR}", in occActive()
138 // even though the OCC is active (this can occur if the BMC is rebooted in occActive()
[all …]
H A Dmeson.build2 'openpower-occ-control', 'cpp',
16 conf_data.set_quoted('OCC_CONTROL_BUSNAME', 'org.open_power.OCC.Control')
20 conf_data.set_quoted('OCC_NAME', 'occ')
21 conf_data.set_quoted('OCC_MASTER_NAME', 'occ-hwmon.1')
22 conf_data.set_quoted('OCC_DEV_PATH', '/dev/occ')
24 conf_data.set_quoted('OCC_CONTROL_PERSIST_PATH', '/var/lib/openpower-occ-control')
32 if get_option('i2c-occ').allowed()
33 conf_data.set_quoted('OCC_HWMON_PATH', '/sys/bus/i2c/drivers/occ-hwmon/')
35 conf_data.set_quoted('I2C_OCC_DEVICE_NAME', 'p8-occ-hwmon')
37 conf_data.set_quoted('OCC_HWMON_PATH', '/sys/bus/platform/drivers/occ-hwmon/')
[all …]
H A Docc_manager.cpp22 namespace occ namespace
63 // - create the PowerMode object to control OCC modes
64 // - create statusObjects for each OCC device found
65 // - waits for OCC Active sensors PDRs to become available
72 // Create one occ per cpu in findAndCreateObjects()
73 auto occ = std::string(OCC_NAME) + std::to_string(id); in findAndCreateObjects() local
74 createObjects(occ); in findAndCreateObjects()
114 "Manager::findAndCreateObjects(): Creating {QTY} OCC Status Objects", in findAndCreateObjects()
123 // Find/update the processor path associated with each OCC in findAndCreateObjects()
184 if (open_power::occ::utils::isHostRunning()) in checkAllActiveSensors()
[all …]
H A Docc-active.sh2 # set and unset occ active for all occ's in system
9 echo "Usage: occ-active.sh [argument]"
10 echo " enable - set occ's to active state"
11 echo " disable - set occ's to inactive state"
15 OCC_CONTROL_SERVICE="org.open_power.OCC.Control"
17 busctl tree $OCC_CONTROL_SERVICE --list | grep -i occ | xargs -r -n1 -I{} \
18 busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \
/openbmc/docs/designs/oem/ibm/
H A Dsystem-power-mode.md19 to as the On Chip Controller or OCC. The OCC provides real time power and
21 an Active state. Anytime the OCC state changes to active, the BMC will need to
22 send a mode change and idle power saver (IPS) settings to the OCC. It will also
28 When a system is booted, the OCC will move to an ACTIVE state. In the ACTIVE
29 state, the OCC is managing the processor frequency, power consumption, and
31 necessary to reset the OCC. When this happens, the OCC will move out of ACTIVE
32 state. After recovery, the OCC will be put back into the ACTIVE state. Anytime
33 the OCC state changes to ACTIVE or the customer updates these new parameters at
35 the OCC.
61 The new code would be part of the openpower-occ-control repository. New code
[all …]
/openbmc/openbmc-test-automation/lib/
H A Dopen_power_utils.robot17 Get OCC Objects
18 [Documentation] Get the OCC objects and return as a list.
29 ${occ_list}= Get Endpoint Paths ${OPENPOWER_CONTROL} occ*
34 Get OCC Active State
35 [Documentation] Get the OCC "OccActive" and return the attribute value.
41 ${cmd}= Catenate busctl get-property org.open_power.OCC.Control
42 ... /org/open_power/control/occ${value} org.open_power.OCC.Status OccActive
60 # object_name Object name (e.g. "occ", "cpu" etc).
98 Get Active OCC State Count
99 [Documentation] Get active OCC state count.
[all …]
/openbmc/linux/Documentation/hwmon/
H A Docc.rst1 Kernel driver occ-hwmon
14 This driver supports hardware monitoring for the On-Chip Controller (OCC)
15 embedded on POWER processors. The OCC is a device that collects and aggregates
16 sensor data from the processor and the system. The OCC can provide the raw
20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the
23 The P9 version of this driver is a client driver of the FSI-based OCC driver.
24 It will be probed automatically by the FSI-based OCC driver.
32 The OCC sensor ID is an integer that represents the unique identifier of the
33 sensor with respect to the OCC. For example, a temperature sensor for the third
37 Some entries are only present with certain OCC sensor versions or only on
[all …]
/openbmc/openpower-debug-collector/dump/tools/bmcdump/plugins/
H A Docc4 # @brief: Get the occ information.
10 #fetch occ control data
11 file_name="occ.log"
13 desc="occ control"
15 org.open_power.OCC.Control \
22 #fetch occ control host data
23 desc="occ control host"
25 org.open_power.OCC.Control \
31 #fetch occ sensors data
32 desc="occ sensor"
[all …]
/openbmc/phosphor-debug-collector/tools/dreport.d/openpower.d/plugins.d/
H A Docc4 # @brief: Get the occ information.
10 #fetch occ control data
11 file_name="occ.log"
13 desc="occ control"
15 org.open_power.OCC.Control \
22 #fetch occ control host data
23 desc="occ conrol host"
25 org.open_power.OCC.Control \
31 #fetch occ sensors data
32 desc="occ sensor"
[all …]
/openbmc/openbmc/meta-openpower/recipes-phosphor/occ/
H A Dopenpower-occ-control_git.bb1 SUMMARY = "OpenPOWER OCC controller"
3 HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
15 DBUS_SERVICE:${PN} += "org.open_power.OCC.Control.service"
16 SYSTEMD_SERVICE:${PN} += "op-occ-enable@.service"
17 SYSTEMD_SERVICE:${PN} += "op-occ-disable@.service"
40 EXTRA_OEMESON:append = "${@bb.utils.contains('MACHINE_FEATURES', 'i2c-occ', ' -Di2c-occ=enabled', '…
47 # Ensure host-stop and host-startmin targets wants needed occ states
48 OCC_TMPL = "op-occ-{0}@.service"
50 OCC_INSTFMT = "op-occ-{0}@{2}.service"
55 # Set the occ disable service to be executed on host error
[all …]
/openbmc/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dtc_police_occ.sh68 local occ=$(tc_police_occ_get)
73 (( occ + 1 == $(tc_police_occ_get) ))
74 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))"
77 (( occ == $(tc_police_occ_get) ))
78 check_err $? "Got occupancy $(tc_police_occ_get), expected $occ"
87 (( occ + 1 == $(tc_police_occ_get) ))
88 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))"
91 (( occ + 1 == $(tc_police_occ_get) ))
92 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))"
95 (( occ == $(tc_police_occ_get) ))
[all …]

12345678910