X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FDataHub.h;h=56bbcdd88bb6d354ed7192db3a5173e35f8ee10e;hb=aa7fc1c11c3d57d82842dbede50d064639671a98;hp=91f1d061b09e7445730c2fc133ed8fc54f9637cd;hpb=d2be628f7527cdef1d28b0e97c1f2eaf713704a7;p=mirror_edk2.git diff --git a/IntelFrameworkPkg/Include/Protocol/DataHub.h b/IntelFrameworkPkg/Include/Protocol/DataHub.h index 91f1d061b0..56bbcdd88b 100644 --- a/IntelFrameworkPkg/Include/Protocol/DataHub.h +++ b/IntelFrameworkPkg/Include/Protocol/DataHub.h @@ -1,24 +1,13 @@ /** @file The data hub protocol is used both by agents wishing to log data and those wishing to be made aware of all information that - has been logged. + has been logged. This protocol may only be called <= TPL_NOTIFY. - For more information please look at Intel Platform Innovation - Framework for EFI Data Hub Specification. - - Copyright (c) 2007, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: DataHub.h +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: - This protocol is defined in Framework for EFI Data Hub Specification. + The Data Hub Protocol is defined in Framework for EFI Data Hub Specification Version 0.9. **/ @@ -26,8 +15,6 @@ #ifndef __DATA_HUB_H__ #define __DATA_HUB_H__ -#include - #define EFI_DATA_HUB_PROTOCOL_GUID \ { \ 0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ @@ -39,9 +26,8 @@ // A Data Record is an EFI_DATA_RECORD_HEADER followed by RecordSize bytes of // data. The format of the data is defined by the DataRecordGuid. // -// If EFI_DATA_RECORD_HEADER is extended in the future the Version number must -// change and the HeaderSize will change if the definition of -// EFI_DATA_RECORD_HEADER is extended. +// If EFI_DATA_RECORD_HEADER is extended in the future, the Version number and HeaderSize must +// change. // // The logger is responcible for initializing: // Version, HeaderSize, RecordSize, DataRecordGuid, DataRecordClass @@ -64,7 +50,7 @@ typedef struct { // // Definition of DataRecordClass. These are used to filter out class types // at a very high level. The DataRecordGuid still defines the format of -// the data. See DateHub.doc for rules on what can and can not be a +// the data. See the Data Hub Specification for rules on what can and can not be a // new DataRecordClass // #define EFI_DATA_RECORD_CLASS_DEBUG 0x0000000000000001 @@ -81,7 +67,6 @@ typedef struct _EFI_DATA_HUB_PROTOCOL EFI_DATA_HUB_PROTOCOL; Logs a data record to the system event log. @param This The EFI_DATA_HUB_PROTOCOL instance. - @param description @param DataRecordGuid A GUID that indicates the format of the data passed into RawData. @param ProducerName A GUID that indicates the identity of the caller to this API. @param DataRecordClass This class indicates the generic type of the data record. @@ -94,7 +79,7 @@ typedef struct _EFI_DATA_HUB_PROTOCOL EFI_DATA_HUB_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_DATA_HUB_LOG_DATA) ( +(EFIAPI *EFI_DATA_HUB_LOG_DATA)( IN EFI_DATA_HUB_PROTOCOL *This, IN EFI_GUID *DataRecordGuid, IN EFI_GUID *ProducerName, @@ -108,26 +93,31 @@ EFI_STATUS @param This The EFI_DATA_HUB_PROTOCOL instance. @param MonotonicCount On input, it specifies the Record to return. - An input of zero means to return the first record. - @param FilterDriver If FilterDriver is not passed in a MonotonicCount of zero, - it means to return the first data record. If FilterDriver is passed in, - then a MonotonicCount of zero means to return the first data not yet read + An input of zero means to return the first record, + as does an input of one. + @param FilterDriver If FilterDriver is not passed in a MonotonicCount + of zero, it means to return the first data record. + If FilterDriver is passed in, then a MonotonicCount + of zero means to return the first data not yet read by FilterDriver. - @param Record Returns a dynamically allocated memory buffer with a data - record that matches MonotonicCount. + @param Record Returns a dynamically allocated memory buffer with + a data record that matches MonotonicCount. @retval EFI_SUCCESS Data was returned in Record. @retval EFI_INVALID_PARAMETER FilterDriver was passed in but does not exist. @retval EFI_NOT_FOUND MonotonicCount does not match any data record - in the system. If a MonotonicCount of zero was passed in, then no - data records exist in the system. + in the system. If a MonotonicCount of zero was + passed in, then no data records exist in the system. @retval EFI_OUT_OF_RESOURCES Record was not returned due to lack of system resources. - + @note Inconsistent with specification here: + In Framework for EFI Data Hub Specification, Version 0.9, This definition + is named as EFI_DATA_HUB_GET_NEXT_DATA_RECORD. The inconsistency is + maintained for backward compatibility. **/ typedef EFI_STATUS -(EFIAPI *EFI_DATA_HUB_GET_NEXT_RECORD) ( +(EFIAPI *EFI_DATA_HUB_GET_NEXT_RECORD)( IN EFI_DATA_HUB_PROTOCOL *This, IN OUT UINT64 *MonotonicCount, IN EFI_EVENT *FilterDriver OPTIONAL, @@ -140,24 +130,32 @@ EFI_STATUS @param This The EFI_DATA_HUB_PROTOCOL instance. @param FilterEvent The EFI_EVENT to signal whenever data that matches FilterClass is logged in the system. - @param FilterTpl The maximum EFI_TPL at which FilterEvent can be signaled. - It is strongly recommended that you use the lowest EFI_TPL possible. + @param FilterTpl The maximum EFI_TPL at which FilterEvent can be + signaled. It is strongly recommended that you use + the lowest EFI_TPL possible. @param FilterClass FilterEvent will be signaled whenever a bit - in EFI_DATA_RECORD_HEADER.DataRecordClass is also set in FilterClass. - If FilterClass is zero, no class-based filtering will be performed. + in EFI_DATA_RECORD_HEADER.DataRecordClass is also + set in FilterClass. If FilterClass is zero, no + class-based filtering will be performed. @param FilterDataRecordGuid FilterEvent will be signaled whenever - FilterDataRecordGuid matches EFI_DATA_RECORD_HEADER.DataRecordGuid. - If FilterDataRecordGuid is NULL, then no GUID-based filtering will be performed. + FilterDataRecordGuid matches + EFI_DATA_RECORD_HEADER.DataRecordGuid. + If FilterDataRecordGuid is NULL, then no GUID-based + filtering will be performed. @retval EFI_SUCCESS The filter driver event was registered - @retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot be registered again. + @retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot + be registered again. @retval EFI_OUT_OF_RESOURCES The filter driver event was not registered due to lack of system resources. - + @note Inconsistent with specification here: + In Framework for EFI Data Hub Specification, Version 0.9, This definition + is named as EFI_DATA_HUB_REGISTER_DATA_FILTER_DRIVER. The inconsistency + is maintained for backward compatibility. **/ typedef EFI_STATUS -(EFIAPI *EFI_DATA_HUB_REGISTER_FILTER_DRIVER) ( +(EFIAPI *EFI_DATA_HUB_REGISTER_FILTER_DRIVER)( IN EFI_DATA_HUB_PROTOCOL *This, IN EFI_EVENT FilterEvent, IN EFI_TPL FilterTpl, @@ -174,38 +172,42 @@ EFI_STATUS @retval EFI_SUCCESS The filter driver represented by FilterEvent was shut off. @retval EFI_NOT_FOUND FilterEvent did not exist. - + @note Inconsistent with specification here: + In Framework for EFI Data Hub Specification, Version 0.9, This definition + is named as EFI_DATA_HUB_UNREGISTER_DATA_FILTER_DRIVER. The inconsistency + is maintained for backward compatibility. **/ typedef EFI_STATUS -(EFIAPI *EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER) ( +(EFIAPI *EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER)( IN EFI_DATA_HUB_PROTOCOL *This, IN EFI_EVENT FilterEvent ); /** - @par Protocol Description: This protocol is used to log information and register filter drivers to receive data records. - - @param LogData - Logs a data record. - - @param GetNextDataRecord - Gets a data record. Used both to view the memory-based log and to - get information about which data records have been consumed by a filter driver. - - @param RegisterFilterDriver - Allows the registration of an EFI event to act as a filter driver for all data records that are logged. - - @param UnregisterFilterDriver - Used to remove a filter driver that was added with RegisterFilterDriver(). - **/ struct _EFI_DATA_HUB_PROTOCOL { + /// + /// Logs a data record. + /// EFI_DATA_HUB_LOG_DATA LogData; + + /// + /// Gets a data record. Used both to view the memory-based log and to + /// get information about which data records have been consumed by a filter driver. + /// EFI_DATA_HUB_GET_NEXT_RECORD GetNextRecord; + + /// + /// Allows the registration of an EFI event to act as a filter driver for all data records that are logged. + /// EFI_DATA_HUB_REGISTER_FILTER_DRIVER RegisterFilterDriver; + + /// + /// Used to remove a filter driver that was added with RegisterFilterDriver(). + /// EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER UnregisterFilterDriver; };