summaryrefslogtreecommitdiff
path: root/Core/CORE_DXE/DataHub.c
blob: c2aa760601cb7b01731a8ffd2c7983d34e2ffa77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2007, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Core/CORE_DXE/DataHub.c 5     7/08/09 5:54p Vyacheslava $
//
// $Revision: 5 $
//
// $Date: 7/08/09 5:54p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Core/CORE_DXE/DataHub.c $
// 
// 5     7/08/09 5:54p Vyacheslava
// Updated according to the coding standards.
//
// 4     12/16/08 1:32a Iminglin
// The function value of FindNextFiltermatch for compliance.
//
// 3     11/07/07 12:13p Felixp
// Bug fixes in record filtering logic.
// Old code was treating FilterClass parameter passed into
// RegisterFilterDriver routine as requested class value.
// However, data hub specification defines this parameter as a bit map of
// requested data classes.
//
// 2     9/05/07 5:51p Felixp
// 1. LogData routine is updated.
//         Core that initializes RecordSize field of the data hub record
// header is updated to include header size (the header size was excluded
// in the previous Core verions).<br />
//         DataHub specification is vague regarding the RecordSize field.
//         It says RecordSize is "Size of the data in the record in
// bytes".
//         It's not clear if it should include or exclude the header size.
//         In EDK DataHub implenetation RecordSize includes the header.
//         Aptio implementation is updated to comply with EDK
// implementation.
// 2. When time is not available initialize time fields with default
// values
//
// 1     1/28/05 12:45p Felixp
//
// 2     1/18/05 3:22p Felixp
// PrintDebugMessage renamed to Trace
//
// 1     12/22/04 6:19p Admin
//
// 1     12/22/04 6:18p Admin
//
// 6     11/12/04 3:13p Markw
// Added signal event, to get previously logged data.
//
// 5     4/17/04 4:23p Felixp
//
// 4     3/24/04 10:17a Markw
// Using AmiDxeLib instead AmiLib.
//
// 3     3/23/04 5:45p Markw
// Added function and table headers (comments) to the file.
//
// 2     3/20/04 10:46a Felixp
//
// 1     3/16/04 2:38p Markw
//
//
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:    DataHub_c
//
// Description: Log data to be retrieved by functions or call events
//  for data matching filter.
//
//<AMI_FHDR_END>
//**********************************************************************

#include <AmiDxeLib.h>
#include <Protocol\DataHub.h>

EFI_GUID gDataHubProtocolGuid = EFI_DATA_HUB_PROTOCOL_GUID;

//**********************************************************************
//<AMI_THDR_START>
//
// Name:        DATA_RECORD
//
// Description: This structure describes the Data Record header and data.
//
// Fields:     
//  Name            Type                    Description
//  ------------------------------------------------------------
//  Link            DATA_RECORD*            Next link
//  RecordHeader    EFI_DATA_RECORD_HEADER  Log Record Header
///
//  Directly following Header (&RecordHeader + 1) is the data.
//
//<AMI_THDR_END>
//**********************************************************************

typedef struct _DATA_RECORD DATA_RECORD;
struct _DATA_RECORD {
    DATA_RECORD             *Link;
    EFI_DATA_RECORD_HEADER  RecordHeader;
};

//**********************************************************************
//<AMI_THDR_START>
//
// Name:        FILTER
//
// Description: This structure describes the filter link.
//
// Fields:     
//  Name            Type            Description
//  ------------------------------------------------------------
//  Link            FILTER*         Next link
//  Event           EFI_EVENT       Event
//  Class           UINT64          Class (0 if no class filtering)
//  DataRecordGuid  EFI_GUID        Guid (undefined in no guid filtering)
//  isGuid          BOOLEAN         TRUE if guid filtering.
//  LastRead        DATA_RECORD*    Last read record for the filter.
//
//<AMI_THDR_END>
//**********************************************************************

typedef struct _FILTER FILTER;
struct _FILTER {
    FILTER      *Link;
    EFI_EVENT   Event;
    UINT64      Class;
    EFI_GUID    DataRecordGuid;
    BOOLEAN     isGuid;
    DATA_RECORD *LastRead;
};


