]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Platform/Generic/RuntimeDxe/StatusCode/Lib/BsDataHubStatusCode/BsDataHubStatusCode.h
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Platform / Generic / RuntimeDxe / StatusCode / Lib / BsDataHubStatusCode / BsDataHubStatusCode.h
index 7f5d026859dbcf393bc8c8e6fdca312ee3caf8ec..b56bc9bfd3aab857ad01983e17f58ddfe8290651 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c)  2004 - 2006, Intel Corporation                                                         \r
+Copyright (c)  2004 - 2007, 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
@@ -52,7 +52,6 @@ Abstract:
 // Private data declarations\r
 //\r
 #define MAX_RECORD_NUM                    1000\r
-#define INITIAL_RECORD_NUM                20\r
 #define BYTES_PER_RECORD                  EFI_STATUS_CODE_DATA_MAX_SIZE\r
 #define BYTES_PER_BUFFER                  (BYTES_PER_RECORD * sizeof (UINT8))\r
 \r
@@ -60,77 +59,63 @@ Abstract:
 \r
 typedef struct {\r
   UINTN           Signature;\r
-  EFI_LIST_ENTRY  Link;\r
-  UINT8           RecordBuffer[BYTES_PER_RECORD];\r
-} STATUS_CODE_RECORD_LIST;\r
+  EFI_LIST_ENTRY  Node;\r
+  UINT8           Data[BYTES_PER_RECORD];\r
+} DATAHUB_STATUSCODE_RECORD;\r
 \r
 //\r
 // Function prototypes\r
 //\r
-STATUS_CODE_RECORD_LIST *\r
-AllocateRecordBuffer (\r
-  VOID\r
-  );\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate a new record list node and initialize it.\r
-  Inserting the node into the list isn't the task of this function.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  A pointer to the new allocated node or NULL if non available\r
-\r
---*/\r
-\r
-DATA_HUB_STATUS_CODE_DATA_RECORD *\r
-AquireEmptyRecordBuffer (\r
-  VOID\r
+EFI_STATUS\r
+EFIAPI\r
+BsDataHubInitializeStatusCode (\r
+  IN EFI_HANDLE         ImageHandle,\r
+  IN EFI_SYSTEM_TABLE   *SystemTable\r
   );\r
 /*++\r
 \r
 Routine Description:\r
 \r
-  Acquire an empty record buffer from the record list if there's free node,\r
-  or allocate one new node and insert it to the list if the list is full and\r
-  the function isn't run in EFI_TPL_HIGH_LEVEL.\r
+  Install a data hub listener.\r
 \r
 Arguments:\r
 \r
-  None\r
+  (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
 \r
 Returns:\r
 \r
-  Pointer to new record buffer. NULL if none available.\r
+  EFI_SUCCESS - Logging Hub protocol installed\r
+  Other       - No protocol installed, unload driver.\r
 \r
 --*/\r
 \r
 EFI_STATUS\r
-ReleaseRecordBuffer (\r
-  IN  STATUS_CODE_RECORD_LIST  *RecordBuffer\r
+EFIAPI\r
+BsDataHubReportStatusCode (\r
+  IN EFI_STATUS_CODE_TYPE     CodeType,\r
+  IN EFI_STATUS_CODE_VALUE    Value,\r
+  IN UINT32                   Instance,\r
+  IN EFI_GUID                 * CallerId,\r
+  IN EFI_STATUS_CODE_DATA     * Data OPTIONAL\r
   );\r
 /*++\r
 \r
 Routine Description:\r
 \r
-  Release a buffer in the list, remove some nodes to keep the list inital length.\r
+  Boot service report status code listener.  This function logs the status code\r
+  into the data hub.\r
+\r
 Arguments:\r
 \r
-  RecordBuffer          - Buffer to release\r
+  Same as gRT->ReportStatusCode (See Tiano Runtime Specification)\r
 \r
 Returns:\r
 \r
-  EFI_SUCCESS           - If DataRecord is valid\r
-  EFI_UNSUPPORTED       - The record list has empty\r
+  None\r
 \r
 --*/\r
 \r
-void\r
+VOID\r
 EFIAPI\r
 LogDataHubEventHandler (\r
   IN  EFI_EVENT     Event,\r