]>
Commit | Line | Data |
---|---|---|
8879d432 | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | MiscSystemManufacturerFunction.c\r | |
15 | \r | |
16 | Abstract: \r | |
17 | \r | |
18 | This driver parses the mMiscSubclassDataTable structure and reports\r | |
19 | any generated data to the DataHub.\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | //\r | |
24 | // Include common header file for this module.\r | |
25 | //\r | |
26 | #include "CommonHeader.h"\r | |
27 | \r | |
28 | #include "MiscSubclassDriver.h"\r | |
29 | \r | |
30 | //\r | |
31 | //\r | |
32 | //\r | |
33 | MISC_SUBCLASS_TABLE_FUNCTION (\r | |
34 | MiscSystemManufacturer\r | |
35 | )\r | |
36 | /*++\r | |
37 | Description:\r | |
38 | \r | |
39 | This function makes boot time changes to the contents of the\r | |
40 | MiscSystemManufacturer (Type 13).\r | |
41 | \r | |
42 | Parameters:\r | |
43 | \r | |
44 | RecordType\r | |
45 | Type of record to be processed from the Data Table.\r | |
46 | mMiscSubclassDataTable[].RecordType\r | |
47 | \r | |
48 | RecordLen\r | |
49 | Size of static RecordData from the Data Table.\r | |
50 | mMiscSubclassDataTable[].RecordLen\r | |
51 | \r | |
52 | RecordData\r | |
53 | Pointer to copy of RecordData from the Data Table. Changes made\r | |
54 | to this copy will be written to the Data Hub but will not alter\r | |
55 | the contents of the static Data Table.\r | |
56 | \r | |
57 | LogRecordData\r | |
58 | Set *LogRecordData to TRUE to log RecordData to Data Hub.\r | |
59 | Set *LogRecordData to FALSE when there is no more data to log.\r | |
60 | \r | |
61 | Returns:\r | |
62 | \r | |
63 | EFI_SUCCESS\r | |
64 | All parameters were valid and *RecordData and *LogRecordData have\r | |
65 | been set.\r | |
66 | \r | |
67 | EFI_UNSUPPORTED\r | |
68 | Unexpected RecordType value.\r | |
69 | \r | |
70 | EFI_INVALID_PARAMETER\r | |
71 | One of the following parameter conditions was true:\r | |
72 | RecordLen was zero.\r | |
73 | RecordData was NULL.\r | |
74 | LogRecordData was NULL.\r | |
75 | --*/\r | |
76 | {\r | |
77 | STATIC BOOLEAN Done = FALSE;\r | |
78 | \r | |
79 | //\r | |
80 | // First check for invalid parameters.\r | |
81 | //\r | |
82 | if (*RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {\r | |
83 | return EFI_INVALID_PARAMETER;\r | |
84 | }\r | |
85 | //\r | |
86 | // Then check for unsupported RecordType.\r | |
87 | //\r | |
88 | if (RecordType != EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER) {\r | |
89 | return EFI_UNSUPPORTED;\r | |
90 | }\r | |
91 | //\r | |
92 | // Is this the first time through this function?\r | |
93 | //\r | |
94 | if (!Done) {\r | |
95 | //\r | |
96 | // Yes, this is the first time. Inspect/Change the contents of the\r | |
97 | // RecordData structure.\r | |
98 | //\r | |
99 | //\r | |
100 | // Set system GUID.\r | |
101 | //\r | |
102 | // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemUuid = %%TBD\r | |
103 | //\r | |
104 | // Set power-on type.\r | |
105 | //\r | |
106 | // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD\r | |
107 | //\r | |
108 | // Set Done flag to TRUE for next pass through this function.\r | |
109 | // Set *LogRecordData to TRUE so data will get logged to Data Hub.\r | |
110 | //\r | |
111 | Done = TRUE;\r | |
112 | *LogRecordData = TRUE;\r | |
113 | } else {\r | |
114 | //\r | |
115 | // No, this is the second time. Reset the state of the Done flag\r | |
116 | // to FALSE and tell the data logger that there is no more data\r | |
117 | // to be logged for this record type. If any memory allocations\r | |
118 | // were made by earlier passes, they must be released now.\r | |
119 | //\r | |
120 | Done = FALSE;\r | |
121 | *LogRecordData = FALSE;\r | |
122 | }\r | |
123 | \r | |
124 | return EFI_SUCCESS;\r | |
125 | }\r | |
126 | \r | |
127 | /* eof - MiscSystemManufacturerFunction.c */\r |