FILTER      *gFilHead   = 0;    //Filter Head
DATA_RECORD *gHead      = 0;    //Data Record Head
DATA_RECORD *gTail      = 0;    //Data Record Count
UINT64      gLogCount   = 0;    //Unique log count.
DATA_RECORD *gCache     = 0;    //Last reocrd cache.


//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: FindNextFilterMatch
//
// Description: Search log to find next record that matches filter.
//
// Input:
//  DATA_RECORD *Record
//  FILTER      *Filter
//
// Output: DATA_RECORD*
//
// Referrals: guidcmp
//
// Notes:
//  Here is the control flow of this function:
//  1. Starting at the current record for filter matching.
//  2. If Class and Class doesn't match continue at step 1 for next record.
//  3. If guid and DataRecordGuid doesn't match continue at step 1 for next record.
//  4. Match, return record.
//  5. If Steps 1-4, doesn't find any matching filter, return 0.
//
//<AMI_PHDR_END>
//**********************************************************************

DATA_RECORD* FindNextFilterMatch(
    DATA_RECORD *Record, 
    FILTER *Filter)
{
    for (; Record; Record=Record->Link) {
        if ( Filter->Class && 
             !(Filter->Class & Record->RecordHeader.DataRecordClass) ) 
            continue;
        
        if ( Filter->isGuid && 
             guidcmp(&Filter->DataRecordGuid,&Record->RecordHeader.DataRecordGuid) != 0 ) 
            continue;
        
        return Record;
    }
    
    return NULL;
}

//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: LogData
//
// Description: Log the record. If matching event, signal it.
//
// Input:
//  IN EFI_DATA_HUB_PROTOCOL    *This
//  IN EFI_GUID                 *DataRecordGuid
//  IN EFI_GUID                 *ProducerName
//  IN UINT64                   DataRecordClass
//  IN VOID                     *RawData
//  IN UINT32                   RawDataSize
//
// Output:
//  EFI_STATUS
//      * EFI_SUCCESS - Event logged.
//      * EFI_OUT_OF_RESOUCES - Not enough resources to log data.
//
// Modified: gHead gTail
//
// Referrals: AllocatePool
//
// Notes:
//  Here is the control flow of this function:
//  1. Allocate memory enough for data record. If not enough memory, return EFI_OUT_OF_RESOURCES.
//  2. Fill data record header and increase log count.
//  3. Fill data to log.
//  4. Add record to log.
//  5. Check for a matching filter.
//  6. If matching filter, signal event.
//  7. Return EFI_SUCCESS.
//
//<AMI_PHDR_END>
//**********************************************************************

EFI_STATUS LogData(
    IN EFI_DATA_HUB_PROTOCOL    *This,
    IN EFI_GUID                 *DataRecordGuid,
    IN EFI_GUID                 *ProducerName,
    IN UINT64                   DataRecordClass,
    IN VOID                     *RawData,
    IN UINT32                   RawDataSize
)
{
    EFI_DATA_RECORD_HEADER  *RcdHdr;
    DATA_RECORD             *Record;
    FILTER                  *Filter;
    UINT8                   *Data;
    EFI_STATUS              Status;
    
    //16 dummy bytes to make sure struct alignment isn't an issue in platform.
    if ( pBS->AllocatePool(
            EfiBootServicesData,
            sizeof(DATA_RECORD) + RawDataSize + 16,
            &Record ) != EFI_SUCCESS )
        return EFI_OUT_OF_RESOURCES;
    
    RcdHdr = &Record->RecordHeader;
    
    Record->Link                = 0;
    RcdHdr->Version             = EFI_DATA_RECORD_HEADER_VERSION;
    RcdHdr->HeaderSize          = sizeof(EFI_DATA_RECORD_HEADER);
//DataHub specification is vague regarding the RecordSize field.
//It says RecordSize is "Size of the data in the record in bytes".
//It's not clear if it should include or exclude the header size.
//It's sounds more like it should not, however,
//in EDK DataHub implenetation RecordSize includes the header.
//For the sake of compatibility let's do the same.
    RcdHdr->RecordSize          = RawDataSize+sizeof(EFI_DATA_RECORD_HEADER);
    RcdHdr->DataRecordGuid      = *DataRecordGuid;
    RcdHdr->ProducerName        = *ProducerName;
    RcdHdr->DataRecordClass     = DataRecordClass;
    RcdHdr->LogMonotonicCount   = ++gLogCount;  //Each log  count must be unique.
    Status = pRS->GetTime(&(RcdHdr->LogTime),NULL);
    
    if (EFI_ERROR(Status)) {    //time not available, set default values
        RcdHdr->LogTime.Year   = 0;
        RcdHdr->LogTime.Month  = 1;
        RcdHdr->LogTime.Day    = 1;
        RcdHdr->LogTime.Hour   = 0;
        RcdHdr->LogTime.Minute = 0;
        RcdHdr->LogTime.Second = 0;
    }
    
    //Store data to be logged.
    Data = (UINT8*)(RcdHdr + 1);
    MemCpy(
        Data, 
        RawData, 
        RawDataSize
    );
    
    //Add record to log.
    if (!gHead) 
        gHead = Record;
    else 
        gTail->Link = Record;
    
    gTail = Record;
    
    //Check for matching filter.
    for (Filter = gFilHead; Filter; Filter = Filter->Link) {
        if ( Filter->Class && 
             !(Filter->Class & DataRecordClass) ) 
            continue;
        
        if ( Filter->isGuid && 
             guidcmp(&Filter->DataRecordGuid, DataRecordGuid) != 0 ) 
            continue;
        
        pBS->SignalEvent(Filter->Event);
    }
    
    return EFI_SUCCESS;
}

