]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/UniversalPayload/UniversalPayload.h
MdeModulePkg: Add Universal Payload general definition header file
[mirror_edk2.git] / MdeModulePkg / Include / UniversalPayload / UniversalPayload.h
1 /** @file
2 Universal Payload general definitions.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 - Universal Payload Specification 0.75 (https://universalpayload.github.io/documentation/)
9 **/
10
11 #ifndef UNIVERSAL_PAYLOAD_H_
12 #define UNIVERSAL_PAYLOAD_H_
13
14 #pragma pack(1)
15
16 typedef struct {
17 UINT8 Revision;
18 UINT8 Reserved;
19 UINT16 Length;
20 } UNIVERSAL_PAYLOAD_GENERIC_HEADER;
21
22 #pragma pack()
23
24 /**
25 Returns the size of a structure of known type, up through and including a specified field.
26
27 @param TYPE The name of the data structure that contains the field specified by Field.
28 @param Field The name of the field in the data structure.
29
30 @return size, in bytes.
31
32 **/
33 #define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYPE, Field) + sizeof (((TYPE *) 0)->Field))
34
35 #endif // UNIVERSAL_PAYLOAD_H_