{"id":18368615,"url":"https://github.com/openbmc/hiomapd","last_synced_at":"2025-04-06T17:31:45.504Z","repository":{"id":51329882,"uuid":"79340077","full_name":"openbmc/hiomapd","owner":"openbmc","description":"Reference implementation of the Host I/O Map flash access protocol for OpenPOWER systems","archived":false,"fork":false,"pushed_at":"2024-12-13T16:04:56.000Z","size":1255,"stargazers_count":1,"open_issues_count":13,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-22T04:02:03.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openbmc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-18T12:57:36.000Z","updated_at":"2024-12-12T15:33:39.000Z","dependencies_parsed_at":"2023-11-29T00:21:39.318Z","dependency_job_id":"f64b6084-e663-4231-b698-075f61d77bef","html_url":"https://github.com/openbmc/hiomapd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fhiomapd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fhiomapd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fhiomapd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fhiomapd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbmc","download_url":"https://codeload.github.com/openbmc/hiomapd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522366,"owners_count":20952533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T23:26:43.454Z","updated_at":"2025-04-06T17:31:44.603Z","avatar_url":"https://github.com/openbmc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HIOMAP: The Host I/O Mapping Protocol for Power-based Systems\n\nThis repository contains\n[the specification for the Power systems Host I/O mapping protocol (HIOMAP)](Documentation/protocol.md)\nalong with a reference implementation of the daemon and associated utilities.\n\nFor historical reasons, source and generated binaries may refer to 'mbox' or\n'the mailbox interface' in contexts that aren't completely sensible. It's\nunfortunate, but it's our current reality.\n\n# Building\n\nThe build system is a standard autotools setup. `bootstrap.sh` runs all the jobs\nnecessary to initialise autotools.\n\nBy default the build is configured and built _with_ the 'virtual PNOR' feature\ndiscussed below. The virtual PNOR functionality is written in C++, and due to\nsome autotools clunkiness even if it is disabled mboxd will still be linked with\n`CXX`.\n\nIf you are hacking on the reference implementation it's recommended to run\n`bootstrap.sh` with the `dev` argument:\n\n```\n$ ./bootstrap.sh dev\n$ ./configure\n$ make\n$ make check\n```\n\nThis will turn on several of the compiler's sanitizers to help find bad memory\nmanagement and undefined behaviour in the code via the test suites.\n\nOtherwise, build with:\n\n```\n$ ./bootstrap.sh\n$ ./configure\n$ make\n$ make check\n```\n\nThrough the virtual PNOR feature the daemon's role as a flash abstraction can be\naugmented to support partition/filesystem abstraction. This is complex and\nunnecessary for a number of platforms, and so the feature can be disabled at\n`configure` time. If you do not have a C++ compiler for your target, set\n`CXX=cc`.\n\n```\n$ ./bootstrap.sh\n$ ./configure CXX=cc --disable-virtual-pnor\n$ make\n$ make check\n```\n\n# Coding Style Guide\n\n## Preamble\n\nFor not particularly good reasons the codebase is a mix of C and C++. This is an\nugly split: message logging and error handling can be vastly different inside\nthe same codebase. The aim is to remove the split one way or the other over time\nand have consistent approaches to solving problems.\n\nHowever, the current reality is the codebase is developed as part of OpenBMC's\nsupport for Power platforms, which leads to integration of frameworks such as\n[phosphor-logging](https://github.com/openbmc/phosphor-logging). It's noted that\nwith phosphor-logging we can achieve absurd duplication or irritating splits in\nwhere errors are reported, as the C code is not capable of making use of the\ninterfaces provided.\n\nSo:\n\n## Rules\n\n1. Message logging MUST be done to stdout or stderr, and MUST NOT be done\n   directly via journal APIs or wrappers of the journal APIs.\n\n   Rationale:\n\n   We have two scenarios where we care about output, with the important\n   restriction that the method must be consistent between C and C++:\n\n   1. Running in-context on an OpenBMC-based system\n   2. Running the test suite\n\n   In the first case it is desirable that the messages appear in the system\n   journal. To this end, systemd will by default capture stdout and stderr of\n   the launched binary and redirect it to the journal.\n\n   In the second case it is _desirable_ that messages be captured by the test\n   runner (`make check`) for test failure analysis, and it is _undesirable_ for\n   messages to appear in the system journal (as these are tests, not issues\n   affecting the health of the system they are being executed on).\n\n   Therefore direct calls to the journal MUST be avoided for the purpose of\n   message logging.\n\n   Note: This section specifically targets the use of phosphor-logging's\n   `log\u003cT\u003e()`. It does not prevent the use of `elog\u003cT\u003e()`.\n\n# License and Copyright\n\nCopyright 2017 IBM\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fhiomapd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbmc%2Fhiomapd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fhiomapd/lists"}