| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the pin, like "A7" to the number that identifies
that GPIO in /sys/class/gpio/.
This most likely only supports ASPEED BMCs, though of course
support can be added for others if the need arises and this
code is still in use.
Change-Id: I404716652ffc29c27933ed13225bc074341fa473
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gpio_init, read the GPIO definitions out of the JSON
instead of D-Bus.
As many applications configure several GPIOs at once, the
cJSON structure for the GPIOs stays loaded in memory until
explicitly freed by calling gpio_inits_done().
Change-Id: I3ba216545a4a367744ce1fac09ca19c4d8d9d302
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change the read_gpios function to get the power GPIO
configuration out of JSON instead of D-Bus.
Note that the Host Control GPIOs are no longer used and will
be removed from the GpioConfigs structure in a future commit.
Change-Id: If95f9b4f11af052148332aec436abd23e2e5819d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
| |
Document the JSON format for the GPIO configuration.
Change-Id: I74f9300f480724615ff031a7c75973224c86a760
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the cJSON module to load in the GPIO definitions used by
the other skeleton code into a cJSON structure. Its memory
should be released by calling cJSON_Delete on it when complete.
This is the first commit in a series that will move the GPIO
configuration data from D-Bus into a JSON file, which is both
more appropriate for read only data and the first step in
getting rid of the system_manager.py file that currently hosts it.
Change-Id: If1ef19e7988d28e3075828f61e88a606631bcd89
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The Power8 systems now use the in-kernel FSI driver, so the GPIOs used
for bitbanging are not available. This modifies the FSI SBE startup
code to use the kernel FSI infrastructure.
Change-Id: Ie7f7faab6af89b4311734eae4e252485a2163764
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
| |
Change-Id: I0980c573087588bbdac7f224b36bdb9c48370d66
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.
Change-Id: Ic21c2fe45c509d9821963e49610a2adbf761f8f9
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes these chassis related services will fail with below error:
Power GPIO: call to getGpioConfiguration failed:
GDBus.Error:org.freedesktop.DBus.Error.Service
Unknown: The name org.openbmc.managers.System was not provided by any
.service files
These gpio pins cannot be configured properly, and cannot power on/off
host.
Add error handing to terminate the service in such error, systemd will
restart them to try again
Change-Id: I3ce7383825f2b9715fdd82e1dec0725cef83073c
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was using BMC control service to call warmReset() to reboot BMC.
But now legacy BMC control service is removed so the call will fail.
Use BMC state manager instead to trigger BMC reboot.
Partially resolves openbmc/openbmc#3064.
Tested: Run legacy code update and verify PrepareForupdate() does reboot
the BMC.
Change-Id: I9f0fcddce9fb8f4007db0dd17b3cd3840c8848fc
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The old inventory manager is no longer needed with the
final integration of phosphor-inventory-manager complete
https://gerrit.openbmc-project.xyz/#/c/8793/ must be
merged before this commit.
Change-Id: I9ce3616b0e9aa272ea1254073e4c7b28353abf0a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
| |
Change-Id: Ia248f971e2c8a1ff80f1e6947ef0af283d4ec9ba
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This application is slowly being deprecated. This change
is to allow us to pull the legacy settings object out
of the image.
Tested: I built an image with these changes plus the removal of
settings and verified our CT regression bucket still passed.
Change-Id: Ia9416b2faba9a0e3b10f433a0e597530f75177e5
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
The OpenBMC state function has been moved to the phosphor-state-manager
repository. The chassis power state is tracked via systemd targets
so notification from this power application is no longer needed.
Change-Id: Ie74b0fe589944ab65645f92ab3539c2ee74dda9c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Save users who assume the machine status is available with 'obmcutil
status' by aliasing status to state.
Change-Id: Icdfa6f62ff6f719386edd892ec80fe29c32087f0
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The code has an explicit check for a minimum allowed
PGOOD polling interval. Decrease that from 1s to 500ms
as there are new requirements on a specific system
to poll at the 500ms.
Change-Id: If42ecc9244b5e0d8d5b5c17275241f820537d34a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
| |
The device tree file is s2600wf.dts, update to match.
Change-Id: Iefcfefd8b6329aa9afb4b831882e2861a0f6a30a
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Changing the PS redundancy object path from
/org/openbmc/sensors/host/PowerSupplyRedundancy to
/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy since
All Witherspoon REST API URIs should being with
xyz/openbmc_project or org/open_power
Change-Id: Ic1360cef2b4939835d47b995a8542aee598bb939
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
GPIO api does not support repeat read(read multi times after one open).
A workaround is close and reopen the device before the second read.
The root cause is that the file descriptor is not moved to beginning of the file, this patch can fix this issue
Change-Id: I40e5602669c9ab6f0dddf5aa77040466cbfa3738
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
| |
Wfp is an Intel platform.
Change-Id: I0991d404f6c5fb8d35d7b524caff0d194d75ee90
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
The pci_reset GPIOs are not connected on PASS2 Romulus.
There is no need to toggle the GPIOs.
Change-Id: I78afa4358e2540d72517d5f2ae953f0e6319db1e
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
| |
Change-Id: Ia4ded0c195204543c3df671ea471610237f5f44b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added getting the basename for the output file name in
download manager. This is to prevent any security holes
that would let the user out of the FLASH_DOWNLOAD_PATH dir.
(e.g. passing a file name of ../etc/shadow)
Resolves openbmc/openbmc#1898
Change-Id: Ie33fe56599e86c29da4b2eae8ef070f0866d054c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nick reported an issue where the BMC became unusable after the host hit
a bug and began "spewing a lot of messages to the console". Save
ourselves some DBus transactions and immediate execution of systemd
transitions by introducing a `chassiskill` command to directly deassert
the the power-up GPIO ourselves. This will immediately terminate the
host and free up resources for the BMC to become responsive. As a bonus,
the PGOOD monitoring will then execute to clean up the resulting
inconsistent BMC/Host state for us.
Change-Id: I106a4202b6544b8e78b04938230a4eeee5f132bb
Requested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
| |
If the user passes --wait, try to immediately get the object but wait
until we reach standby before trying again if the first attempt fails.
The correct strategy is probably to look for registration of names on
the bus, but this ghetto approach also works.
Change-Id: I71b6f5d4fcf5841510da6f9877726b875b019d51
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I51b4d8a9760e0c73f0c36ff6619a484718db3a4b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I902c6674111a6c1790d08ddf02819dddeede970d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verbose output is limited to state change requests at the moment, as
they are the operations that take significant amounts of time. Further,
the verbose output is implemented as following the tail of the journal
until the requested state change either succeeds or fails.
In testing it was observed that the journal output tends to lag the
DBus event that signals the completion of the state transition. As such
the patch adds a tuning parameter defining a further waiting period
beyond the receipt of the completion signal so that the verbose output
looks "reasonable". The default value of the tuning parameter was
roughly chosen to correlate well with the journal output on a
Witherspoon system for the `poweron` command.
Change-Id: I847e2bfeba55d6a3d7d1f7ff1ba1901993c9b505
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The technique to block is to attach a listener for systemd JobRemoved
property change events, change the desired OpenBMC state
management property to trigger the systemd transition, and then run the
gobject dbus mainloop. We terminate the mainloop by invoking quit() in
the callback on the captured mainloop object.
Additionally, the result of the transition (success or failure) is
judged in the callback. We can't obtain the result by returning it, and
as we are using Python 2 we cannot meaningfully mutate captured
variables to expose it. Instead, a variable is created on the callback
function object after it is defined but before the function is invoked,
which is mutated inside the function (which can reference its own
object) when called. The result is retrieved after the mainloop has
terminated and is propagated up the call chain to form the exit status.
Change-Id: Ic19aa604631177abea7580de2357d8c6812ee874
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I9d803da8c0ff8862039bb5b7adc07952208820d1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ibb6d90dbca9c1bffd7b714dc70342b7927ced94e
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Id33e3802530aa1bf0cb2af88c16bd94f8bfa219d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I2e310eef36eb7bcea58d1567dcf3efe9a9dbeeb8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
| |
This implements the partner for-loop to the run_one_command() function,
moving the implementation out of main(). Again this is to elevate the
main() implementation to a higher level of abstraction and reduce
cyclomatic complexity.
Change-Id: I0abe5ee026750efd10dafb6f113359f035ba5bd8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
Move the complexity of the for-loop body implementation away from the
loop itself. This reduces the general cyclomatic complexity a little
and allows for easier consideration of the implementation in isolation.
Change-Id: Id779dec720d3582cf89cd9981bcfd8b101b0d386
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I0b1b023aeac7103f0be92201c2475193b0f69e5c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ie461546c9056829b1b4a081a4031ac91c10e6a42
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
This was prioritised below the built-in value anyway so I suspect it
is an unused feature, especially now that the org.openbmc interfaces
(and the method feature) have gone away.
Change-Id: Icd5ab91b5fc08b0f6cc461390f4ac39f7e9e41cd
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Idb1f30dc553cfa95b4669df317a5dbac5dbe8966
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
| |
And remove a now-redundant branch.
Change-Id: I92e91cfb307a98cd60a26e5e5d34bf0ddc384d3f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
| |
This changes the format slightly, but not for the worse in my opinion.
Change-Id: Ie9297c22f8c3ceff4fc56ae567dbdbb0f128dd51
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I85b74febc33e8f44d9df86718ce6e3ba1d6d6933
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I54e04fba2108edce0dbe504ae40f4ae4e073188e
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I768fbffde2025bb0f92b3aa82fe00f558a68fc2b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ia71c777dd41ca5551319f0a733dbdfce248a876b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I4c4a3dd142650f60271011f2dce096166c9917a4
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|