summaryrefslogtreecommitdiff
path: root/Board/EM/ACPI/OEM_ACPI.C
blob: a3c3b0a98b6e895e1f629ea20f791ba2b6ccbda5 (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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             5555 Oakbrook Pkwy, Norcross, GA 30093               **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************
//**********************************************************************
// $Header: /Alaska/BIN/Modules/ACPI/Template/Board/OEM_ACPI.C 3     12/22/10 5:11p Oleksiyy $
//
// $Revision: 3 $
//
// $Date: 12/22/10 5:11p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Modules/ACPI/Template/Board/OEM_ACPI.C $
// 
// 3     12/22/10 5:11p Oleksiyy
// [TAG]  		EIP49816
// [Category]  	Improvement
// [Description]  	Function OemAcpiSetPlatformId added as eLink
// [Files]  		ACPi.mak, ACPI.sdl and OEM_ACPI.c
// 
// 2     3/26/09 4:47p Oleksiyy
// New ACPI Core realization - improves logic, execution time and memory
// usage of ACPI module.
// 
// 1     2/18/09 3:50p Oleksiyy
// 
// 1     1/12/09 11:40a Yakovlevs
// 
// 1     3/18/07 5:23p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	OEM_ACPI.C
//
// Description:	Oem hooks used in ACPI Module
//
//<AMI_FHDR_END>
//**********************************************************************

#include <Efi.h>
#include <ACPI.h>
#include <AmiCspLib.h>
#include <AmiDxeLib.h>
#include "AcpiOemElinks.h"
typedef EFI_STATUS (ACPI_OEM_FUNCTION)(IN OUT ACPI_HDR *AcpiHdr);

extern ACPI_OEM_FUNCTION OEM_LIST EndOfOemList;
ACPI_OEM_FUNCTION* AcpiOemPartsList[] = {OEM_LIST NULL};
//<AMI_PHDR_START>
//----------------------------------------------------------------------------
//  Procedure:   OemAcpiSetPlatformId
//
//  Description:
//  This function provides platform specific OEM_ID and OEM_TABLE_ID to 
//  overwrite default ACPI Table header.
//
//  Input:
// 	IN OUT ACPI_HDR *AcpiHdr    - ACPI TABLE header
//
//  Output:
//  EFI_STATUS  EFI_SUCCESS if Values overwtitten.
//              EFI_INSUPPORTED if no need to change values - use default.
//
//  NOTE: UINT8 *AcpiOemId[6]; UINT8 *AcpiOemTblId[8] avoid buffer overrun!
//----------------------------------------------------------------------------
//<AMI_PHDR_END>

EFI_STATUS OemAcpiSetPlatformId(IN OUT ACPI_HDR *AcpiHdr){
    EFI_STATUS       Status=EFI_UNSUPPORTED;
//----------------------------------------
// Any additional variables goes here...

    UINTN i;

//----------------------------------------
//////////////////////////////////////////////////////////////////////////
// PORTING GOES HERE: CALL CHIPSET SPECIFIC FUNCTION TO GET PLATFORM ID //
// AND MODIY AcpiOemId[6], AcpiOemTblId[8] PARAMETERS ACCORDINALLY      //
//////////////////////////////////////////////////////////////////////////
    
    for (i=0; AcpiOemPartsList[i]; i++) Status = AcpiOemPartsList[i](AcpiHdr);



//////////////////////////////////////////////////////////////////////////
//                      PORTING ENDS HERE                               //
//////////////////////////////////////////////////////////////////////////
    return Status;
}

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             5555 Oakbrook Pkwy, Norcross, GA 30093               **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************