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