]>
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 | |
8879d432 | 23 | #include "MiscSubclassDriver.h"\r |
24 | \r | |
25 | //\r | |
26 | //\r | |
27 | //\r | |
28 | MISC_SUBCLASS_TABLE_FUNCTION (\r | |
29 | MiscSystemManufacturer\r | |
30 | )\r | |
31 | /*++\r | |
32 | Description:\r | |
33 | \r | |
34 | This function makes boot time changes to the contents of the\r | |
35 | MiscSystemManufacturer (Type 13).\r | |
36 | \r | |
37 | Parameters:\r | |
38 | \r | |
39 | RecordType\r | |
40 | Type of record to be processed from the Data Table.\r | |
41 | mMiscSubclassDataTable[].RecordType\r | |
42 | \r | |
43 | RecordLen\r | |
44 | Size of static RecordData from the Data Table.\r | |
45 | mMiscSubclassDataTable[].RecordLen\r | |
46 | \r | |
47 | RecordData\r | |
48 | Pointer to copy of RecordData from the Data Table. Changes made\r | |
49 | to this copy will be written to the Data Hub but will not alter\r | |
50 | the contents of the static Data Table.\r | |
51 | \r | |
52 | LogRecordData\r | |
53 | Set *LogRecordData to TRUE to log RecordData to Data Hub.\r | |
54 | Set *LogRecordData to FALSE when there is no more data to log.\r | |
55 | \r | |
56 | Returns:\r | |
57 | \r | |
58 | EFI_SUCCESS\r | |
59 | All parameters were valid and *RecordData and *LogRecordData have\r | |
60 | been set.\r | |
61 | \r | |
62 | EFI_UNSUPPORTED\r | |
63 | Unexpected RecordType value.\r | |
64 | \r | |
65 | EFI_INVALID_PARAMETER\r | |
66 | One of the following parameter conditions was true:\r | |
67 | RecordLen was zero.\r | |
68 | RecordData was NULL.\r | |
69 | LogRecordData was NULL.\r | |
70 | --*/\r | |
71 | {\r | |
72 | STATIC BOOLEAN Done = FALSE;\r | |
73 | \r | |
74 | //\r | |
75 | // First check for invalid parameters.\r | |
76 | //\r | |
77 | if (*RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {\r | |
78 | return EFI_INVALID_PARAMETER;\r | |
79 | }\r | |
80 | //\r | |
81 | // Then check for unsupported RecordType.\r | |
82 | //\r | |
83 | if (RecordType != EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER) {\r | |
84 | return EFI_UNSUPPORTED;\r | |
85 | }\r | |
86 | //\r | |
87 | // Is this the first time through this function?\r | |
88 | //\r | |
89 | if (!Done) {\r | |
90 | //\r | |
91 | // Yes, this is the first time. Inspect/Change the contents of the\r | |
92 | // RecordData structure.\r | |
93 | //\r | |
94 | //\r | |
95 | // Set system GUID.\r | |
96 | //\r | |
97 | // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemUuid = %%TBD\r | |
98 | //\r | |
99 | // Set power-on type.\r | |
100 | //\r | |
101 | // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD\r | |
102 | //\r | |
103 | // Set Done flag to TRUE for next pass through this function.\r | |
104 | // Set *LogRecordData to TRUE so data will get logged to Data Hub.\r | |
105 | //\r | |
106 | Done = TRUE;\r | |
107 | *LogRecordData = TRUE;\r | |
108 | } else {\r | |
109 | //\r | |
110 | // No, this is the second time. Reset the state of the Done flag\r | |
111 | // to FALSE and tell the data logger that there is no more data\r | |
112 | // to be logged for this record type. If any memory allocations\r | |
113 | // were made by earlier passes, they must be released now.\r | |
114 | //\r | |
115 | Done = FALSE;\r | |
116 | *LogRecordData = FALSE;\r | |
117 | }\r | |
118 | \r | |
119 | return EFI_SUCCESS;\r | |
120 | }\r | |
121 | \r | |
122 | /* eof - MiscSystemManufacturerFunction.c */\r |