• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*++
2 
3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 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     DebugPort.h
15 
16 Abstract:
17 
18 --*/
19 
20 #ifndef _DEBUG_PORT_H_
21 #define _DEBUG_PORT_H_
22 
23 #include "EfiApi.h"
24 
25 //
26 // DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
27 //
28 #define EFI_DEBUGPORT_PROTOCOL_GUID \
29   { \
30     0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0} \
31   }
32 
33 extern EFI_GUID gEfiDebugPortProtocolGuid;
34 
35 EFI_FORWARD_DECLARATION (EFI_DEBUGPORT_PROTOCOL);
36 
37 //
38 // DebugPort member functions
39 //
40 typedef
41 EFI_STATUS
42 (EFIAPI *EFI_DEBUGPORT_RESET) (
43   IN EFI_DEBUGPORT_PROTOCOL               * This
44   );
45 
46 typedef
47 EFI_STATUS
48 (EFIAPI *EFI_DEBUGPORT_WRITE) (
49   IN EFI_DEBUGPORT_PROTOCOL               * This,
50   IN UINT32                               Timeout,
51   IN OUT UINTN                            *BufferSize,
52   IN VOID                                 *Buffer
53   );
54 
55 typedef
56 EFI_STATUS
57 (EFIAPI *EFI_DEBUGPORT_READ) (
58   IN EFI_DEBUGPORT_PROTOCOL               * This,
59   IN UINT32                               Timeout,
60   IN OUT UINTN                            *BufferSize,
61   OUT VOID                                *Buffer
62   );
63 
64 typedef
65 EFI_STATUS
66 (EFIAPI *EFI_DEBUGPORT_POLL) (
67   IN EFI_DEBUGPORT_PROTOCOL               * This
68   );
69 
70 //
71 // DebugPort protocol definition
72 //
73 struct _EFI_DEBUGPORT_PROTOCOL {
74   EFI_DEBUGPORT_RESET Reset;
75   EFI_DEBUGPORT_WRITE Write;
76   EFI_DEBUGPORT_READ  Read;
77   EFI_DEBUGPORT_POLL  Poll;
78 };
79 
80 //
81 // DEBUGPORT variable definitions...
82 //
83 #define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
84 #define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
85 #define gEfiDebugPortVariableGuid   gEfiDebugPortProtocolGuid
86 
87 //
88 // DebugPort device path definitions...
89 //
90 #define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
91 #define gEfiDebugPortDevicePathGuid     gEfiDebugPortProtocolGuid
92 
93 typedef struct {
94   EFI_DEVICE_PATH_PROTOCOL  Header;
95   EFI_GUID                  Guid;
96 } DEBUGPORT_DEVICE_PATH;
97 
98 #endif /* _DEBUG_PORT_H_ */
99