build: enable systemd system units

Enable the systemd system unit for the psu reset target
in the configuration and Makefile for this daemon instead of storing it
in the recipe, per the daemon(7) manpage guidelines.

Change-Id: I565b10619ae0250845b6a10f6fce73b018b494f7
Signed-off-by: Patrick Venture <venture@google.com>
3 files changed
tree: 5baad6c4064b674f27bc5ec8507b96fe9dca0bc6
  1. .clang-format
  2. .gitignore
  3. bootstrap.sh
  4. cable.cpp
  5. cable.hpp
  6. configure.ac
  7. cpld.cpp
  8. cpld.hpp
  9. eth.cpp
  10. eth.hpp
  11. gbmc-psu-hardreset.target
  12. LICENSE
  13. main.cpp
  14. main.hpp
  15. MAINTAINERS
  16. Makefile.am
  17. psu.cpp
  18. psu.hpp
  19. README.md
README.md

Sys Commands (0x32) {#sys-commands-0x32}

There are and will be a variety of sys specific commands.

Cablecheck - SubCommand 0x00 {#cablecheck-subcommand-0x00}

The cablecheck command checks whether the BMC is seeing traffic between itself and the host's NIC. Sys specifies which if_name is expected to be connected. The BMC presently only checks traffic on the interface specified. There are now ethernet statistics available over IPMI, which can be checked directly in lieu of this.

Request

Byte(s)ValueData
0x000x00Subcommand
0x01If_name lengthWhere you expect the cable, eth0 or eth1, etc
0x02 ...The nameThe string, not null-terminated

Response

Byte(s)ValueData
0x000x00Subcommand
0x010x00/0x010 for false, 1 for true

CpldVersion - SubCommand 0x01 {#cpldversion-subcommand-0x01}

Any CPLD on the system that can only be read directly via the BMC can have its version exported to Sys via the cpld version command.

Request

Byte(s)ValueData
0x000x01Subcommand
0x01CPLD IDA one-byte identifier for the CPLD file to read, unsigned byte.

Response

Byte(s)ValueData
0x000x01Subcommand
0x01MajorMajor version
0x02MinorMinor Version
0x03Sub 1Third version number
0x04Sub 2Fourth version number

Per the above, if the version number doesn't fit in a byte it'll be cast to size.

GetNcsiEthDevice - SubCommand 0x02 {#getncsiethdevice-subcommand-0x02}

The BMC itself must have hard-coded into the image, which ethernet device is connected to the host NIC. This is true also in the mapping of ethernet device to channel number. The channel number is used to configure the ethernet device over IPMI, instead of the interface name. This is because we leverage the current IPMI command set to read and write the networking configuration. Sys can be programmed already to have this information in the board protobuf, however, this information -- can be read from the BMC over IPMI.

Request

Byte(s)ValueData
0x000x02Subcommand

Response

Byte(s)ValueData
0x000x02Subcommand
0x01Channel numberThe IPMI channel number for use with the network configuration commands (such as reading the MAC or IP address of the BMC).
0x02if_name lengthThe length of the if_name in bytes.
0x03...if_nameThe interface name, not null-terminated

DelayedHardReset - SubCommand 0x03 {#delayedhardreset-subcommand-0x03}

Sys needs to be able to tell the BMC to reset the host but given a delay in seconds.

Request

Byte(s)ValueData
0x000x03Subcommand
0x01..0x04Seconds to delay (uint32)

Response

Byte(s)ValueData
0x000x03Subcommand

Nemorad Setting (0x34) {#nemora-setting-0x34}

It's a security requirement that the BMC must be able to persist a setting to disable plaintext console transmission via Nemora. The setting is stored in the BMC read-write filesystem, and Nemorad has a utility class to read and write that setting, which this OEM command uses. The command can be used for read-only as well as a read-then-write to ensure the state of the file.

For now, there is only one Subcommand; the byte is there in case we want to extend this command later.

Request

Byte(s)ValueData
0x000x00Subcommand
0x00want_to_set1 if a set operation is desired; 0 if only reading.
0x01desired_value1 if plaintext should be allowed; 0 if plaintext should be disallowed; ignored if want_to_set is 0.

Response

Byte(s)ValueData
0x000x00Subcommand
0x00Current value1 if plaintext is currently allowed; 0 if plaintext is currently disallowed