//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: GetNextDataRecord
//
// Description: Search log to find next record that matches Count or filter.
//  Return next record or if Filter, next record matching filter.
//
// Input:
//  IN EFI_DATA_HUB_PROTOCOL    *This
//  IN OUT UINT64               *MonotonicCount
//  IN EFI_EVENT                *FilterDriver OPTIONAL
//  OUT EFI_DATA_RECORD_HEADER  **Record
//
// Output:
//  EFI_STATUS
//  * EFI_SUCCESS - If Data Record returned.
//  * EFI_NOT_FOUND - Data Record not found.
//  * EFI_INVALID_PARAMETER - *FilterDriver doesn't match registered filters.
//
// Modified: gCache
//
// Referrals: FindNextFilterMatch
//
// Notes:
//  Here is the control flow of this function:
//  1. If no logged records, return EFI_NOT_FOUND.
//  2. If using FilterDriver, find filter. If filter not found, return EFI_INVALID_PARAMETER;
//  3. If *MonotonicCount != 0, go to step 14.
//  ---*MonotonicCount = 0---
//  4. If no filter driver, set *MonotonicCount = 1, go to step 14.
//  ---Filter Driver---
//  5. If no last read, start at Head.
//  6. If last read, start at the next. If no next, return EFI_NOT_FOUND.
//  7. Find record matching filter.
//  8. If no match, set last read to tail, and return EFI_NOT_FOUND.
//  9. Set *Record to found record, and set LastRead to record.
//  10. Find next match, to get *MonotonicCount.
//  11. If not found, set *MonotonicCount = 0.
//  12. Set cache to link.
//  13. Return EFI_SUCCESS.
//  ---MontonicCount exists---
//  14. Get starting link. If after cache, use cache, otherwise use head.
//  15. Search until log count is found, regardless of filter.
//  16. If not found, return EFI_NOT_FOUND.
//  17. If filter set LastRead.
//  18. If last link, *MontonicCount = 0. Go to step 21.
//  ---If not last link,---
//  19. If FilterDriver, find next match for *MonotonicCounter.
//  20. If no next match, set *MonotonicCounter = 0.
//  -------
//  21. Set cache. Return EFI_SUCCESS.
//
//<AMI_PHDR_END>
//**********************************************************************

