meson: increase max post code per cycle

Since post code log exceeded the maximum size during a power cycle,
increase the maximum size to 20480.

Tested: Confirm that post code log for each power cycle has been
fully recorded.

Change-Id: Ie58c9bb3445a1ea88d39d0637827f9c9c07276d1
Signed-off-by: Colin Huang <colin.huang2@amd.com>
1 file changed
tree: 3d60796973489e2572b583c68727048b1f28235f
  1. inc/
  2. schema/
  3. scripts/
  4. service_files/
  5. src/
  6. subprojects/
  7. .clang-format
  8. LICENSE
  9. meson.build
  10. meson.options
  11. OWNERS
  12. post-code-handlers.json
  13. README.md
README.md

phosphor-post-code-manager

This phosphor-post-code-manager repository provides an infrastructure to persist the POST codes in BMC filesystem & it also owns the systemd services that are responsible for exposing the BIOS Post Codes to rest of the world via redfish.

To Build

To build phosphor-post-code-manager package , do the following steps:

meson <build directory>
ninja -C <build directory>

Hosted Services

This repository ships xyz.openbmc_project.State.Boot.PostCode.service systemd service along with its template version and a tiny binary that exposes the necessary dbus interfaces & methods to extract the POST codes per boot cycle.

Architecture

This repository is tightly coupled with phosphor-host-postd OpenBMC repository which is responsible for emitting the dbus signals for every new POST Code.

phosphor-post-code-manager is architected to look for the property changed signals which are being emitted from the service that hosts Value property on xyz.openbmc_project.State.Boot.Raw interface & archive them per boot on the filesystem, so that those can be exposed over redfish

Special Post code handling/eventing

Platforms can provide custom configuration to allow for special handling of specific postcodes. Special handling include starting user configured systemd unit files and/or creating a structured event as defined by the user. The JSON configuration file can be passed in using the --config PATH or -c PATH options.

Configuration format:

[
  {
    "name": "SpecialPostCode",
    "description": "Perform special handling of 0x12",
    "primary": "0x12",
    "secondary": "0x1234",
    "targets": ["my_special.service"]
  },
  {
    "name": "PowerFailure",
    "description": "Detect a power rail fault",
    "primary": "0x12",
    "targets": ["power_failure.service"],
    "event": {
      "name": "xyz.openbmc_project.State.Power.PowerRailFault",
      "arguments": {
        "POWER_RAIL": "MyDevice",
        "FAILURE_DATA": ""
      }
    }
  }
]

Each entry in the array describes a special handler for a specific post code.

  • primary - [required] The primary post code to match as a hex string.
  • secondary - [optional] The secondary post code (hex string) to match. If not present, the matches all post codes which match just the primary
  • targets - [optional] List of systemd targets to start when the matching post code is received.
  • event - [optional] The descriptor of the event to create with phosphor-logging.
    • event::name - Name of the event log. See log-create --list for a list of possible events which can be created
    • event::arguments - The named argument list which will be used to create the event.