]> git.proxmox.com Git - mirror_edk2.git/blame - Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c
Reviewed the description in the FatBinPkg .dec file.
[mirror_edk2.git] / Nt32Pkg / MiscSubClassPlatformDxe / MiscSystemManufacturerFunction.c
CommitLineData
6ae81428 1/**@file\r
8879d432 2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 MiscSystemManufacturerFunction.c\r
15 \r
16Abstract: \r
17\r
18 This driver parses the mMiscSubclassDataTable structure and reports\r
19 any generated data to the DataHub.\r
20\r
6ae81428 21**/\r
8879d432 22\r
8879d432 23#include "MiscSubclassDriver.h"\r
24\r
e48813da 25BOOLEAN mDone = FALSE;\r
26\r
8879d432 27//\r
28//\r
29//\r
30MISC_SUBCLASS_TABLE_FUNCTION (\r
31 MiscSystemManufacturer\r
32 )\r
33/*++\r
34Description:\r
35\r
36 This function makes boot time changes to the contents of the\r
37 MiscSystemManufacturer (Type 13).\r
38\r
39Parameters:\r
40\r
41 RecordType\r
42 Type of record to be processed from the Data Table.\r
43 mMiscSubclassDataTable[].RecordType\r
44\r
45 RecordLen\r
46 Size of static RecordData from the Data Table.\r
47 mMiscSubclassDataTable[].RecordLen\r
48\r
49 RecordData\r
50 Pointer to copy of RecordData from the Data Table. Changes made\r
51 to this copy will be written to the Data Hub but will not alter\r
52 the contents of the static Data Table.\r
53\r
54 LogRecordData\r
55 Set *LogRecordData to TRUE to log RecordData to Data Hub.\r
56 Set *LogRecordData to FALSE when there is no more data to log.\r
57\r
58Returns:\r
59\r
60 EFI_SUCCESS\r
61 All parameters were valid and *RecordData and *LogRecordData have\r
62 been set.\r
63\r
64 EFI_UNSUPPORTED\r
65 Unexpected RecordType value.\r
66\r
67 EFI_INVALID_PARAMETER\r
68 One of the following parameter conditions was true:\r
69 RecordLen was zero.\r
70 RecordData was NULL.\r
71 LogRecordData was NULL.\r
72--*/\r
73{\r
8879d432 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
e48813da 89 if (!mDone) {\r
8879d432 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
e48813da 103 // Set mDone flag to TRUE for next pass through this function.\r
8879d432 104 // Set *LogRecordData to TRUE so data will get logged to Data Hub.\r
105 //\r
e48813da 106 mDone = TRUE;\r
8879d432 107 *LogRecordData = TRUE;\r
108 } else {\r
109 //\r
e48813da 110 // No, this is the second time. Reset the state of the mDone flag\r
8879d432 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
e48813da 115 mDone = FALSE;\r
8879d432 116 *LogRecordData = FALSE;\r
117 }\r
118\r
119 return EFI_SUCCESS;\r
120}\r
121\r
122/* eof - MiscSystemManufacturerFunction.c */\r