VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h@ 109091

Last change on this file since 109091 was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/** @file
2 Universal Payload general definitions.
3
4Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5SPDX-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/**
15 Main entry point to Universal Payload.
16
17 @param HobList Pointer to the beginning of the HOB List from boot loader.
18**/
19typedef VOID (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY)(VOID *HobList);
20
21#define UNIVERSAL_PAYLOAD_IDENTIFIER SIGNATURE_32('P', 'L', 'D', 'H')
22#define UNIVERSAL_PAYLOAD_INFO_SEC_NAME ".upld_info"
23#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX ".upld."
24#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof (UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX) - 1)
25
26#pragma pack(1)
27
28typedef struct {
29 UINT32 Identifier;
30 UINT32 HeaderLength;
31 UINT16 SpecRevision;
32 UINT8 Reserved[2];
33 UINT32 Revision;
34 UINT32 Attribute;
35 UINT32 Capability;
36 CHAR8 ProducerId[16];
37 CHAR8 ImageId[16];
38} UNIVERSAL_PAYLOAD_INFO_HEADER;
39
40typedef struct {
41 UINT8 Revision;
42 UINT8 Reserved;
43 UINT16 Length;
44} UNIVERSAL_PAYLOAD_GENERIC_HEADER;
45
46#pragma pack()
47
48/**
49 Returns the size of a structure of known type, up through and including a specified field.
50
51 @param TYPE The name of the data structure that contains the field specified by Field.
52 @param Field The name of the field in the data structure.
53
54 @return size, in bytes.
55
56**/
57#define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYPE, Field) + sizeof (((TYPE *) 0)->Field))
58
59#endif // UNIVERSAL_PAYLOAD_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette