From a7aa5c66167c4103ef2bf891274a6de62d414dd7 Mon Sep 17 00:00:00 2001 From: Mike Zeller Date: Wed, 22 Nov 2023 20:07:42 +0000 Subject: [PATCH] Add some documentation --- ipcc/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ipcc/src/lib.rs b/ipcc/src/lib.rs index d00cf71770..d3660682a5 100644 --- a/ipcc/src/lib.rs +++ b/ipcc/src/lib.rs @@ -4,8 +4,10 @@ // Copyright 2023 Oxide Computer Company -//! Utilities for key/value pairs passed from the control plane to the SP -//! (through MGS) to the host (through the host/SP uart) via IPCC. +//! An interface to libipcc (inter-processor communications channel) which +//! currently supports looking up values stored in the SP by key. These +//! values are passed from the control plane to the SP (through MGS) or +//! are maniuplated through the `ipcc` command found on Helios. use cfg_if::cfg_if; use omicron_common::update::ArtifactHash; @@ -187,16 +189,20 @@ enum IpccKey { Dtrace = 4, } +/// Interface to the inter-processor communications channel. +/// For more information see rfd 316. pub struct Ipcc { handle: IpccHandle, } impl Ipcc { + /// Creates a new `Ipcc` instance. pub fn new() -> Result { let handle = IpccHandle::new()?; Ok(Self { handle }) } + /// Returns the current `InstallinatorImageId`. pub fn installinator_image_id( &self, ) -> Result {