summaryrefslogtreecommitdiff
path: root/PrmPkg/Application/PrmInfo/PrmInfo.h
blob: 3813998e96a9ee5a293ea3d20d12bb8dbd3ec81c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/** @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