summaryrefslogtreecommitdiffstats
path: root/pysystemmgr
Commit message (Collapse)AuthorAgeFilesLines
* Add getObjectFrom* interfaces back inAndrew Geissler2018-03-271-1/+33
| | | | | | | | | | | | | | | | | Got a bit zealous with the removal of "legacy" interfaces from system_manager.py in https://gerrit.openbmc-project.xyz/#/c/8874/ and removed some still required by phosphor-host-ipmid code for some of the legacy sensors. Only adding the minimum required back in with this commit. Tested: Flashed image on witherspoon and verified host errors are no longer reported. Resolves openbmc/openbmc#2975 Change-Id: I6ba601be6310c57122f5e2f1dc37c6eae5417771 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Port to python 3CamVan Nguyen2018-03-122-8/+12
| | | | | | | | | | Port code to python 3 yet remain backward compatible to python 2. This port is in preparation for yocto 2.4 upgrade. Partially resolves openbmc/openbmc#2920 Change-Id: If174ce9444bde4e21fb086764f4def017e423201 Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Remove all legacy function from system managerAndrew Geissler2018-02-161-132/+0
| | | | | | | | | | | | | | This commit removes all of the un-used interfaces in order to get it down to its bare function and to make eventual removal of this legacy application easier Tested: Built image and verified witherspoon system still powers on as expected and no new errors or issues show up in basic regression. Change-Id: I55b7f3ebe68ce224bfccf14b0e9a4ceb4617f3d8 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* pep8 fixesAdriana Kobylak2018-02-122-3/+7
| | | | | | | | Also ignore the configs/ directory since it only contains system configuration files named <system>.py. Change-Id: I0416239c4030ce5bc39473e65e560016cd4ffc75 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Spelling fixesGunnar Mills2017-10-251-1/+1
| | | | | Change-Id: Ia4ded0c195204543c3df671ea471610237f5f44b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* pysystemmgr: Fix pci_reset_outsLei YU2017-08-221-1/+1
| | | | | | | | | The pcie_reset_outs is incorrect and cause the PCIE reset functionality broken. Fix this by correctly parsing the GPIO config table. Change-Id: I14bef6eba32c43fcc8e13ec956ad2e171d3e90b8 Signed-off-by: Lei YU <mine260309@gmail.com>
* pysystemmgr: Dynamically locate the gpiochipAndrew Jeffery2017-02-061-1/+15
| | | | | | | | | This is required due to differences in the number of GPIOs between AST2400 and AST2500, which affects base GPIO value in the GPIO number space. Change-Id: I755aa340dc6a06a47a43bff8afb99d3a75f39185 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* GPIO abstraction for power and host controlLei YU2017-01-121-8/+16
| | | | | | | | | | | | | | | | | | | | In libopenbmc_intf/power_gpio.c there are GPIO abstractions for power related GPIOs. Host control related GPIOs need to do the same abstraction. The changes include: 1. Add host control related GPIOs in gpio_configs and update system_manager.py 2. Update control_host_obj.c to use the abstracted GPIOs 3. Update GPIO_CONFIGS for all machines and add host control related GPIOs power_gpio will be renamed to gpio_configs in next commit; Resolves openbmc/openbmc#814 Change-Id: I7832065d495d7d64c5df2f5b177005b97e68900a Signed-off-by: Lei YU <mine260309@gmail.com>
* obmc-mgr-system: Support GPIOs in AA, AB, ACXo Wang2017-01-101-6/+7
| | | | | | | Add support for two letter GPIO names that start with A. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ie3a063f476f0ba84e2c8ad0415d7a6db59e8bda0
* op-pwrctl: Hold PCI resets until BootProgress passes BASE_INITIALIZATION stateYi Li2016-11-181-2/+3
| | | | | | | | | | | | When powering on host, hold PCI resets until hostboot passes stage "BASE_INITIALIZATION"(0x14). This fix applies to Firestone and Garrison. Partially resolves openbmc/openbmc#315 Change-Id: Ic71c81406ac188b34df89569e2264ea0b94406f3 Signed-off-by: Yi Li <adamliyi@msn.com>
* gpio: Raise exception on GPIO lookup failureXo Wang2016-10-061-3/+7
| | | | | | | | | This allows dbus calls to gpioInit to fail instead of only returning a default value. This behavior allows the C-side GPIO lookup to error out as expected. Signed-off-by: Xo Wang <xow@google.com> Change-Id: I13ad20de5d209716f26e46c12ca6941eb3dd5997
* pwrctl: Add latch output to power controlXo Wang2016-10-041-2/+3
| | | | | | | | | | | | On the Zaius machine, the BMC signals that power up the CPU are gated by a latch to protect against GPIO blips during BMC reset/power loss. This adds an optional power GPIO configuration that controls the latch's enable pin. Its behavior is to assert high when the op-pwrctl runs, allowing power_up lines to propagate past their latches. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ibf0d1db771033cb9bba82575cca1bd21cfb3ad3d
* system_manager, libobmc-intf: Add power GPIO configuration interfaceXo Wang2016-10-041-0/+10
| | | | | | | | | | | | | This adds a dbus call (in org.openbmc.managers.System) and C binding (in libopenbmc-intf) to read a POWER_CONFIG from the Python system configuration that abstracts GPIO functionality (power good, reset, etc) from their net names in GPIO_CONFIG. This should eventually replace machine-specific patches to op-pwrctl that define their own power and reset lines. Change-Id: I56eaaf60ef852b68124e4a765942243ad17d06ac Signed-off-by: Xo Wang <xow@google.com>
* Fix for Power Restore PolicyRatan Gupta2016-09-271-2/+36
| | | | | | | | | | | | | This fix is to make the Restore_last_state of Power Restore Policy to working properly. eg:- if the last state is Host_powered_on/off and system goes for pdu reboot then system should reach to the Host_Powred_On/Off state. Fixes openbmc/openbmc#196 Change-Id: If4bdb65a21452d7aa041312fcdbb1daa1b1b0424 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* configs: Remove gpio code from config filesBrad Bishop2016-09-233-1/+12
| | | | | | | Move to a new obmc.system module. Change-Id: Ie02a4b2c14cfcf272d8823d44fb9d7c03b796c87 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* inventory: Move INVENTORY_ROOT to inventory moduleBrad Bishop2016-09-231-1/+2
| | | | | Change-Id: Ic68d4a48ff46002858934e0b9c9b1694a2a17a08 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* python: add vim modelinesBrad Bishop2016-09-231-0/+2
| | | | | Change-Id: Ic13d79892e3efe6f7bad357ad747e6fd25299d02 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Use super to construct dbus.service.ObjectBrad Bishop2016-09-121-3/+3
| | | | | Change-Id: I830decfc523d435c6b9ecdc9ffffec7956c3b85d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: cleanupBrad Bishop2016-09-061-1/+1
| | | | | | | select python via /usr/bin/env Change-Id: I426a8947e277892c3084ef08c246e98b625c3d10 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* systemmgr: Remove state managementBrad Bishop2016-08-311-52/+0
| | | | | | | | | | With the switch to systemd this isn't needed anymore. A small bit remains allowing the obmcutil cmdline to continue reporing the familiar states for now. Change-Id: I4c9a0201e0237fdcbd4f69f0de05c92f223827f0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* pysystemmgr: Handling SIGCHLD signalYi Li2016-08-221-0/+3
| | | | | | | | | | | SystemManager starts multiple child processes when system state changes. Set parent process to ignore the SIGCHLD signal, to prevent child processes transforming into zombies when they terminate. Resolves openbmc/openbmc#206 Change-Id: Ic8baa0cbb97f2df8fcc462a732a4194e4a6d3f8c Signed-off-by: Yi Li <adamliyi@msn.com>
* Remove unused CACHE_PATH variable from configsBrad Bishop2016-07-261-4/+0
| | | | | | | | | The library function doing the caching now makes the parent directory if it doesn't exist so also removing that bit of code from the system manager. Change-Id: I30a55737a51e698d977dbc3f30208db1d4e0e87e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: wait for objects with mapper waitBrad Bishop2016-07-261-48/+7
| | | | | | | | This is much faster than the current introspection based mechanism. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I1a737cab00311e9e0c0b63f4d8a487085cdf44e0
* system_manager: Remove bus from lookup responseBrad Bishop2016-07-261-14/+3
| | | | | | | | Remove the busname field from the 'GetObject' method responses. Applications should get the busname information from the mapper. Change-Id: Id548f3d5d6afda8334ad1163d66f69832591511a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Remove dead codeBrad Bishop2016-07-241-20/+0
| | | | | | | | Remove a reference to 'BMC_INIT' state which isn't used. Remove heartbeat code that isn't used. Change-Id: I2de0c881372085519a15235703881054c5a9adfa Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Run pep8 on system_manager.pyBrad Bishop2016-07-221-248/+246
| | | | | Change-Id: I976228399027420f255f09622b02352e1799fe91 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove unnecessary InterfacesAdded signalsBrad Bishop2016-07-101-1/+0
| | | | | | | | | | Remove ObjectManager signals emitted before a bus name is owned. This isn't necessary now that the system_manager can detect objects via NameOwnerChanged. Change-Id: Ia2b626a926392b50d20c26474e6c9a9fdb3ca2f0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Export objects prior to bus name grabBrad Bishop2016-07-101-0/+1
| | | | | | | | | The default behavior in pyphosphor changed such that ObjectManager and Properties signals are not emitted by default. Enable signals just prior to bus name grab. Change-Id: I27a2de4b60482dd843702396f33c7cdccaf17277 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Defer busname ownership until init completeBrad Bishop2016-07-101-1/+1
| | | | | | | | | Avoid race conditions where applications expecting an object to be present upon recipt of NameOwnerChanged find that the object hasn't been created yet. Change-Id: I4236a3898055a84b00e1eaf37f32e0192b683a0f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_mananger: Add a name owner handlerBrad Bishop2016-07-101-0/+34
| | | | | | | | | Add a bus name handler so the system manager can detect objects implemented by services that create objects before owning a bus name. Change-Id: Ic311133a8e532e7f2441102689632f5821dbf589 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* system_manager: Add try_next_state functionBrad Bishop2016-07-101-16/+19
| | | | | | | | Add a re-usable try_next_state function. A handful of idiomatic python improvements. Change-Id: I435aaaeb5760a677f8fd292f396cdbdae1195674 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Install python workbook to well-known locationBrad Bishop2016-06-101-6/+1
| | | | | | | This removes the need to pass the system configuration to all the scripts. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Reorganize directory structureBrad Bishop2016-06-104-0/+259
Moving to directory per-application layout. This facilitates building single applications which is useful in the Yocto build environment since different applications satisfy different OpenBMC build requirements. A number of issues are also addressed: - All applications were pulling in libsystemd and the gdbus libs irrespective of whether or not they were needed. - gpio.o duplicated in every application - moved to libopenbmc_intf - Added install target Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud