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