EFI_STATUS GetNextDataRecord(
    IN EFI_DATA_HUB_PROTOCOL    *This,
    IN OUT UINT64               *MonotonicCount,
    IN EFI_EVENT                *FilterDriver OPTIONAL,
    OUT EFI_DATA_RECORD_HEADER  **Record
)
{
    DATA_RECORD *Link;
    FILTER      *Filter;
    
    if (!gHead) 
        return EFI_NOT_FOUND;   //Any records logged?
    
    //Find Matching filter
    if (FilterDriver) {
        //In future, binary search may be more efficient, or some caching.
        for (Filter = gFilHead; Filter && Filter->Event != *FilterDriver; Filter = Filter->Link)
            ; //Find matching Filter for Event.
        
        if (!Filter) 
            return EFI_INVALID_PARAMETER;
    }
    
    //If monotonic count is zero?
    if (!*MonotonicCount) {
        //If filter driver, get first unread record matching filter.
        if (!FilterDriver) {
            *MonotonicCount = 1;    //If not filter driver, get first record.
            
        } else {
            //Get the record after the last read record. If not, get the first record.
            if (Filter->LastRead) 
                Link = Filter->LastRead->Link;
            else 
                Link = gHead;
            
            if (!Link) 
                return EFI_NOT_FOUND;    //If record doesn't exist, return EFI_NOT_FOUND.
            
            if ( !(Link = FindNextFilterMatch(Link, Filter)) ) { //Get record matching filter, zero if no match.
                //No matching record. Set LastRead to tail, and return EFI_NOT_FOUND.
                Filter->LastRead = gTail;
                return EFI_NOT_FOUND;
            }
            
            //Save pointer to matching record, and last read record.
            *Record = &Link->RecordHeader;
            Filter->LastRead = Link;
            
            //Find the next matching record to return the next Monotonic Count.
            if ( Link = FindNextFilterMatch(Link->Link, Filter) ) //zero if no match.
                *MonotonicCount = Link->RecordHeader.LogMonotonicCount;
            else 
                *MonotonicCount = 0;                   //If no matching record, set last read to end.
            
            gCache = Link;  //Set cache to find the next record.
            return EFI_SUCCESS;
        }
    }
    
    //Find a specific MonotonicCount.
    //If Count is same or after cache, start with cache. Otherwise start at beginning.
    if (gCache && gCache->RecordHeader.LogMonotonicCount <= *MonotonicCount)
        Link = gCache;
    else 
        Link = gHead;
    
    //Search for Log.
    for (; Link; Link = Link->Link) {
        if (Link->RecordHeader.LogMonotonicCount == *MonotonicCount) {
            *Record = &Link->RecordHeader;      //Save pointer to matching record.
            
            if (Link == gTail) {                //If last log, Count = 0.
                *MonotonicCount = 0;
                
                if (FilterDriver) 
                    Filter->LastRead = Link;    //If filter, store last read.
                
            } else {                            //If not last log.
                if (FilterDriver) {
                    Filter->LastRead = Link;    //Set last read.
                    
                    if ( Link = FindNextFilterMatch(Link->Link, Filter) )
                        *MonotonicCount = Link->RecordHeader.LogMonotonicCount; //Get count of next matching record.
                    else 
                        *MonotonicCount = 0;   //If no more matching record, set count to 0.
                    
                } else 
                    ++*MonotonicCount;         //If not filter driver, increase count.
            }
            
            gCache = Link;                     //Set cache.
            return EFI_SUCCESS;
        }
    }
    
    return EFI_NOT_FOUND;                      //Record does't exist.
}

//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: RegisterFilterDriver
//
// Description: Register new filter driver.
//
// Input:
//  IN EFI_DATA_HUB_PROTOCOL    *This
//  IN EFI_EVENT                FilterEvent
//  IN EFI_TPL                  FilterTpl
//  IN UINT64                   FilterClass
//  IN EFI_GUID                 *FilterDataRecordGuid OPTIONAL
//
// Output:
//  EFI_STATUS
//  * EFI_SUCCESS - Filter driver registered.
//  * EFI_ALREADY_STARTED - Filter driver was already registered.
//  * EFI_OUT_OF_RESOURCES - Not enough resources to allocate Link.
//
// Modified: gFilHead
//
// Referrals: AllocatePool
//
// Notes:
//  Here is the control flow of this function:
//  1. Search filters for matching Event. If Event return return EFI_ALREADY_STARTED.
//  2. Allocate Link for filter. If out of resources, return EFI_OUT_OF_RESOURCES.
//  3. Fill in filter data.
//  4. Add link to end.
//  5. Return EFI_SUCCESS.
//
//<AMI_PHDR_END>
//**********************************************************************

