summaryrefslogtreecommitdiff
path: root/Include/PPI/SerialDevice.h
blob: dc42755dc978588d110eacf17b649dd5209e8cd6 (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
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************
// $Header: /Alaska/BIN/Core/Modules/Recovery/SerialDevice.h 2     2/13/12 4:14a Rajeshms $
//
// $Revision: 2 $
//
// $Date: 2/13/12 4:14a $
//*****************************************************************************
// Revision	History
// ----------------
// $Log: /Alaska/BIN/Core/Modules/Recovery/SerialDevice.h $
// 
// 2     2/13/12 4:14a Rajeshms
// [TAG]  		EIP80704
// [Category]  	New Feature
// [Description]  	Serial Recovery support through PCI Serial Port .
// [Files]  		PciSerialRecovery.mak, PciSerialRecovery.sdl,
// PciSerialRecovery.c, PciSerialRecovery.h, PciSerialRecovery.chm,
// PciSerialRecovery.dxs, SerialRecovery.c, SerialDevice.h
// 
// 1     7/10/09 10:40a Rameshr
// Initial Check-in
// -Recovery from Multiple Serial Device support Added
// 
//
//*****************************************************************************
//<AMI_FHDR_START>
//----------------------------------------------------------------------------
//
// Name:	SerialDevice.h
//
// Description: Protocol Header for the Serial Recovery Device.
//
//----------------------------------------------------------------------------
//<AMI_FHDR_END>

#ifndef _PEI_SERIAL_DEVICE_PPI_H
#define _PEI_SERIAL_DEVICE_PPI_H
#ifdef __cplusplus
extern "C" {
#endif

#include "EFI.h"
#include "PEI.h"

#define PEI_RECOVERY_SERIAL_MODE_PPI_GUID \
  { 0x5e7063d3, 0xc12, 0x475b, 0x98, 0x35, 0x14, 0xab, 0xb1, 0xcb, 0xe, 0xe9 }


enum {
    SerialDataReg,
    InteruptEnableReg,
    FifoControlReg,
    LineControlReg,
    ModemControlReg,
    LineStatusReg,
    ModemStatusReg
};

typedef struct _PEI_RECOVERY_SERIAL_MODE_PPI PEI_RECOVERY_SERIAL_MODE_PPI;

typedef UINT8 (EFIAPI *SERIAL_READ) (
    IN  PEI_RECOVERY_SERIAL_MODE_PPI *This,
    IN  UINT8   Offset
);

typedef VOID (EFIAPI *SERIAL_WRITE) (
    IN  PEI_RECOVERY_SERIAL_MODE_PPI *This,
    IN  UINT8   Offset,
    IN  UINT8   Data
);

#pragma pack(1)
struct _PEI_RECOVERY_SERIAL_MODE_PPI {
    UINT64          SerialDeviceBaseAddress;
    SERIAL_READ     ReadSerialDevice;
    SERIAL_WRITE    WriteSerialDevice;
};
#pragma pack()

#ifdef __cplusplus
}
#endif
#endif

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