peci_cmds: allow a larger write length for AW FCS

The AW FCS byte is included in the write length but is calculated
by the driver, so it's not part of the user data.  This change
allows the correct write length to be sent in a raw command without
providing a dummy byte for the AW FCS.

Tested:
peci_cmds raw 0x30 0x11 0x1 0xc5 0 3 0 0 0 4 0 0 0 0 0 0 0 0 0 -v
PECI target[0x30]: Raw command: 30 11 01 0xc5 0x00 0x03 0x00 0x00 0x00
0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Raw response: 0x40
   0x40

Change-Id: I01668e7709c3b248ce2e98fc8e061e316a5b3097
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
1 file changed
tree: 420a2381a2989df7a21f7a9f3b67c1d55ab6832c
  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.