]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkRuntimeStatusCodeLib/BsDataHubStatusCode/BsDataHubStatusCode.h
f15a90e5e272c155dabd8293b78ecbc46846a43e
[mirror_edk2.git] / EdkModulePkg / Library / EdkRuntimeStatusCodeLib / BsDataHubStatusCode / BsDataHubStatusCode.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 BsDataHubStatusCode.h
15
16 Abstract:
17
18 Header for the status code data hub logging component
19
20 --*/
21
22 #ifndef _EFI_BS_DATA_HUB_STATUS_CODE_H_
23 #define _EFI_BS_DATA_HUB_STATUS_CODE_H_
24
25 //
26 // Private data declarations
27 //
28 #define MAX_RECORD_NUM 1000
29 #define BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
30 #define EMPTY_RECORD_TAG 0xFF
31
32 #define BS_DATA_HUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')
33
34 typedef struct {
35 UINTN Signature;
36 LIST_ENTRY Link;
37 UINT8 RecordBuffer[BYTES_PER_RECORD];
38 } STATUS_CODE_RECORD_LIST;
39
40 //
41 // Function prototypes
42 //
43 STATUS_CODE_RECORD_LIST *
44 GetRecordBuffer (
45 VOID
46 )
47 ;
48
49 /*++
50
51 Routine Description:
52
53 Returned buffer of length BYTES_PER_RECORD
54
55 Arguments:
56
57 None
58
59 Returns:
60
61 Entry in mRecordBuffer or NULL if non available
62
63 --*/
64 DATA_HUB_STATUS_CODE_DATA_RECORD *
65 AquireEmptyRecordBuffer (
66 VOID
67 )
68 ;
69
70 /*++
71
72 Routine Description:
73
74 Allocate a mRecordBuffer entry in the form of a pointer.
75
76 Arguments:
77
78 None
79
80 Returns:
81
82 Pointer to new buffer. NULL if none exist.
83
84 --*/
85 EFI_STATUS
86 ReleaseRecordBuffer (
87 IN STATUS_CODE_RECORD_LIST *RecordBuffer
88 )
89 ;
90
91 /*++
92
93 Routine Description:
94
95 Release a mRecordBuffer entry allocated by AquireEmptyRecordBuffer ().
96
97 Arguments:
98
99 RecordBuffer - Data to free
100
101 Returns:
102
103 EFI_SUCCESS - If RecordBuffer is valid
104 EFI_UNSUPPORTED - The record list has empty
105
106 --*/
107 VOID
108 EFIAPI
109 LogDataHubEventHandler (
110 IN EFI_EVENT Event,
111 IN VOID *Context
112 )
113 ;
114
115 /*++
116
117 Routine Description:
118
119 Event Handler that log in Status code in Data Hub.
120
121 Arguments:
122
123 (Standard EFI Event Handler - EFI_EVENT_NOTIFY)
124
125 Returns:
126
127 NONE
128
129 --*/
130 #endif