]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiGetConfigTable.c
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / EfiDriverLib / EfiGetConfigTable.c
1 /*++
2
3 Copyright (c) 2004 - 2007, 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 EfiGetConfigTable.c
15
16 Abstract:
17
18 Light weight lib to support EFI drivers.
19
20 --*/
21
22 #include "Tiano.h"
23 #include "EfiDriverLib.h"
24
25 EFI_STATUS
26 EfiLibGetSystemConfigurationTable (
27 IN EFI_GUID *TableGuid,
28 OUT VOID **Table
29 )
30 /*++
31
32 Routine Description:
33
34 Get table from configuration table by name
35
36 Arguments:
37
38 TableGuid - Table name to search
39
40 Table - Pointer to the table caller wants
41
42 Returns:
43
44 EFI_NOT_FOUND - Not found the table
45
46 EFI_SUCCESS - Found the table
47
48 --*/
49 {
50 UINTN Index;
51
52 *Table = NULL;
53 for (Index = 0; Index < gST->NumberOfTableEntries; Index++) {
54 if (EfiCompareGuid (TableGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
55 *Table = gST->ConfigurationTable[Index].VendorTable;
56 return EFI_SUCCESS;
57 }
58 }
59
60 return EFI_NOT_FOUND;
61 }