+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- MiscSystemManufacturerFunction.c\r
- \r
-Abstract: \r
-\r
- This driver parses the mMiscSubclassDataTable structure and reports\r
- any generated data to the DataHub.\r
-\r
---*/\r
-\r
-#include "MiscSubclassDriver.h"\r
-\r
-//\r
-//\r
-//\r
-MISC_SUBCLASS_TABLE_FUNCTION (\r
- MiscSystemManufacturer\r
- )\r
-/*++\r
-Description:\r
-\r
- This function makes boot time changes to the contents of the\r
- MiscSystemManufacturer (Type 13).\r
-\r
-Parameters:\r
-\r
- RecordType\r
- Type of record to be processed from the Data Table.\r
- mMiscSubclassDataTable[].RecordType\r
-\r
- RecordLen\r
- Size of static RecordData from the Data Table.\r
- mMiscSubclassDataTable[].RecordLen\r
-\r
- RecordData\r
- Pointer to copy of RecordData from the Data Table. Changes made\r
- to this copy will be written to the Data Hub but will not alter\r
- the contents of the static Data Table.\r
-\r
- LogRecordData\r
- Set *LogRecordData to TRUE to log RecordData to Data Hub.\r
- Set *LogRecordData to FALSE when there is no more data to log.\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS\r
- All parameters were valid and *RecordData and *LogRecordData have\r
- been set.\r
-\r
- EFI_UNSUPPORTED\r
- Unexpected RecordType value.\r
-\r
- EFI_INVALID_PARAMETER\r
- One of the following parameter conditions was true:\r
- RecordLen was zero.\r
- RecordData was NULL.\r
- LogRecordData was NULL.\r
---*/\r
-{\r
- STATIC BOOLEAN Done = FALSE;\r
-\r
- //\r
- // First check for invalid parameters.\r
- //\r
- if (*RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
- //\r
- // Then check for unsupported RecordType.\r
- //\r
- if (RecordType != EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER) {\r
- return EFI_UNSUPPORTED;\r
- }\r
- //\r
- // Is this the first time through this function?\r
- //\r
- if (!Done) {\r
- //\r
- // Yes, this is the first time. Inspect/Change the contents of the\r
- // RecordData structure.\r
- //\r
- //\r
- // Set system GUID.\r
- //\r
- // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemUuid = %%TBD\r
- //\r
- // Set power-on type.\r
- //\r
- // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD\r
- //\r
- // Set Done flag to TRUE for next pass through this function.\r
- // Set *LogRecordData to TRUE so data will get logged to Data Hub.\r
- //\r
- Done = TRUE;\r
- *LogRecordData = TRUE;\r
- } else {\r
- //\r
- // No, this is the second time. Reset the state of the Done flag\r
- // to FALSE and tell the data logger that there is no more data\r
- // to be logged for this record type. If any memory allocations\r
- // were made by earlier passes, they must be released now.\r
- //\r
- Done = FALSE;\r
- *LogRecordData = FALSE;\r
- }\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-/* eof - MiscSystemManufacturerFunction.c */\r