]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[mirror_edk2.git] / Vlv2TbltDevicePkg / Include / Library / BiosIdLib.h
1 /*++
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
8
9
10 Module Name:
11
12 BiosIdLib.h
13
14 Abstract:
15
16 BIOS ID library definitions.
17
18 This library provides functions to get BIOS ID, VERSION, DATE and TIME
19
20 --*/
21
22 #ifndef _BIOS_ID_LIB_H_
23 #define _BIOS_ID_LIB_H_
24
25 //
26 // BIOS ID string format:
27 //
28 // $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE)$(VERSION_MINOR).YYMMDDHHMM
29 //
30 // Example: "TRFTCRB1.86C.0008.D03.0506081529"
31 //
32 #pragma pack(1)
33
34 typedef struct {
35 CHAR16 BoardId[7]; // "TRFTCRB"
36 CHAR16 BoardRev; // "1"
37 CHAR16 Dot1; // "."
38 CHAR16 OemId[3]; // "86C"
39 CHAR16 Dot2; // "."
40 CHAR16 VersionMajor[4]; // "0008"
41 CHAR16 Dot3; // "."
42 CHAR16 BuildType; // "D"
43 CHAR16 VersionMinor[2]; // "03"
44 CHAR16 Dot4; // "."
45 CHAR16 TimeStamp[10]; // "YYMMDDHHMM"
46 CHAR16 NullTerminator; // 0x0000
47 } BIOS_ID_STRING;
48
49 #define MEM_IFWIVER_START 0x7E0000
50 #define MEM_IFWIVER_LENGTH 0x1000
51
52 typedef struct _MANIFEST_OEM_DATA{
53 UINT32 Signature;
54 unsigned char FillNull[0x39];
55 UINT32 IFWIVersionLen;
56 unsigned char IFWIVersion[32];
57 }MANIFEST_OEM_DATA;
58
59 //
60 // A signature precedes the BIOS ID string in the FV to enable search by external tools.
61 //
62 typedef struct {
63 UINT8 Signature[8]; // "$IBIOSI$"
64 BIOS_ID_STRING BiosIdString; // "TRFTCRB1.86C.0008.D03.0506081529"
65 } BIOS_ID_IMAGE;
66
67 #pragma pack()
68
69 /**
70 This function returns BIOS ID by searching HOB or FV.
71
72 @param[in] BiosIdImage The BIOS ID got from HOB or FV
73
74 @retval EFI_SUCCESS All parameters were valid and BIOS ID has been got.
75 @retval EFI_NOT_FOUND BiosId image is not found, and no parameter will be modified.
76 @retval EFI_INVALID_PARAMETER The parameter is NULL.
77
78 **/
79 EFI_STATUS
80 GetBiosId (
81 OUT BIOS_ID_IMAGE *BiosIdImage
82 );
83
84 /**
85 This function returns the Version & Release Date and Time by getting and converting
86 BIOS ID.
87
88 @param[in] BiosVersion The Bios Version out of the conversion.
89 @param[in] BiosReleaseDate The Bios Release Date out of the conversion.
90 @param[in] BiosReleaseTime The Bios Release Time out of the conversion.
91
92 @retval EFI_SUCCESS BIOS Version & Release Date and Time have been got successfully.
93 @retval EFI_NOT_FOUND BiosId image is not found, and no parameter will be modified.
94 @retval EFI_INVALID_PARAMETER All the parameters are NULL.
95
96 **/
97 EFI_STATUS
98 GetBiosVersionDateTime (
99 OUT CHAR16 *BiosVersion, OPTIONAL
100 OUT CHAR16 *BiosReleaseDate, OPTIONAL
101 OUT CHAR16 *BiosReleaseTime OPTIONAL
102 );
103
104 #endif