]>
Commit | Line | Data |
---|---|---|
d8c18ba3 ZL |
1 | /** @file\r |
2 | Universal Payload general definitions.\r | |
3 | \r | |
4 | Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | @par Revision Reference:\r | |
8 | - Universal Payload Specification 0.75 (https://universalpayload.github.io/documentation/)\r | |
9 | **/\r | |
10 | \r | |
11 | #ifndef UNIVERSAL_PAYLOAD_H_\r | |
12 | #define UNIVERSAL_PAYLOAD_H_\r | |
13 | \r | |
c511426a RN |
14 | /**\r |
15 | Main entry point to Universal Payload.\r | |
16 | \r | |
17 | @param HobList Pointer to the beginning of the HOB List from boot loader.\r | |
18 | **/\r | |
19 | typedef VOID (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY) (VOID *HobList);\r | |
20 | \r | |
21 | #define UNIVERSAL_PAYLOAD_IDENTIFIER SIGNATURE_32('U', 'P', 'L', 'D')\r | |
22 | #define UNIVERSAL_PAYLOAD_INFO_SEC_NAME ".upld_info"\r | |
23 | #define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX ".upld."\r | |
24 | #define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof (UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX) - 1)\r | |
25 | \r | |
d8c18ba3 ZL |
26 | #pragma pack(1)\r |
27 | \r | |
c511426a RN |
28 | typedef struct {\r |
29 | UINT32 Identifier;\r | |
30 | UINT32 HeaderLength;\r | |
31 | UINT16 SpecRevision;\r | |
32 | UINT8 Reserved[2];\r | |
33 | UINT32 Revision;\r | |
34 | UINT32 Attribute;\r | |
35 | UINT32 Capability;\r | |
36 | CHAR8 ProducerId[16];\r | |
37 | CHAR8 ImageId[16];\r | |
38 | } UNIVERSAL_PAYLOAD_INFO_HEADER;\r | |
39 | \r | |
d8c18ba3 ZL |
40 | typedef struct {\r |
41 | UINT8 Revision;\r | |
42 | UINT8 Reserved;\r | |
43 | UINT16 Length;\r | |
44 | } UNIVERSAL_PAYLOAD_GENERIC_HEADER;\r | |
45 | \r | |
46 | #pragma pack()\r | |
47 | \r | |
48 | /**\r | |
49 | Returns the size of a structure of known type, up through and including a specified field.\r | |
50 | \r | |
51 | @param TYPE The name of the data structure that contains the field specified by Field.\r | |
52 | @param Field The name of the field in the data structure.\r | |
53 | \r | |
54 | @return size, in bytes.\r | |
55 | \r | |
56 | **/\r | |
57 | #define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYPE, Field) + sizeof (((TYPE *) 0)->Field))\r | |
58 | \r | |
59 | #endif // UNIVERSAL_PAYLOAD_H_\r |