summaryrefslogtreecommitdiff
path: root/Include/Protocol/CsmPlatform.h
blob: 9b487a58fb5f2253c5dbbb72c8f9c5e9e803bb2a (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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**           5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093      **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/CSM/Generic/Protocol/CsmPlatform.h 13    1/27/14 12:59p Olegi $
//
// $Revision: 13 $
//
// $Date: 1/27/14 12:59p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/CSM/Generic/Protocol/CsmPlatform.h $
// 
// 13    1/27/14 12:59p Olegi
// EIP151588: added Rom field to CSM_PLATFORM_POLICY_DATA
// 
// 12    11/14/11 12:05p Olegi
// 
// 11    11/10/11 7:31p Olegi
// Added thunk GUID protocol definition.
// 
// 10    10/03/11 3:19p Olegi
// [TAG]  		EIP71591
// [Category]  	Improvement
// [Description]  	CSM opt-out changes
// 
// 9     8/19/11 4:30p Olegi
// [TAG]  		EIP65477
// [Category]  	Improvement
// [Description]  	CSM Opt-out mechanism
// [Files]  		csmplatform.h, csm.dxs
// 
// 8     3/01/10 3:57p Olegi
// Changed the prototypes of Pre/PostOptionRom functions; requires the
// update of AMI Board component. EIP34085.
// 
// 7     1/12/10 11:51a Olegi
// Copyright message updated.
// 
// 6     6/18/09 10:06a Olegi
// Added definition of CSM OpROM policy related data.
// 
// 5     4/27/07 5:17p Olegi
// CSM.CHM file preparation.
//
// 4     4/13/07 9:51a Olegi
//
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:    CsmPlatform.h
//
// Description: CsmPlatform protocol declaration
//
//<AMI_FHDR_END>
//**********************************************************************

#ifndef __CSM_PLATFORM_PROTOCOL_H__
#define __CSM_PLATFORM_PROTOCOL_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <EFI.h>

// {91FA9DFD-DBD4-44ae-97A4-BD1837D5B462}
#define CSM_PLATFORM_PROTOCOL_GUID \
    {0x91fa9dfd,0xdbd4,0x44ae,0x97,0xa4,0xbd,0x18,0x37,0xd5,0xb4,0x62}

GUID_VARIABLE_DECLARATION(gCsmPlatformProtocolGuid,CSM_PLATFORM_PROTOCOL_GUID);

#ifndef GUID_VARIABLE_DEFINITION
#include <Protocol/PciIo.h>
#include <Protocol/LegacyBios.h>

typedef struct _CSM_PLATFORM_PROTOCOL CSM_PLATFORM_PROTOCOL;

typedef EFI_STATUS (EFIAPI *CSM_PLATFORM_PROTOCOL_PRE_PROCESS_OPROM) (
    IN CSM_PLATFORM_PROTOCOL *This,
    IN EFI_PCI_IO_PROTOCOL *PciIo,
    IN VOID **RomImage
);

typedef EFI_STATUS (EFIAPI *CSM_PLATFORM_PROTOCOL_POST_PROCESS_OPROM) (
    IN CSM_PLATFORM_PROTOCOL *This,
    IN EFI_PCI_IO_PROTOCOL *PciIo,
    IN VOID **RomImage
);

typedef EFI_STATUS (EFIAPI *CSM_PLATFORM_PROTOCOL_GET_ATAPI_DEVICE_TYPE) (
    IN CSM_PLATFORM_PROTOCOL *This,
    IN struct _ATAPI_IDENTIFY *IdentifyDriveData,
    OUT UINT16 *DevType
);

typedef struct _CSM_PLATFORM_PROTOCOL {
    CSM_PLATFORM_PROTOCOL_PRE_PROCESS_OPROM PreProcessOpRom;
    CSM_PLATFORM_PROTOCOL_POST_PROCESS_OPROM PostProcessOpRom;
    CSM_PLATFORM_PROTOCOL_GET_ATAPI_DEVICE_TYPE GetAtapiDeviceType;
} CSM_PLATFORM_PROTOCOL;

#define CSM_OPRROM_POLICY_GUID \
    {0xf2a128ff,0x257b,0x456e,0x9d,0xe8,0x63,0xe7,0xc7,0xdc,0xdf,0xac}

typedef struct _CSM_PLATFORM_POLICY_DATA {
    EFI_PCI_IO_PROTOCOL *PciIo;
    BOOLEAN             ExecuteThisRom;
    VOID                **Rom;
} CSM_PLATFORM_POLICY_DATA;

// The following GUID is used in DXS; it can be installed by the driver that
// has minimum or no dependencies so that it is launched earlier than CSM.
//  
#ifndef AMI_LOAD_CSM_GUID
#define AMI_LOAD_CSM_GUID  \
  { 0x16287ba4, 0x5b9d, 0x4d98, 0x91, 0x9f, 0x7b, 0x7b, 0x78, 0xcb, 0x2b, 0xe0 }
#endif

#ifndef AMI_CSM_DRIVER_STARTED_GUID
#define AMI_CSM_DRIVER_STARTED_GUID  \
  { 0x3EA824D1, 0x81E3, 0x4FF5, 0xBD, 0x43, 0xBB, 0x9C, 0x65, 0xDF, 0x7C, 0x46}
#endif

#ifndef AMI_CSM_THUNK_PROTOCOL_GUID
#define AMI_CSM_THUNK_PROTOCOL_GUID \
  { 0x2362ea9c, 0x84e5, 0x4dff, 0x83, 0xbc, 0xb5, 0xac, 0xec, 0xb5, 0x7c, 0xbb }
#endif

/****** DO NOT WRITE BELOW THIS LINE *******/
#endif // #ifndef GUID_VARIABLE_DEFINITION
#ifdef __cplusplus
}
#endif
#endif

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