Return an error for invalid target addresses

If the provided target address is outside of the valid range,
return an error instead of sending the command.

Tested:
Ran each command with valid and invalid target addresses and
confirmed that the error is returned appropriately.

Change-Id: I49940a3e6353429b70f9c2012b53fa94c5355d13
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
1 file changed
tree: f863ac1e76990eeb94106a84b33e35b6f0a72a39
  1. linux/
  2. .clang-format
  3. .clang-ignore
  4. CMakeLists.txt
  5. LICENSE
  6. MAINTAINERS
  7. peci.c
  8. peci.h
  9. peci_cmds.c
  10. README.md
README.md

libpeci

libpeci is a library that provides various APIs to interface with the IOCTLs provided by the PECI driver in the OpenBMC kernel. Currently available here:

https://github.com/openbmc/linux/blob/dev-5.4/include/uapi/linux/peci-ioctl.h

peci_cmds

This repo also includes a peci_cmds command-line utility with functions that map to the libpeci APIs. It can be used to test PECI functionality across the library, driver, and hardware.