EFI_STATUS RegisterFilterDriver(
    IN EFI_DATA_HUB_PROTOCOL    *This,
    IN EFI_EVENT                FilterEvent,
    IN EFI_TPL                  FilterTpl,
    IN UINT64                   FilterClass,
    IN EFI_GUID                 *FilterDataRecordGuid OPTIONAL
)
{
    FILTER      *Filter;
    FILTER      *Link, *PLink;
    FILTER      **Ptr;
    
    if (gFilHead) {
        for (Link = gFilHead; Link; Link = Link->Link) {
            if (Link->Event == FilterEvent) 
                return EFI_ALREADY_STARTED;
            
            PLink = Link;
        }
        
        Ptr = &PLink->Link;
        
    } else
        Ptr = &gFilHead;
    
    if ( pBS->AllocatePool(
            EfiBootServicesData,
            sizeof(FILTER),
            &Filter) != EFI_SUCCESS )
        return EFI_OUT_OF_RESOURCES;
        
    Filter->Link        = 0;
    Filter->Event       = FilterEvent;
    Filter->Class       = FilterClass;
    Filter->LastRead    = NULL;
    
    if (FilterDataRecordGuid) { //Guid is optional. isGuid, determines if to test Guid.
        Filter->DataRecordGuid = *FilterDataRecordGuid;
        Filter->isGuid = TRUE;
        
    } else
        Filter->isGuid = FALSE;
    
    *Ptr = Filter;
    
    // Signal the Filter driver to get all the previous logged data. Otherwise,
    // One must wait until the next signal to get the previous logged data.
    pBS->SignalEvent(FilterEvent);
    
    return EFI_SUCCESS;
}

//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: UnregisterFilterDriver
//
// Description: Unregister a filter driver.
//
// Input:
//  IN EFI_DATA_HUB_PROTOCOL    *This
//  IN EFI_EVENT                FilterEvent
//
// Output:
//  EFI_STATUS
//  * EFI_SUCCESS - Filter driver removed.
//  * EFI_NOT_FOUND - Filter driver not found.
//
// Modified: gFilHead
//
// Referrals: FreePool
//
// Notes:
//  Here is the control flow of this function:
//  1. If no filter drivers, return EFI_NOT_FOUND.
//  2. If filter stored in Filter Driver Head, free filter driver
//     and set Head to next link.
//  3. Find filter driver.
//  4. If found, remove link, then free link. Return EFI_SUCCESS.
//  5. If not found, return EFI_NOT_FOUND.
//
//<AMI_PHDR_END>
//**********************************************************************

EFI_STATUS UnregisterFilterDriver(
    IN EFI_DATA_HUB_PROTOCOL    *This,
    IN EFI_EVENT                FilterEvent
)
{
    FILTER  *Link, *PLink;
    
    PLink = gFilHead;
    
    if (!gFilHead) 
        return EFI_NOT_FOUND;
    
    if (gFilHead->Event == FilterEvent) {
        gFilHead = gFilHead->Link;
        pBS->FreePool(PLink);
        return EFI_SUCCESS;
    }
    
    for (Link = gFilHead->Link; Link; Link = Link->Link) {
        if (Link->Event == FilterEvent) {
            PLink->Link = Link->Link;
            pBS->FreePool(Link);
            return EFI_SUCCESS;
        }
        
        PLink = Link;
    }
    
    return EFI_NOT_FOUND;
}

EFI_DATA_HUB_PROTOCOL gDataHub = {
    LogData,
    GetNextDataRecord,
    RegisterFilterDriver,
    UnregisterFilterDriver
};

//**********************************************************************
//<AMI_PHDR_START>
//
// Procedure: InitDataHub
//
// Description: Install Data Hub Protocol.
//
// Input:
//  IN EFI_HANDLE       ImageHandle
//  IN EFI_SYSTEM_TABLE *SystemTable
//
// Output: EFI_STATUS
//
// Referrals: InstallMultipleProtocolInterfaces
//
// Notes:
//  Here is the control flow of this function:
//  1. Install Data Hub Protocol.
//
//<AMI_PHDR_END>
//**********************************************************************

EFI_STATUS InitDataHub(
    IN EFI_HANDLE       ImageHandle,
    IN EFI_SYSTEM_TABLE *SystemTable
)
{
    InitAmiLib(ImageHandle, SystemTable);
    
    return pBS->InstallMultipleProtocolInterfaces(
               &ImageHandle,
               &gDataHubProtocolGuid, 
               &gDataHub,
               NULL
           );
}

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2007, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************