audk/PrmPkg/Application/PrmInfo/PrmInfo.h

50 lines
1.2 KiB
C
Raw Normal View History

PrmPkg/Application/PrmInfo: Add initial application Adds a new UEFI application called "PrmInfo" that allows a user to display and test Platform Runtime Mechanism (PRM) modules. Execute the application help command for detailed usage instructions and examples of how to use the application: "PrmInfo -?" This application is intended to be helpful during PRM enabling by allowing the user to: 1. Confirm that their firmware port of the PRM infrastructure implemented in this package is functioning correctly. 2. Quickly get information about what PRM modules and handlers are present on a given system. 3. Quickly test PRM handlers without booting to a fully featured operating system. 4. Develop and exercise PRM handlers prior to the availability of an operating system that is PRM aware. Adds a brief section to Readme.md about the PrmInfo UEFI application with a link to allow the reader to find more information about the application if interested. Cc: Andrew Fish <afish@apple.com> Cc: Kang Gao <kang.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Liu Yun <yun.y.liu@intel.com> Cc: Ankit Sinha <ankit.sinha@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
2020-06-10 20:06:07 +02:00
/** @file
Prints information about the PRM configuration loaded by the system firmware.
Copyright (C) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef PRM_INFO_H_
#define PRM_INFO_H_
#include <Base.h>
#include <Prm.h>
#include <PrmDataBuffer.h>
#include <Uefi.h>
#define APPLICATION_NAME L"PrmInfo"
#define PRM_HANDLER_CONTEXT_LIST_ENTRY_SIGNATURE SIGNATURE_32('P','R','H','E')
#pragma pack(push, 1)
typedef struct {
CHAR8 *Name;
EFI_GUID *Guid;
PRM_DATA_BUFFER *StaticDataBuffer;
CHAR8 *ModuleName;
PRM_HANDLER *Handler;
} PRM_HANDLER_CONTEXT;
typedef struct {
UINTN Signature;
LIST_ENTRY Link;
PRM_HANDLER_CONTEXT Context;
} PRM_HANDLER_CONTEXT_LIST_ENTRY;
#pragma pack(pop)
//
// Iterate through the double linked list. NOT delete safe.
//
#define EFI_LIST_FOR_EACH(Entry, ListHead) \
for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
#define ONE_MICROSECOND (1000)
#define ONE_MILLISECOND (1000 * ONE_MICROSECOND)
#define ONE_SECOND (1000 * ONE_MILLISECOND)
#endif