2 Provides services to retrieve values from a capsule's FMP Payload Header.
3 The structure is not included in the library class. Instead, services are
4 provided to retrieve information from the FMP Payload Header. If information
5 is added to the FMP Payload Header, then new services may be added to this
6 library class to retrieve the new information.
8 Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
9 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
11 SPDX-License-Identifier: BSD-2-Clause-Patent
15 #ifndef _FMP_PAYLOAD_HEADER_LIB_H__
16 #define _FMP_PAYLOAD_HEADER_LIB_H__
19 Returns the FMP Payload Header size in bytes.
21 @param[in] Header FMP Payload Header to evaluate
22 @param[in] FmpPayloadSize Size of FMP payload
23 @param[out] Size The size, in bytes, of the FMP Payload Header.
25 @retval EFI_SUCCESS The firmware version was returned.
26 @retval EFI_INVALID_PARAMETER Header is NULL.
27 @retval EFI_INVALID_PARAMETER Size is NULL.
28 @retval EFI_INVALID_PARAMETER Header is not a valid FMP Payload Header.
33 GetFmpPayloadHeaderSize (
34 IN CONST VOID
*Header
,
35 IN CONST UINTN FmpPayloadSize
,
40 Returns the version described in the FMP Payload Header.
42 @param[in] Header FMP Payload Header to evaluate
43 @param[in] FmpPayloadSize Size of FMP payload
44 @param[out] Version The firmware version described in the FMP Payload
47 @retval EFI_SUCCESS The firmware version was returned.
48 @retval EFI_INVALID_PARAMETER Header is NULL.
49 @retval EFI_INVALID_PARAMETER Version is NULL.
50 @retval EFI_INVALID_PARAMETER Header is not a valid FMP Payload Header.
55 GetFmpPayloadHeaderVersion (
56 IN CONST VOID
*Header
,
57 IN CONST UINTN FmpPayloadSize
,
62 Returns the lowest supported version described in the FMP Payload Header.
64 @param[in] Header FMP Payload Header to evaluate
65 @param[in] FmpPayloadSize Size of FMP payload
66 @param[out] LowestSupportedVersion The lowest supported version described in
67 the FMP Payload Header.
69 @retval EFI_SUCCESS The lowest support version was returned.
70 @retval EFI_INVALID_PARAMETER Header is NULL.
71 @retval EFI_INVALID_PARAMETER LowestSupportedVersion is NULL.
72 @retval EFI_INVALID_PARAMETER Header is not a valid FMP Payload Header.
77 GetFmpPayloadHeaderLowestSupportedVersion (
78 IN CONST VOID
*Header
,
79 IN CONST UINTN FmpPayloadSize
,
80 OUT UINT32
*LowestSupportedVersion