public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "EDK" <edk.dan@gmail.com>
To: discuss@edk2.groups.io, devel@edk2.groups.io, michael.d.kinney@intel.com
Cc: daniel.samuelraj@broadcom.com
Subject: Re: Driver health : Posting message in MessageList
Date: Wed, 31 Mar 2021 09:58:34 -0400	[thread overview]
Message-ID: <CABHQtYuku3V=KyS1uHN3TPMdderVojNfv7xvz3yqNF5Jb+gkqQ@mail.gmail.com> (raw)
In-Reply-To: <CABHQtYv1azcBL2mT92RJokq0Pb7VZXpGk7qFbX0zg1bk=KhppQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6897 bytes --]

+ Mike

On Tue, Mar 30, 2021 at 1:56 AM EDK <edk.dan@gmail.com> wrote:

> Hi ,
>
> For our products, we have UEFI Driver and HII Driver as two separate
> images (this is a requirement for our product because we want to keep UEFI
> Driver as thin as possible).
>
>    - Main role of UEFI Driver is providing boot services,
>    reporting/solving health issues, posting messages in message list, EXT SPT
>    etc.
>
> FYI: UEFI Driver will install HII Config access protocol (*CAP*) and
> driver health formset on the controller handle if the controller has health
> issue; at this time, HII image won't be in picture (HII image come into
> play ONLY when controller is healthy); if UEFI Driver detects controller is
> healthy then it will not install HII Config access protocol (if it had
> installed, it would uninstall before loading HII image from controller
> flash to host)
>
> Note: We have our own API to load the HII Image from controller flash to
> host
>
>    - Role of HII is, installing HII config access protocol and Management
>    formset on the controller handle and allowing the user to view
>    controller/PD/VD/other hardware properties, perform various
>    controller/PD/VD level operations etc.
>
>
>
> Requirement (need to see whether this is feasible or not): There are cases
> where our controller is healthy but we would like to post certain
> informational messages in messageList.
>
> How do I achieve this? That is I want UEFI Driver to have the capability
> to post the message in messageList and our HII Image also to be
> loaded/present.
>
>
>
> Can UEFI Driver and HII driver install HII Config access protocol on the
> same handle? AFAIK, the answer is “no”.
>
> I experimented just adding the driver health formset to the package via
> the HiiAddPackages() on the controller handle (that is from UEFI Driver I
> was not installing HII CAP but just installed the formset on controller
> handle) and it is not working. In this case HII image is also loaded (this
> means HII image would have installed HII CAP and its own formset on the
> same controller handle).
>
>
>
> Appreciate your input.
>
>
>
> Thanks,
>
> Daniel
>
> Backup:
>
> *Excerpt from UEFI Spec: *
>
> *MessageList      *A pointer to an array of warning or error messages asso
> ciated with
>
> the controller specified by *ControllerHandle *and *ChildHandle*.
>
> This is an optional parameter that may be *NULL*. *M**essageList *is
>
> allocated by this function with the EFI Boot Service
>
> *AllocatePool()*, and it is the caller’s responsibility to free
>
> *MessageList *with the EFI Boot Service *F**reePool()*. Each
>
> message is specified by tuple of an *EFI_HII_HANDLE *and an
>
> *EFI_STRING_ID*. The array of messages is terminated by tuple
>
> containing a *EFI_HII_HANDLE *with a value of *NULL*. The
>
> *EFI_HII_STRING_PROTOCOL.GetString() *function can be used
>
> to retrieve the warning or error message as a Null-terminated string
>
> in a specific language. Messages may be returned for any of the
>
> *HealthStatus *values except
>
> *EfiDriverHealthStatusReconnectRequired *and
>
> *EfiDriverHealthStatusRebootRequired*.
>
> *FormHiiHandle    *A pointer to the HII handle containing the HII form
> used when configuration is required. The HII handle is associated with the
> controller specified by *ControllerHandle *and
>
> *C**hildHandle*. If this is *N**ULL*, then no HII form is available. An
> HII handle will only be returned with a *HealthStatus *value of
>
> *E**fiDriverHealthStatusConfigurationRequired*.
>
>
>
> …
>
>
>
>
>
>
>
> If *MessageList *is not *NULL*, and *HealthStatu**s *is *EfiDriverHealthStatusReconnectRequired
> *or *EfiDriverHealthStatusRebootRequired *then no messages are returned
> and **MessageList *must be set to *NULL*.
>
> If *MessageList *is not *NULL*, and there are no warning or error
> messages associated with the controller specified by *ControllerHandle *and
> *ChildHandle*, then **MessageList *must be set to *NULL*.
>
> If *MessageList *is not *NULL*, and there are one or more warning or
> error messages associated with the controller specified by *ControllerHandle
> *and *ChildHandle*, then **MessageList *must point to a buffer allocated
> with the EFI Boot Service *AllocatePool()*. The number of *EFI_DRIVER_HEALTH_HII_MESSAGE
> *structures allocated in the buffer must be one more than the total
> number of warning or error messages, and the *HiiHandle *field of the
> last *EFI_DRIVER_HEALTH_HII_MESSAGE *structure must be set to *NULL *to
> terminate the list of messages. It is the caller’s responsibility to free
> the buffer returned in **MessageList *using the EFI Boot Service
> *FreePool()*. Each message is specified by an *EFI_HII_HANDLE *and an
> *EFI_STRING_ID*. The caller may use the *EFI_HII_STRING_PROTOCOL.GetString()
> *function to convert each message into a Null-terminated string that can
> may be displayed on a console device.
>
> If *FormHiiHandle *is *NULL*, then no forms are returned from this
> function.
>
> If *FormHiiHandle *is not *NULL*, and *HealthStatus *is not
> *EfiDriverHealthStatusConfigurationRequired*, then no forms are returned
> and **FormHiiHandle *must be set to *NULL*.
>
> If *FormHiiHandle *is not *NULL*, and *FormSetGuid *is not *NULL*, and *HealthStatus
> *is *EfiDriverHealthStatusConfigurationRequired*, then *FormHiiHandle *is
> assigned to the HII handle which contains the HII form required to perform
> the configuration operation.
>
>
>
> …
>
> *//********************************************************
>
> *// EFI_DRIVER_HEALTH_HII_MESSAGE*
>
> *//********************************************************
>
> *typedef struct { EFI_HII_HANDLE **H**iiHandle**; **EF**I_STRING_ID  **S*
> *tringId**; **UI**NT64     **MessageCode;*
>
> *} EFI_DRIVER_HEALTH_HII_MESSAGE;*
>
> *HiiHandle        *The *EFI_HII_HANDLE *that was returned by *EFI_HII_DATABASE_PROTOCOL.NewPackageList()
> *when the string pack containing StringId was registered with the HII Data
> base.
>
> *StringId         *The identifier for a single string token in the string
> pack associated with *HiiHandle.*
>
> *MessageCode      *64-bit numeric value of the warning/error specified by
> this message.
>
> A value of *0x0000000000000000 *is used to indicate that
>
> *MessageCode *is not specified.
>
> The values *0**x0000000000000001 *to *0x0fffffffffffffff *are reserved for
> allocation by the UEFI Specification.
>
> The values *0**x1000000000000000 *to *0x1fffffffffffffff *are reserved for
> IHV-developed drivers.
>
> The values *0**x8000000000000000 *to *0x8fffffffffffffff *is reserved for
> platform/OEM drivers.
>
> All other values are reserved and should not be used.
>

[-- Attachment #2: Type: text/html, Size: 60966 bytes --]

      reply	other threads:[~2021-03-31 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  5:56 Driver health : Posting message in MessageList EDK
2021-03-31 13:58 ` EDK [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABHQtYuku3V=KyS1uHN3TPMdderVojNfv7xvz3yqNF5Jb+gkqQ@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox