summaryrefslogtreecommitdiff
path: root/Protocol
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Protocol
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Protocol')
-rw-r--r--Protocol/Authorization/Authorization.c34
-rw-r--r--Protocol/Authorization/Authorization.h237
-rw-r--r--Protocol/CardService/CardService.c37
-rw-r--r--Protocol/CardService/CardService.h108
-rw-r--r--Protocol/EnhancedSpeedstep/EnhancedSpeedstep.c37
-rw-r--r--Protocol/EnhancedSpeedstep/EnhancedSpeedstep.h114
-rw-r--r--Protocol/FaultTolerantWrite/FaultTolerantWrite.c40
-rw-r--r--Protocol/FaultTolerantWrite/FaultTolerantWrite.h275
-rw-r--r--Protocol/GPIO/Gpio.c37
-rw-r--r--Protocol/GPIO/Gpio.h83
-rw-r--r--Protocol/GenericFru/GenericFru.c35
-rw-r--r--Protocol/GenericFru/GenericFru.h124
-rw-r--r--Protocol/Ip/Ip.c35
-rw-r--r--Protocol/Ip/Ip.h438
-rw-r--r--Protocol/MpService/MpService.c35
-rw-r--r--Protocol/MpService/MpService.h200
-rw-r--r--Protocol/PcmciaRequest/PcmciaRequest.c37
-rw-r--r--Protocol/PcmciaRequest/PcmciaRequest.h72
-rw-r--r--Protocol/ProtocolLib.cif49
-rw-r--r--Protocol/ProtocolLib.mak81
-rw-r--r--Protocol/ProtocolLib.sdl29
-rw-r--r--Protocol/SimpleAudioOut/SimpleAudioOut.c37
-rw-r--r--Protocol/SimpleAudioOut/SimpleAudioOut.h149
-rw-r--r--Protocol/Sio/Sio.c33
-rw-r--r--Protocol/Sio/Sio.h405
-rw-r--r--Protocol/SmmRtProtocol/SmmRtProtocol.c36
-rw-r--r--Protocol/SmmRtProtocol/SmmRtProtocol.h161
-rw-r--r--Protocol/Smtp/Smtp.c35
-rw-r--r--Protocol/Smtp/Smtp.h81
-rw-r--r--Protocol/SocketService/SocketService.c37
-rw-r--r--Protocol/SocketService/SocketService.h155
-rw-r--r--Protocol/Speaker/Speaker.c37
-rw-r--r--Protocol/Speaker/Speaker.h75
-rw-r--r--Protocol/SwapAddressRange/SwapAddressRange.c33
-rw-r--r--Protocol/SwapAddressRange/SwapAddressRange.h106
-rw-r--r--Protocol/TcpSock/TcpSock.c36
-rw-r--r--Protocol/TcpSock/TcpSock.h97
-rw-r--r--Protocol/TelnetServer/TelnetServer.c35
-rw-r--r--Protocol/TelnetServer/TelnetServer.h89
-rw-r--r--Protocol/Udp/Udp.c35
-rw-r--r--Protocol/Udp/Udp.h202
-rw-r--r--Protocol/VgaMiniPort/VgaMiniPort.c36
-rw-r--r--Protocol/VgaMiniPort/VgaMiniPort.h78
43 files changed, 4125 insertions, 0 deletions
diff --git a/Protocol/Authorization/Authorization.c b/Protocol/Authorization/Authorization.c
new file mode 100644
index 0000000..982b308
--- /dev/null
+++ b/Protocol/Authorization/Authorization.c
@@ -0,0 +1,34 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2001 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Authorization.c
+
+Abstract:
+
+ Guid Definition for the EFI Authorization Protocol
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (Authorization)
+
+EFI_GUID gEfiAuthorizationProtocolGuid = EFI_AUTHORIZATION_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiAuthorizationProtocolGuid, "EFI Authorization Protocol", "EFI Authorization");
diff --git a/Protocol/Authorization/Authorization.h b/Protocol/Authorization/Authorization.h
new file mode 100644
index 0000000..258edb3
--- /dev/null
+++ b/Protocol/Authorization/Authorization.h
@@ -0,0 +1,237 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ Authorization.h
+
+Abstract:
+
+ EFI Authorization Protocol
+
+--*/
+
+#ifndef _EFI_AUTHORIZATION_PROTOCOL_H_
+#define _EFI_AUTHORIZATION_PROTOCOL_H_
+
+#include <Tiano.h>
+
+EFI_FORWARD_DECLARATION (EFI_AUTH);
+
+//
+// EFI authorization protocol
+//
+#define EFI_AUTHORIZATION_PROTOCOL_GUID \
+ { \
+ 0x995188b1, 0x9f96, 0x11d4, 0x87, 0xae, 0x00, 0x06, 0x29, 0x2e, 0x8a, 0x3b \
+ }
+
+#define EFI_AUTHERR (val) EFIERR_OEM (0x10000 | (val))
+#define EFI_AUTHWARN (val) EFIWARN (0x10000 | val)
+
+//
+// In addition to standard EFI status codes, the following
+// EFI_AUTHWARNING and EFI_AUTHERR based retun values are
+// defined which are compatible with the EFI_ERROR() macro.
+//
+#define EFI_AUTHWARN_NO_DATABASE EFI_AUTHWARN (1)
+
+#define EFI_AUTHERR_INIT EFI_AUTHERR (1)
+#define EFI_AUTHERR_FAILURE EFI_AUTHERR (2)
+#define EFI_AUTHERR_DUPLICATE EFI_AUTHERR (3)
+#define EFI_AUTHERR_COMPROMISED EFI_AUTHERR (4)
+
+//
+// Bit definitions of authorization methods
+//
+#define AUTH_METHOD_DEFAULT 0x0000
+#define AUTH_METHOD_PASSWORD 0x0001
+#define AUTH_METHOD_CHALLENGE_RESPONSE 0x0002
+#define AUTH_METHOD_CERTIFICATE 0x0004
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHINIT) (
+ IN EFI_AUTH * This,
+ IN UINT64 Method,
+ IN VOID *MethodInitData OPTIONAL,
+ IN UINTN MethodInitDataLen OPTIONAL,
+ IN VOID *ModificationToken OPTIONAL,
+ IN UINTN ModificationTokenLen OPTIONAL
+ )
+/*++
+
+Routine Description:
+
+ Authorization initialization service.
+
+Arguments:
+
+ This - Pointer to this EFI_AUTH_INTERFACE instance.
+ Method - Specifies the desired Authorization to be used.
+ MethodInitData - Pointer to Authorization method specific data.
+ MethodInitDataLen - Length of Authorization method specific data.
+ ModificationToken - Pointer to token needed to modify database.
+ ModificationTokenLen - Length of token needed to modify database.
+
+Returns:
+
+ EFI_STATUS
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHVALIDATE) (
+ IN EFI_AUTH * This,
+ IN VOID *Id,
+ IN UINTN IdLen,
+ IN VOID *Key,
+ IN UINTN KeyLen,
+ OUT UINT32 *Privilege OPTIONAL
+ )
+/*++
+
+Routine Description:
+
+ Validate Authorization credentials
+
+Arguments:
+
+ This - Pointer to this EFI_AUTH_INTERFACE instance.
+ Id - Pointer to the identifier of the Authorization key.
+ IdLen - Length of Authorization ID.
+ Key - Pointer to Authorization key associated with the ID.
+ KeyLen - Length of Authorization key associated with the ID.
+
+Returns:
+
+ EFI_STATUS
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHPROBE) (
+ IN EFI_AUTH * This,
+ IN VOID *Id,
+ IN UINTN IdLen,
+ OUT UINT32 *Privilege OPTIONAL
+ )
+/*++
+
+Routine Description:
+
+ Probe account to see if it exists and returns privilege
+
+Arguments:
+
+ This - Pointer to this EFI_AUTH_INTERFACE instance.
+ Id - Pointer to the identifier of the Authorization key.
+ IdLen - Length of Authorization ID.
+
+Returns:
+
+ EFI_STATUS
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHCREATE) (
+ IN EFI_AUTH * This,
+ IN VOID *Id,
+ IN UINTN IdLen,
+ IN VOID *Key,
+ IN UINTN KeyLen,
+ IN UINT32 Privilege,
+ IN VOID *ModificationToken,
+ IN UINTN ModificationTokenLen
+ )
+/*++
+
+Routine Description:
+
+ Create Authorization credentials
+
+Arguments:
+
+ This - Pointer to this EFI_AUTH_INTERFACE instance.
+ Id - Pointer to the identifier of the Authorization key.
+ IdLen - Length of Authorization ID.
+ Key - Pointer to Authorization key associated with the ID.
+ KeyLen - Length of Authorization key associated with the ID.
+ ModificationToken - Pointer to token needed to modify database.
+ ModificationTokenLen - Length of token needed to modify database.
+
+Returns:
+
+ EFI_STATUS
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AUTHDELETE) (
+ IN EFI_AUTH * This,
+ IN VOID *Id,
+ IN UINTN IdLen,
+ IN VOID *Key,
+ IN UINTN KeyLen,
+ IN VOID *ModificationToken,
+ IN UINTN ModificationTokenLen
+ )
+/*++
+
+Routine Description:
+
+ Delete Authorization credentials
+
+Arguments:
+
+ This - Pointer to this EFI_AUTH_INTERFACE instance.
+ Id - Pointer to the identifier of the Authorization key.
+ IdLen - Length of Authorization ID.
+ Key - Pointer to Authorization key associated with the ID.
+ KeyLen - Length of Authorization key associated with the ID.
+ ModificationToken - Pointer to token needed to modify database.
+ ModificationTokenLen - Length of token needed to modify database.
+
+Returns:
+
+ EFI_STATUS
+
+--*/
+;
+
+typedef struct _EFI_AUTH {
+ EFI_AUTHINIT Init;
+ EFI_AUTHVALIDATE Validate;
+ EFI_AUTHPROBE Probe;
+ EFI_AUTHCREATE Create;
+ EFI_AUTHDELETE Delete;
+
+ UINT64 Methods;
+
+} EFI_AUTH_INTERFACE;
+
+extern EFI_GUID gEfiAuthorizationProtocolGuid;
+#endif // _EFI_AUTHORIZATION_PROTOCOL_H_
diff --git a/Protocol/CardService/CardService.c b/Protocol/CardService/CardService.c
new file mode 100644
index 0000000..c68f38b
--- /dev/null
+++ b/Protocol/CardService/CardService.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ CardService.c
+
+Abstract:
+
+ EFI PC Card Card Service Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (CardService)
+
+EFI_GUID gEfiPcCardCsProtocolGuid = EFI_PCCARD_CS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPcCardCsProtocolGuid, "Card Service Protocol", "EFI 1.1 Card Service Protocol");
diff --git a/Protocol/CardService/CardService.h b/Protocol/CardService/CardService.h
new file mode 100644
index 0000000..5428a55
--- /dev/null
+++ b/Protocol/CardService/CardService.h
@@ -0,0 +1,108 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ CardService.h
+
+Abstract:
+
+ EFI PC Card Card Service Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_PCCARD_CS_H
+#define _EFI_PCCARD_CS_H
+
+//
+// Global GUID for PC Card Card Service Protocol
+//
+#define EFI_PCCARD_CS_PROTOCOL_GUID \
+ { \
+ 0xca54f443, 0x1ef2, 0x4dab, 0x9e, 0x7e, 0x6d, 0xb7, 0xb7, 0x20, 0xb5, 0x87 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PCCARD_CS_PROTOCOL);
+
+//
+// Prototypes for PC Card Card Service Protocol
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_CS_GET_TUPLE) (
+ IN EFI_PCCARD_CS_PROTOCOL * This,
+ IN UINT8 TupleCode,
+ IN OUT UINTN *BufferSize,
+ OUT UINT8 *Buffer,
+ IN OUT VOID **Key
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_CS_REGISTER_EVENT) (
+ IN EFI_PCCARD_CS_PROTOCOL * This,
+ IN BOOLEAN Enable OPTIONAL,
+ IN EFI_EVENT Event
+ );
+
+//
+// EFI PC Card Event bits
+//
+#define EFI_PCCARD_CS_EVENT_READY 0x00000001
+#define EFI_PCCARD_CS_EVENT_BATTERY 0x00000002
+//
+// #define EFI_PCCARD_CS_EVENT_BATTERY_DEAD 0x00000004
+//
+#define EFI_PCCARD_CS_EVENT_WRITE_PROTECT 0x00000008
+#define EFI_PCCARD_CS_EVENT_GWAKE 0x00000010
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_CS_GET_EVENT) (
+ IN EFI_PCCARD_CS_PROTOCOL * This,
+ OUT UINT32 *Event
+ );
+
+//
+// EFI PC Card State bits
+//
+#define EFI_PCCARD_CS_STATE_READY 0x00000001
+#define EFI_PCCARD_CS_STATE_BATTERY_WARNING 0x00000002
+#define EFI_PCCARD_CS_STATE_BATTERY_DEAD 0x00000004
+#define EFI_PCCARD_CS_STATE_WRITE_PROTECT 0x00000008
+#define EFI_PCCARD_CS_STATE_GWAKE 0x00000010
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_CS_GET_STATE) (
+ IN EFI_PCCARD_CS_PROTOCOL * This,
+ OUT UINT32 *State
+ );
+
+typedef struct _EFI_PCCARD_CS_PROTOCOL {
+ EFI_PCCARD_CS_GET_TUPLE GetTuple;
+ EFI_PCCARD_CS_REGISTER_EVENT RegisterHandler;
+ EFI_PCCARD_CS_GET_EVENT GetEvent;
+ EFI_PCCARD_CS_GET_STATE GetState;
+} EFI_PCCARD_CS_PROTOCOL;
+
+extern EFI_GUID gEfiPcCardCsProtocolGuid;
+
+#endif
diff --git a/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.c b/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.c
new file mode 100644
index 0000000..cba88b8
--- /dev/null
+++ b/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 2004 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ EnhacedSpeedstep.c
+
+Abstract:
+
+ Enhaced Speedstep protocol
+
+ Enhanced Intel Speedstep support.
+--*/
+
+// GC_TODO: fix comment to set correct module name: EnhancedSpeedstep.c
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (EnhancedSpeedstep)
+
+EFI_GUID gDxeEnhancedSpeedstepProtocolGuid = DXE_ENHANCED_SPEEDSTEP_PROTOCOL_GUID;
+
+EFI_GUID_STRING
+ (&gDxeEnhancedSpeedstepProtocolGuid, "Enhanced Speedstep Protocol", "Enhanced Speedstep support protocol");
diff --git a/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.h b/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.h
new file mode 100644
index 0000000..35b43d5
--- /dev/null
+++ b/Protocol/EnhancedSpeedstep/EnhancedSpeedstep.h
@@ -0,0 +1,114 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 2004 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ EnhancedSpeedstep.h
+
+Abstract:
+
+ Enhanced Speedstep protocol
+
+ The Enhanced Speedstep Protocol support.
+--*/
+
+#ifndef _ENHANCED_SPEEDSTEP_H_
+#define _ENHANCED_SPEEDSTEP_H_
+
+#define DXE_ENHANCED_SPEEDSTEP_PROTOCOL_GUID \
+ { \
+ 0xe98021, 0xf4fe, 0x46cc, 0xab, 0x2d, 0x89, 0x4c, 0x37, 0x3a, 0xfa, 0x1 \
+ }
+
+EFI_FORWARD_DECLARATION (DXE_ENHANCED_SPEEDSTEP_PROTOCOL);
+
+typedef struct {
+ UINT32 Stepping; // Matches value returned by CPUID function 1
+ UINT8 Version; // FVID State format
+ UINT8 Size; // Size of 1 FVID_STATE element
+ UINT8 MaxVid; // Calculated Max VID
+ UINT8 MaxBusRatio; // Calculated max ratio
+ UINT8 NumStates; // Number of states of FVID (N)
+} FVID_INFORMATION;
+
+typedef struct {
+ UINT32 Power; // Typical power consumed by CPU in this state
+ UINT16 State; // State Number (0 - N-1)
+ UINT16 Vid; // VID_SEL value to be written to PERF_CTL
+ UINT16 BusRatio; // BUS_RATIO_SEL value written to PERF_CTL
+ UINT16 Reserved; // to preserve alignment
+} FVID_STATE_1;
+
+#define ES_FVID_STATE_VERSION_1 1
+
+typedef struct {
+ UINT32 Features;
+ UINT32 Locks;
+} ENHANCED_SPEEDSTEP_STATE;
+
+#define ES_GV3 (1 << 0)
+#define ES_TM2 (1 << 1)
+//
+// All other bits reserved.
+//
+typedef
+EFI_STATUS
+(EFIAPI *ES_GET_CAPABILITIES) (
+ IN DXE_ENHANCED_SPEEDSTEP_PROTOCOL * This,
+ IN OUT ENHANCED_SPEEDSTEP_STATE * Capabilities
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *ES_GET_STATE) (
+ IN DXE_ENHANCED_SPEEDSTEP_PROTOCOL * This,
+ IN OUT ENHANCED_SPEEDSTEP_STATE * State
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *ES_SET_STATE) (
+ IN DXE_ENHANCED_SPEEDSTEP_PROTOCOL * This,
+ IN OUT ENHANCED_SPEEDSTEP_STATE * State,
+ IN ENHANCED_SPEEDSTEP_STATE * Mask
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *ES_GET_FVID_TABLE) (
+ IN DXE_ENHANCED_SPEEDSTEP_PROTOCOL * This,
+ OUT FVID_INFORMATION **FvidInformation,
+ OUT VOID **FvidStates
+ );
+
+typedef struct _DXE_ENHANCED_SPEEDSTEP_PROTOCOL {
+ ES_GET_CAPABILITIES GetCapabilities;
+ ES_GET_STATE GetState;
+ ES_SET_STATE SetState;
+ ES_GET_FVID_TABLE GetFvidTable;
+ UINT16 ProcNumber;
+} DXE_ENHANCED_SPEEDSTEP_PROTOCOL;
+//
+// There will be an instance of this protocol for every processor
+// in the system. ProcNumber is used to manage all the different
+// processors in the system and passed into the MP protocol
+// to run code streams on application processors
+//
+extern EFI_GUID gDxeEnhancedSpeedstepProtocolGuid;
+
+#endif
diff --git a/Protocol/FaultTolerantWrite/FaultTolerantWrite.c b/Protocol/FaultTolerantWrite/FaultTolerantWrite.c
new file mode 100644
index 0000000..ae05d1a
--- /dev/null
+++ b/Protocol/FaultTolerantWrite/FaultTolerantWrite.c
@@ -0,0 +1,40 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ FaultTolerantWrite.c
+
+Abstract:
+
+ Fault Tolerant Write protocol as defined in the EFI 2.0 Falut Tolerant Write
+ specification.
+
+ This boot service only protocol provides fault tolerant write capability for
+ block devices. The protocol provides for non-volatile intermediate storage
+ of the data and private information a caller would need to recover from a
+ critical fault, such as power failure.
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (FaultTolerantWrite)
+
+EFI_GUID gEfiFaultTolerantWriteProtocolGuid = EFI_FAULT_TOLERANT_WRITE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiFaultTolerantWriteProtocolGuid, "FaultTolerantWrite Protocol", "Fault Tolerant Write protocol");
diff --git a/Protocol/FaultTolerantWrite/FaultTolerantWrite.h b/Protocol/FaultTolerantWrite/FaultTolerantWrite.h
new file mode 100644
index 0000000..f6854f6
--- /dev/null
+++ b/Protocol/FaultTolerantWrite/FaultTolerantWrite.h
@@ -0,0 +1,275 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ FaultTolerantWrite.h
+
+Abstract:
+
+ Fault Tolerant Write protocol as defined in the Tiano Fault Tolerant Write
+ specification.
+
+ This boot service only protocol provides fault tolerant write capability for
+ block devices. The protocol provides for non-volatile intermediate storage
+ of the data and private information a caller would need to recover from a
+ critical fault, such as power failure.
+
+--*/
+
+#ifndef _FW_FAULT_TOLERANT_WRITE_PROTOCOL_H_
+#define _FW_FAULT_TOLERANT_WRITE_PROTOCOL_H_
+
+#include "EfiFirmwareVolumeHeader.h"
+#include EFI_PROTOCOL_CONSUMER (FirmwareVolumeBlock)
+
+#define EFI_FAULT_TOLERANT_WRITE_PROTOCOL_GUID \
+ { \
+ 0x3ebd9e82, 0x2c78, 0x4de6, 0x97, 0x86, 0x8d, 0x4b, 0xfc, 0xb7, 0xc8, 0x81 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_FAULT_TOLERANT_WRITE_PROTOCOL);
+
+//
+// Protocol API definitions
+//
+//
+// Forward declaration of protocol data structure
+//
+typedef struct _EFI_FAULT_TOLERANT_WRITE_PROTOCOL EFI_FAULT_TOLERANT_WRITE_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_GET_MAX_BLOCK_SIZE) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This,
+ OUT UINTN *BlockSize
+ );
+
+/*++
+
+Routine Description:
+
+ Query the largest block that may be updated in a fault tolerant manner.
+
+Arguments:
+
+ This - Indicates a pointer to the calling context.
+ BlockSize - A pointer to a caller allocated UINTN that is updated to
+ indicate the size of the largest block that can be updated.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_ALLOCATE) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This,
+ IN EFI_GUID * CallerId,
+ IN UINTN PrivateDataSize,
+ IN UINTN NumberOfWrites
+ );
+
+/*++
+
+Routine Description:
+
+ Allocates space for the protocol to maintain information about writes.
+ Since writes must be completed in a fault tolerant manner and multiple
+ updates will require more resources to be successful, this function
+ enables the protocol to ensure that enough space exists to track
+ information about the upcoming writes.
+
+Arguments:
+
+ This - Indicates a pointer to the calling context.
+ CallerId - The GUID identifying the write.
+ PrivateDataSize - The size of the caller's private data
+ that must be recorded for each write.
+ NumberOfWrites - The number of fault tolerant block writes
+ that will need to occur.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_ACCESS_DENIED - All allocated writes have not been completed.
+ All writes must be completed or aborted before
+ another fault tolerant write can occur.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_WRITE) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This,
+ IN EFI_LBA Lba,
+ IN UINTN Offset,
+ IN UINTN Length,
+ IN VOID *PrivateData,
+ IN EFI_HANDLE FvbHandle,
+ IN VOID *Buffer
+ );
+
+/*++
+
+Routine Description:
+
+ Starts a target block update. This records information about the write
+ in fault tolerant storage and will complete the write in a recoverable
+ manner, ensuring at all times that either the original contents or
+ the modified contents are available.
+
+Arguments:
+
+ This - Calling context
+ Lba - The logical block address of the target block.
+ Offset - The offset within the target block to place the data.
+ Length - The number of bytes to write to the target block.
+ PrivateData - A pointer to private data that the caller requires to
+ complete any pending writes in the event of a fault.
+ FvBlockHandle - The handle of FVB protocol that provides services for
+ reading, writing, and erasing the target block.
+ Buffer - The data to write.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_BAD_BUFFER_SIZE - The write would span a block boundary,
+ which is not a valid action.
+ EFI_ACCESS_DENIED - No writes have been allocated.
+ EFI_NOT_READY - The last write has not been completed.
+ Restart () must be called to complete it.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_RESTART) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This,
+ IN EFI_HANDLE FvbHandle
+ );
+
+/*++
+
+Routine Description:
+
+ Restarts a previously interrupted write. The caller must provide the
+ block protocol needed to complete the interrupted write.
+
+Arguments:
+
+ This - Calling context.
+ FvBlockProtocol - The handle of FVB protocol that provides services for
+ reading, writing, and erasing the target block.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_ACCESS_DENIED - No pending writes exist.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_ABORT) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This
+ );
+
+/*++
+
+Routine Description:
+
+ Aborts all previous allocated writes.
+
+Arguments:
+
+ This - Calling context
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_NOT_FOUND - No allocated writes exist.
+
+--*/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FAULT_TOLERANT_WRITE_GET_LAST_WRITE) (
+ IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL * This,
+ OUT EFI_GUID * CallerId,
+ OUT EFI_LBA *Lba,
+ OUT UINTN *Offset,
+ OUT UINTN *Length,
+ IN OUT UINTN *PrivateDataSize,
+ OUT VOID *PrivateData,
+ OUT BOOLEAN *Complete
+ );
+
+/*++
+
+Routine Description:
+
+ Starts a target block update. This records information about the write
+ in fault tolerant storage and will complete the write in a recoverable
+ manner, ensuring at all times that either the original contents or
+ the modified contents are available.
+
+Arguments:
+
+ This - Indicates a pointer to the calling context.
+ CallerId - The GUID identifying the last write.
+ Lba - The logical block address of the last write.
+ Offset - The offset within the block of the last write.
+ Length - The length of the last write.
+ PrivateDataSize - On input, the size of the PrivateData buffer.
+ On output, the size of the private data stored
+ for this write.
+ PrivateData - A pointer to a buffer. The function will copy
+ PrivateDataSize bytes from the private data
+ stored for this write.
+ Complete - A Boolean value with TRUE indicating
+ that the write was completed.
+
+Returns:
+
+ EFI_SUCCESS - The function completed successfully
+ EFI_ABORTED - The function could not complete successfully.
+ EFI_NOT_FOUND - No allocated writes exist.
+
+--*/
+
+//
+// Protocol declaration
+//
+typedef struct _EFI_FAULT_TOLERANT_WRITE_PROTOCOL {
+ EFI_FAULT_TOLERANT_WRITE_GET_MAX_BLOCK_SIZE GetMaxBlockSize;
+ EFI_FAULT_TOLERANT_WRITE_ALLOCATE Allocate;
+ EFI_FAULT_TOLERANT_WRITE_WRITE Write;
+ EFI_FAULT_TOLERANT_WRITE_RESTART Restart;
+ EFI_FAULT_TOLERANT_WRITE_ABORT Abort;
+ EFI_FAULT_TOLERANT_WRITE_GET_LAST_WRITE GetLastWrite;
+} EFI_FAULT_TOLERANT_WRITE_PROTOCOL;
+
+extern EFI_GUID gEfiFaultTolerantWriteProtocolGuid;
+
+#endif
diff --git a/Protocol/GPIO/Gpio.c b/Protocol/GPIO/Gpio.c
new file mode 100644
index 0000000..70376ef
--- /dev/null
+++ b/Protocol/GPIO/Gpio.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Gpio.c
+
+Abstract:
+
+ EFI GPIO Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Gpio)
+
+EFI_GUID gEfiGpioProtocolGuid = EFI_GPIO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiGpioProtocolGuid, "GPIO Protocol", "EFI 1.1 GPIO Protocol");
diff --git a/Protocol/GPIO/Gpio.h b/Protocol/GPIO/Gpio.h
new file mode 100644
index 0000000..1c792bd
--- /dev/null
+++ b/Protocol/GPIO/Gpio.h
@@ -0,0 +1,83 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Gpio.h
+
+Abstract:
+
+ EFI GPIO Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_GPIO_H
+#define _EFI_GPIO_H
+
+//
+// Global ID for the GPIO Protocol
+//
+#define EFI_GPIO_PROTOCOL_GUID \
+ { \
+ 0xb5d09084, 0x80ad, 0x4759, 0xb5, 0x1c, 0x27, 0x54, 0x8a, 0xfb, 0x8b, 0x8d \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_GPIO_PROTOCOL);
+
+typedef enum _EFI_GPIO_METHOD
+{
+ EfiGpioMultipleOperation= 0,
+ EfiGpioSingleOperation = 1,
+ EfiGpioMaxOperation = 2
+} EFI_GPIO_METHOD;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GPIO_PROTOCOL_GET_STATE) (
+ IN EFI_GPIO_PROTOCOL * This,
+ IN UINT32 *GpioNumberSet,
+ IN UINT32 GpioArraySize,
+ IN EFI_GPIO_METHOD GpioMethod,
+ IN VOID *DeviceSelector,
+ IN OUT VOID *GpioState
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GPIO_PROTOCOL_SET_STATE) (
+ IN EFI_GPIO_PROTOCOL * This,
+ IN UINT32 *GpioNumberSet,
+ IN UINT32 GpioArraySize,
+ IN EFI_GPIO_METHOD GpioMethod,
+ IN VOID *DeviceSelector,
+ IN VOID *GpioState
+ );
+
+//
+// Interface structure for the GPIO Protocol
+//
+typedef struct _EFI_GPIO_PROTOCOL {
+ EFI_GPIO_PROTOCOL_GET_STATE GetState;
+ EFI_GPIO_PROTOCOL_SET_STATE SetState;
+} EFI_GPIO_PROTOCOL;
+
+extern EFI_GUID gEfiGpioProtocolGuid;
+
+#endif
diff --git a/Protocol/GenericFru/GenericFru.c b/Protocol/GenericFru/GenericFru.c
new file mode 100644
index 0000000..de0c8ce
--- /dev/null
+++ b/Protocol/GenericFru/GenericFru.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ GenericFru.c
+
+Abstract:
+
+ Generic FRU Protocol GUID as defined in Tiano
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (GenericFru)
+
+EFI_GUID gEfiGenericFruProtocolGuid = EFI_SM_FRU_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiGenericFruProtocolGuid, "GENERIC FRU", "GENERIC FRU");
diff --git a/Protocol/GenericFru/GenericFru.h b/Protocol/GenericFru/GenericFru.h
new file mode 100644
index 0000000..f50c627
--- /dev/null
+++ b/Protocol/GenericFru/GenericFru.h
@@ -0,0 +1,124 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2001 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ GenericFru.h
+
+Abstract:
+
+ Generic FRU Protocol as defined in Tiano
+
+ This code abstracts the generic FRU Protocol
+
+--*/
+
+#ifndef _GENERIC_FRU_H_
+#define _GENERIC_FRU_H_
+
+#define EFI_SM_FRU_PROTOCOL_GUID \
+ { \
+ 0xc8eebf0e, 0xe10, 0x47f7, 0x81, 0xbd, 0x39, 0xdb, 0x75, 0xca, 0x93, 0x9f \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SM_FRU_PROTOCOL);
+
+//
+// Common FRU Types
+//
+#define EFI_CPU_TYPE_FRU_GUID \
+ { \
+ 0xf064c91f, 0x188c, 0x4f56, 0xb7, 0xfd, 0x30, 0xa9, 0xb8, 0x6a, 0x29, 0xf3 \
+ }
+
+#define EFI_MEMORY_TYPE_FRU_GUID \
+ { \
+ 0xd50234f4, 0x6f4b, 0x43e8, 0xa0, 0x13, 0x3c, 0x1e, 0x33, 0xd9, 0xb9, 0xb1 \
+ }
+
+#define EFI_SYSTEM_TYPE_FRU_GUID \
+ { \
+ 0xaab16018, 0x679d, 0x4461, 0xba, 0x20, 0xe7, 0xc, 0xf7, 0x86, 0x6a, 0x9b \
+ }
+
+//
+// Common FRU Formats.
+//
+#define EFI_IPMI_FORMAT_FRU_GUID \
+ { \
+ 0x3531fdc6, 0xeae, 0x4cd2, 0xb0, 0xa6, 0x5f, 0x48, 0xa0, 0xdf, 0xe3, 0x8 \
+ }
+
+#define EFI_DMI_FORMAT_FRU_GUID \
+ { \
+ 0x67ef7a73, 0x2594, 0x4a5e, 0x93, 0xa, 0xe1, 0x66, 0xfa, 0xbc, 0xd2, 0xc8 \
+ }
+
+#define EFI_INTEL_MFG_FORMAT_FRU_GUID \
+ { \
+ 0x79e8c9c7, 0x1152, 0x4f00, 0xb8, 0x31, 0x14, 0xf1, 0xc4, 0x4, 0x1a, 0xe0 \
+ }
+
+//
+// Generic FRU Function Prototypes
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_FRU_INFO) (
+ IN EFI_SM_FRU_PROTOCOL * This,
+ IN EFI_GUID * FruTypeGuid,
+ IN UINTN FruInstance,
+ OUT EFI_GUID * FruFormatGuid,
+ OUT UINTN *DataAccessGranularity,
+ OUT CHAR16 **FruInformationString
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_FRU_DATA) (
+ IN EFI_SM_FRU_PROTOCOL * This,
+ IN EFI_GUID * FruTypeGuid,
+ IN UINTN FruInstance,
+ IN UINTN FruDataOffset,
+ IN UINTN FruDataSize,
+ IN UINT8 *FruData
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_FRU_DATA) (
+ IN EFI_SM_FRU_PROTOCOL * This,
+ IN EFI_GUID * FruTypeGuid,
+ IN UINTN FruInstance,
+ IN UINTN FruDataOffset,
+ IN UINTN FruDataSize,
+ IN UINT8 *FruData
+ );
+
+//
+// GENERIC FRU PROTOCOL
+//
+typedef struct _EFI_SM_FRU_PROTOCOL {
+ EFI_GET_FRU_INFO GetFruInfo;
+ EFI_GET_FRU_DATA GetFruData;
+ EFI_SET_FRU_DATA SetFruData;
+} EFI_SM_FRU_PROTOCOL;
+
+extern EFI_GUID gEfiGenericFruProtocolGuid;
+
+#endif
diff --git a/Protocol/Ip/Ip.c b/Protocol/Ip/Ip.c
new file mode 100644
index 0000000..5792300
--- /dev/null
+++ b/Protocol/Ip/Ip.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 2002 Intel Corporation. All rights reserved.
+
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+ Ip.c
+
+Abstract:
+ Internet Protocol GUID Declaration
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Ip)
+
+EFI_GUID gEfiIpProtocolGuid = EFI_IP_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiIpProtocolGuid, "IP Protocol", "EFI 1.1 IP Protocol");
+
+/* EOF - Ip.c */
diff --git a/Protocol/Ip/Ip.h b/Protocol/Ip/Ip.h
new file mode 100644
index 0000000..9e63547
--- /dev/null
+++ b/Protocol/Ip/Ip.h
@@ -0,0 +1,438 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+#ifndef _EFI_IP_H_
+// GC_TODO: move protective #ifndef after comment header
+#define _EFI_IP_H_
+
+/*++
+
+Copyright (c) 2002 Intel Corporation. All rights reserved.
+
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+ Ip.h
+
+Abstract:
+ EFI Internet Protocol Definition
+
+--*/
+#include "Tiano.h"
+#include "TianoTypes.h"
+
+EFI_FORWARD_DECLARATION (EFI_IP_PROTOCOL);
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+#define EFI_IP_PROTOCOL_GUID \
+ { \
+ 0x89DEEF37, 0x31D8, 0x469C, 0x95, 0xB6, 0x01, 0x69, 0xBC, 0x86, 0x6C, 0xFB \
+ }
+
+extern EFI_GUID gEfiIpProtocolGuid;
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// Useful macros for byte ordering.
+//
+//
+// EFI_IP_HTONS(x) - converts the value (x) from host byte order to network
+// byte order
+//
+#define EFI_IP_HTONS(x) ((UINT16) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)))
+
+//
+// EFI_IP_HTONL(x)
+//
+#define EFI_IP_HTONL(x) \
+ ((UINT32) ((((x) & 0xFF000000) >> 24) | (((x) & 0xFF0000) >> 8) | (((x) & 0xFF00) << 8) | (((x) & 0xFF) << 24)))
+
+//
+// EFI_IP_NSTOH(x) - converts the value *(x) from network byte order to
+// host byte order
+//
+#define EFI_IP_NSTOH(x) (UINT16) ((((UINT16) *((UINT8 *) (x)) & 0xFF) << 8) | ((UINT16) *((UINT8 *) (x) + 1) & 0xFF))
+
+//
+// EFI_IP_NLTOH(x)
+//
+#define EFI_IP_NLTOH(x) \
+ (UINT32) \
+ ( \
+ (((UINT32) *((UINT8 *) (x)) & 0xFF) << 24) | (((UINT32) *((UINT8 *) (x) + 1) & 0xFF) << 16) | \
+ (((UINT32) *((UINT8 *) (x) + 2) & 0xFF) << 8) | ((UINT32) *((UINT8 *) (x) + 3) & 0xFF) \
+ )
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// Typical ethernet IPv4 packet layout:
+//
+//
+// +----- ----- ----- ----- ----- ----- ----- ----- -----+
+// | Media header Destination MAC (6 bytes) |
+// | Source MAC (6 bytes) |
+// | Protocol (2 bytes) [IP, ARP, etc] |
+// +----- ----- ----- ----- ----- ----- ----- ----- -----+
+// | IPv4 header HeaderLen (4 bits) |
+// | Version (4 bits) [IPv4, IPv6] |
+// | TypeOfService (1 byte) |
+// | TotalLen (2 bytes) |
+// | Identification (2 bytes) |
+// | FragmentOffset (2 bytes) |
+// | TimeToLive (1 byte) |
+// | Protocol (1 byte) |
+// | HeaderChecksum (2 bytes) |
+// | SourceIp (4 bytes) |
+// | DestinationIp (4 bytes) |
+// +----- ----- ----- ----- ----- ----- ----- ----- -----+
+// | IPv4 data |
+// +----- ----- ----- ----- ----- ----- ----- ----- -----+
+//
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// Media header protocol values.
+//
+#define EFI_IP_MEDIA_HEADER_PROTOCOL_IP 0x0800
+#define EFI_IP_MEDIA_HEADER_PROTOCOL_ARP 0x0806
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// Detailed information on IPv4 packet contents can be found in RFC 791.
+// www.ietf.org
+//
+//
+// IPv4 packet header format (no options).
+//
+#pragma pack(1)
+typedef struct {
+ UINT8 HeaderLen : 4;
+ UINT8 Version : 4;
+ UINT8 TypeOfService;
+ UINT16 TotalLen;
+ UINT16 Identification;
+ UINT16 FragmentOffset;
+ UINT8 TimeToLive;
+ UINT8 Protocol;
+ UINT16 HeaderChecksum;
+ UINT8 SourceIp[4];
+ UINT8 DestinationIp[4];
+} EFI_IP_IP4_HEADER;
+#pragma pack()
+//
+// Some useful IPv4 constants.
+//
+#define EFI_IP_IP4_HEADER_VERSION 0x04
+
+#define EFI_IP_IP4_HEADER_PROTOCOL_ICMP 1
+#define EFI_IP_IP4_HEADER_PROTOCOL_IGMP 2
+#define EFI_IP_IP4_HEADER_PROTOCOL_TCP 6
+#define EFI_IP_IP4_HEADER_PROTOCOL_UDP 17
+
+#define EFI_IP_IP4_HEADER_DONT_FRAGMENT 0x4000
+#define EFI_IP_IP4_HEADER_MORE_FRAGMENTS 0x2000
+#define EFI_IP_IP4_HEADER_FRAGMENT_MASK 0x1FFF
+#define EFI_IP_IP4_HEADER_FRAGMENT_SHIFT 3
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// Useful Internet Protocol constants.
+//
+#define EFI_IP_MAX_ROUTE_TABLE_SIZE 8 // # route entries
+#define EFI_IP_MAX_ARP_CACHE_SIZE 8 // # packets
+#define EFI_IP_ARP_CACHE_TIMEOUT 60000 // milliseconds
+#define EFI_IP_ARP_RETRY_COUNT 4 // # requests
+#define EFI_IP_ARP_RETRY_TIMEOUT 250 // milliseconds
+#define EFI_IP_MAX_RX_QUEUE_SIZE 16 // # assembled packets
+#define EFI_IP_RX_QUEUE_TIMEOUT 5000 // milliseconds
+#define EFI_IP_MAX_TX_QUEUE_SIZE 32 // # fragments
+#define EFI_IP_TX_QUEUE_TIMEOUT 100 // milliseconds
+#define EFI_IP_MAX_BUFFER_SIZE 64 // K bytes
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+// IPv4 protocol definition.
+//
+//
+// IP handle. Returned by Ip->Open() and used when receiving or
+// transmitting IP packets.
+//
+typedef VOID *EFI_IP_HANDLE;
+
+//
+// IP handle receive function prototype.
+//
+typedef
+VOID
+(EFIAPI *EFI_IP_RECEIVE) (
+ IN VOID *Context,
+ IN EFI_IP_ADDRESS * DestinationIp,
+ IN EFI_IP_ADDRESS * SourceIp,
+ IN UINT8 Protocol,
+ IN UINTN BufferLen,
+ IN VOID *Buffer
+ );
+
+/*++
+ * Description:
+ * A handle's receive function is called when a valid IP packet is
+ * received that matches the handle's receive filter(s). When the
+ * receive function returns control to the IP protocol driver, the
+ * data in the Buffer can no longer be used. If the data in the
+ * Buffer needs to be preserved, it must be copied out before
+ * returning control to the IP protocol driver.
+ *
+ * Parameters:
+ * Context - Pointer to context data.
+ * DestinationIp - Pointer to the destination IP address.
+ * SourceIp - Pointer to the source IP address.
+ * Protocol - The encapsulated protocol number.
+ * BufferLen - The number of data bytes in the receive buffer.
+ * May be zero.
+ * Buffer - Pointer to the receive buffer. May be NULL.
+ *
+ * Returns:
+ * n/a
+--*/
+
+//
+// IP configuration and tuning parameters.
+//
+typedef struct {
+ UINTN MaxRouteTableSize;
+ UINTN MaxArpCacheSize;
+ UINTN ArpCacheTimeout;
+ UINTN ArpRetryCount;
+ UINTN ArpRetryTimeout;
+ UINTN MaxRxQueueSize;
+ UINTN RxQueueTimeout;
+ UINTN MaxTxQueueSize;
+ UINTN TxQueueTimeout;
+} EFI_IP_CONFIG_DATA;
+
+//
+// IP configuration function prototype.
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP_CONFIG) (
+ IN EFI_IP_PROTOCOL * This,
+ IN BOOLEAN Reset,
+ IN EFI_IP_CONFIG_DATA * NewData OPTIONAL,
+ OUT EFI_IP_CONFIG_DATA * OldData OPTIONAL
+ );
+
+/*++
+ * Description:
+ * This function is used to Set and/or Get the IP configuration and tuning
+ * parameters. The tuning parameters can only be changed when there are
+ * no open IP handles.
+ *
+ * Parameters:
+ * This - Pointer to the IP protocol driver instance data.
+ * Reset - Set to TRUE to reset the IP protocol driver configuration
+ * data back to default values.
+ * NewData - New IP protocol driver configuration data. May be NULL.
+ * OldData - Previous IP protocol driver configuration data. May be NULL.
+ *
+ * Returns:
+ * EFI_SUCCESS - Configuration data updated/retrieved as requested.
+ * EFI_INVALID_PARAMETER - One or more of the parameters or configuration
+ * data values was invalid.
+ * EFI_ALREADY_STARTED - One or more IP handles is open.
+--*/
+
+//
+// IP handle open data.
+//
+typedef struct {
+ VOID *Context;
+ EFI_IP_ADDRESS StationIp;
+ EFI_IP_ADDRESS SubnetMask;
+ EFI_IP_ADDRESS GatewayIp;
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ UINT8 Protocol;
+ BOOLEAN DoNotFragment;
+ BOOLEAN RawData;
+ BOOLEAN Promiscuous;
+ BOOLEAN Broadcast;
+ BOOLEAN AnyProtocol;
+ EFI_IP_RECEIVE Receive;
+ UINTN MulticastIpCount;
+ EFI_IP_ADDRESS *MulticastIpList;
+} EFI_IP_OPEN_DATA;
+
+/*++
+ * Context - Pointer to context data returned in Receive().
+ * StationIp - Unicast IP address. Used as the source IP address
+ * in transmitted packets. Used as the destination IP
+ * address in received IP packets. Can be set to
+ * 0.0.0.0.
+ * SubnetMask - Subnet mask. Used to check if the destination IP
+ * is on the same subnet as the StationIp.
+ * Can be set to 0.0.0.0.
+ * GatewayIp - Default gateway IP address. Used if the destination
+ * IP is not on the same subnet as the StationIp.
+ * Can be set to 0.0.0.0 if there is no default gateway.
+ * TypeOfService - Packet service priority.
+ * TimeToLive - Number of gateway hops before packet 'dies'.
+ * Protocol - Protocol number to be used in the IP header of
+ * transmitted packets. Protocol receive filter
+ * to be used if AnyProtocol is FALSE.
+ * DoNotFragment - Set to TRUE if transmitted IP packets must not
+ * be fragmented.
+ * Promiscuous - Set to TRUE to receive all valid IP packets.
+ * Broadcast - Set to TRUE to also receive broadcast IP packets.
+ * AnyProtocol - Set to TRUE to receive any protocol number.
+ * Set to FALSE to receive only matching Protocol
+ * numbers.
+ * Receive - Pointer to this handle's IP receive function.
+ * Can not be set to NULL.
+ * MulticastIpCount - Number of multicast IP addresses in the
+ * MulticastIpList array. May be zero.
+ * MulticastIpList - Array of multicast IP addresses. IP packets sent
+ * to these addresses will be accepted by the IP
+ * protocol driver if the protocol numbers match.
+ * Not used if MulticastIpCount is zero.
+--*/
+
+//
+// Open new IP handle.
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP_OPEN) (
+ IN EFI_IP_PROTOCOL * This,
+ IN EFI_IP_OPEN_DATA * Data,
+ OUT EFI_IP_HANDLE * NewHandle
+ );
+
+/*++
+ * Description:
+ *
+ * Parameters:
+ * This - Pointer to IP protocol instance data.
+ * Data - Pointer to handle configuration data.
+ * NewHandle - Pointer to new IP handle storage.
+ *
+ * Returns:
+ * EFI_SUCCESS - New IP handle was opened.
+ * EFI_INVALID_PARAMETER - One or more of the parameters is invalid.
+ * EFI_OUT_OF_RESOURCES - New buffer(s) could not be allocated.
+--*/
+
+//
+// Close existing IP handle.
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP_CLOSE) (
+ IN EFI_IP_HANDLE Handle,
+ IN BOOLEAN Flush
+ );
+
+/*++
+ * Description:
+ * Close a previously opened IP handle.
+ *
+ * Parameters:
+ * Handle - IP handle returned by Ip->Open().
+ * Flush - Set to TRUE to flush all pending transmit packets before
+ * returning control. Pending transmit data may be lost if
+ * Flush is set to FALSE.
+ *
+ * Returns:
+ * EFI_SUCCESS - IP handle has been closed.
+ * EFI_INVALID_PARAMETER - One or more of the parameters is invalid.
+--*/
+
+//
+// Transmit one or more IP packets.
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_IP_TRANSMIT) (
+ IN EFI_IP_HANDLE Handle,
+ IN EFI_IP_ADDRESS * DestinationIp OPTIONAL,
+ IN UINTN BufferLen,
+ IN UINT8 *Buffer,
+ IN BOOLEAN Flush
+ );
+
+//
+//
+//
+typedef
+UINT16
+(EFIAPI *EFI_IP_CHECKSUM) (
+ IN UINTN BufferLen,
+ IN VOID *Buffer
+ );
+
+/*++
+ * Description:
+ * Compute IP checksum of buffer.
+ *
+ * Parameters:
+ * BufferLen - Number of bytes to checksum. May be zero.
+ * Buffer - Pointer to buffer to checksum. Not used if BufferLen
+ * is zero.
+ *
+ * Returns:
+ * IP checksum of buffer. Zero is returned if BufferLen is zero or
+ * Buffer is NULL.
+--*/
+
+//
+//
+//
+typedef
+UINT16
+(EFIAPI *EFI_IP_IDENTIFICATION) (
+ VOID
+ );
+
+/*++
+ * Description:
+ * Returns an IP header identification number.
+ *
+ * Parameters:
+ * n/a
+ *
+ * Returns:
+ * An IP header identification number.
+--*/
+
+//
+// Internet Protocol interface definition.
+//
+typedef struct _EFI_IP_PROTOCOL {
+ EFI_IP_CONFIG Config;
+ EFI_IP_OPEN Open;
+ EFI_IP_CLOSE Close;
+ EFI_IP_TRANSMIT Transmit;
+ EFI_IP_CHECKSUM Checksum;
+ EFI_IP_IDENTIFICATION Identification;
+ EFI_EVENT Event;
+} EFI_IP_PROTOCOL;
+
+#endif /* _EFI_IP_H */
+
+/* EOF - Ip.h */
diff --git a/Protocol/MpService/MpService.c b/Protocol/MpService/MpService.c
new file mode 100644
index 0000000..08cc8f0
--- /dev/null
+++ b/Protocol/MpService/MpService.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ MpService.c
+
+Abstract:
+
+ This is a protocol produced by the MP DXE driver.
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (MpService)
+
+EFI_GUID gEfiMpServiceProtocolGuid = EFI_MP_SERVICES_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiMpServiceProtocolGuid, "MP SERVICE", "MP Service Protocol");
diff --git a/Protocol/MpService/MpService.h b/Protocol/MpService/MpService.h
new file mode 100644
index 0000000..7a898c5
--- /dev/null
+++ b/Protocol/MpService/MpService.h
@@ -0,0 +1,200 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ MpService.h
+
+Abstract:
+
+ This protocol produces MP Protocol
+
+--*/
+
+#ifndef _MP_H_
+#define _MP_H_
+
+#include "LinkedList.h"
+#include EFI_PROTOCOL_CONSUMER (CpuIo)
+
+#define EFI_MP_SERVICES_PROTOCOL_GUID \
+ { \
+ 0xf33261e7, 0x23cb, 0x11d5, 0xbd, 0x5c, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_MP_SERVICES_PROTOCOL);
+
+#define DELIVERY_MODE_FIXED 0x0
+#define DELIVERY_MODE_LOWEST_PRIORITY 0x1
+#define DELIVERY_MODE_SMI 0x2
+#define DELIVERY_MODE_REMOTE_READ 0x3
+#define DELIVERY_MODE_NMI 0x4
+#define DELIVERY_MODE_INIT 0x5
+#define DELIVERY_MODE_SIPI 0x6
+#define DELIVERY_MODE_MAX 0x7
+
+#define TRIGGER_MODE_EDGE 0x0
+#define TRIGGER_MODE_LEVEL 0x1
+
+typedef
+VOID
+(EFIAPI *EFI_AP_PROCEDURE) (
+ IN VOID *Buffer
+ );
+
+typedef union {
+ struct {
+ UINT32 Status : 2;
+ UINT32 Tested : 1;
+ UINT32 Reserved1 : 13;
+ UINT32 VirtualMemoryUnavailable : 1;
+ UINT32 Ia32ExecutionUnavailable : 1;
+ UINT32 FloatingPointUnavailable : 1;
+ UINT32 MiscFeaturesUnavailable : 1;
+ UINT32 Reserved2 : 12;
+ } Bits;
+ UINT32 Uint32;
+} EFI_MP_HEALTH_FLAGS;
+
+#define EFI_MP_HEALTH_FLAGS_STATUS_HEALTHY 0x0
+#define EFI_MP_HEALTH_FLAGS_STATUS_PERFORMANCE_RESTRICTED 0x1
+#define EFI_MP_HEALTH_FLAGS_STATUS_FUNCTIONALLY_RESTRICTED 0x2
+
+typedef struct {
+ EFI_MP_HEALTH_FLAGS Flags;
+ UINT32 TestStatus;
+} EFI_MP_HEALTH;
+
+typedef enum {
+ EfiCpuAP = 0,
+ EfiCpuBSP,
+ EfiCpuDesignationMaximum
+} EFI_CPU_DESIGNATION;
+
+typedef struct {
+ UINT32 ApicID;
+ BOOLEAN Enabled;
+ EFI_CPU_DESIGNATION Designation;
+ EFI_MP_HEALTH Health;
+ UINTN PackageNumber;
+ UINTN NumberOfCores;
+ UINTN NumberOfThreads;
+ UINT64 ProcessorPALCompatibilityFlags;
+ UINT64 ProcessorTestMask;
+} EFI_MP_PROC_CONTEXT;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_GET_GENERAL_MP_INFO) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ OUT UINTN *NumberOfCPUs,
+ OUT UINTN *MaximumNumberOfCPUs,
+ OUT UINTN *NumberOfEnabledCPUs,
+ OUT UINTN *RendezvousIntNumber,
+ OUT UINTN *RendezvousProcLength
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_GET_PROCESSOR_CONTEXT) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN UINTN ProcessorNumber,
+ IN OUT UINTN *BufferLength,
+ IN OUT EFI_MP_PROC_CONTEXT * ProcessorContextBuffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_STARTUP_ALL_APS) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN EFI_AP_PROCEDURE Procedure,
+ IN BOOLEAN SingleThread,
+ IN EFI_EVENT WaitEvent OPTIONAL,
+ IN UINTN TimeoutInMicroSecs OPTIONAL,
+ IN OUT VOID *ProcArguments OPTIONAL,
+ OUT UINTN *FailedCPUList OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_STARTUP_THIS_AP) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN EFI_AP_PROCEDURE Procedure,
+ IN UINTN ProcessorNumber,
+ IN EFI_EVENT WaitEvent OPTIONAL,
+ IN UINTN TimeoutInMicroSecs OPTIONAL,
+ IN OUT VOID *ProcArguments OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_SWITCH_BSP) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN UINTN ProcessorNumber,
+ IN BOOLEAN EnableOldBSP
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_SEND_IPI) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN UINTN ProcessorNumber,
+//
+// MPG Override Start: Replace
+//
+/*
+ IN UINTN VectorNumber,
+ IN UINTN DeliveryMode
+*/
+ IN UINT32 VectorNumber,
+ IN UINT32 DeliveryMode
+//
+// MPG Override End
+//
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_ENABLEDISABLEAP) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ IN UINTN ProcessorNumber,
+ IN BOOLEAN NewAPState,
+ IN EFI_MP_HEALTH * HealthState
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MP_SERVICES_WHOAMI) (
+ IN EFI_MP_SERVICES_PROTOCOL * This,
+ OUT UINTN *ProcessorNumber
+ );
+
+typedef struct _EFI_MP_SERVICES_PROTOCOL {
+ EFI_MP_SERVICES_GET_GENERAL_MP_INFO GetGeneralMPInfo;
+ EFI_MP_SERVICES_GET_PROCESSOR_CONTEXT GetProcessorContext;
+ EFI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs;
+ EFI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP;
+ EFI_MP_SERVICES_SWITCH_BSP SwitchBSP;
+ EFI_MP_SERVICES_SEND_IPI SendIPI;
+ EFI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP;
+ EFI_MP_SERVICES_WHOAMI WhoAmI;
+} EFI_MP_SERVICES_PROTOCOL;
+
+extern EFI_GUID gEfiMpServiceProtocolGuid;
+
+#endif
diff --git a/Protocol/PcmciaRequest/PcmciaRequest.c b/Protocol/PcmciaRequest/PcmciaRequest.c
new file mode 100644
index 0000000..167a574
--- /dev/null
+++ b/Protocol/PcmciaRequest/PcmciaRequest.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ PcmciaRequest.c
+
+Abstract:
+
+ EFI PCMCIA Request Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (PcmciaRequest)
+
+EFI_GUID gEfiPcmciaRequestProtocolGuid = EFI_PCMCIA_REQUEST_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPcmciaRequestProtocolGuid, "PCMCIA Request Protocol", "EFI 1.1 PCMCIA Request Protocol");
diff --git a/Protocol/PcmciaRequest/PcmciaRequest.h b/Protocol/PcmciaRequest/PcmciaRequest.h
new file mode 100644
index 0000000..fbead3e
--- /dev/null
+++ b/Protocol/PcmciaRequest/PcmciaRequest.h
@@ -0,0 +1,72 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ PcmciaRequest.h
+
+Abstract:
+
+ EFI PCMCIA Request Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_PCMCIA_REQUEST_H
+#define _EFI_PCMCIA_REQUEST_H
+
+//
+// Global GUID for PCMCIA Request Protocol
+//
+#define EFI_PCMCIA_REQUEST_PROTOCOL_GUID \
+ { \
+ 0xf238f47c, 0x1de9, 0x4e8b, 0x81, 0xb9, 0xcc, 0x92, 0x4e, 0x6b, 0x5b, 0xe5 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PCMCIA_REQUEST_PROTOCOL);
+
+//
+// Prototypes for PCMCIA Request Protocol
+//
+typedef enum {
+ EfiPCMCIARequestStart,
+ EfiPCMCIARequestStop,
+ EfiPCMCIARequestStatusChange
+} EFI_PCMCIA_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCMCIA_REQUEST_NOTIFY) (
+ IN EFI_PCMCIA_REQUEST_PROTOCOL * This,
+ IN EFI_PCMCIA_OPERATION Operation,
+ IN EFI_HANDLE SocketHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL,
+ IN OUT UINT8 *NumberOfChildren,
+ IN OUT EFI_HANDLE * ChildHandleBuffer
+ );
+
+typedef struct _EFI_PCMCIA_REQUEST_PROTOCOL {
+
+ EFI_PCMCIA_REQUEST_NOTIFY Notify;
+
+} EFI_PCMCIA_REQUEST_PROTOCOL;
+
+extern EFI_GUID gEfiPcmciaRequestProtocolGuid;
+
+#endif
diff --git a/Protocol/ProtocolLib.cif b/Protocol/ProtocolLib.cif
new file mode 100644
index 0000000..41798d1
--- /dev/null
+++ b/Protocol/ProtocolLib.cif
@@ -0,0 +1,49 @@
+<component>
+ name = "ProtocolLib"
+ category = ModulePart
+ LocalRoot = "Protocol\"
+ RefName = "ProtocolLib"
+[files]
+"ProtocolLib.sdl"
+"ProtocolLib.mak"
+"Authorization\Authorization.c"
+"Authorization\Authorization.h"
+"CardService\CardService.c"
+"CardService\CardService.h"
+"EnhancedSpeedstep\EnhancedSpeedstep.c"
+"EnhancedSpeedstep\EnhancedSpeedstep.h"
+"FaultTolerantWrite\FaultTolerantWrite.c"
+"FaultTolerantWrite\FaultTolerantWrite.h"
+"GenericFru\GenericFru.c"
+"GenericFru\GenericFru.h"
+"GPIO\Gpio.c"
+"GPIO\Gpio.h"
+"Ip\Ip.c"
+"Ip\Ip.h"
+"MpService\MpService.c"
+"MpService\MpService.h"
+"PcmciaRequest\PcmciaRequest.c"
+"PcmciaRequest\PcmciaRequest.h"
+"SimpleAudioOut\SimpleAudioOut.c"
+"SimpleAudioOut\SimpleAudioOut.h"
+"Sio\Sio.c"
+"Sio\Sio.h"
+"SmmRtProtocol\SmmRtProtocol.c"
+"SmmRtProtocol\SmmRtProtocol.h"
+"Smtp\Smtp.c"
+"Smtp\Smtp.h"
+"SocketService\SocketService.c"
+"SocketService\SocketService.h"
+"Speaker\Speaker.c"
+"Speaker\Speaker.h"
+"TcpSock\TcpSock.c"
+"TcpSock\TcpSock.h"
+"SwapAddressRange\SwapAddressRange.c"
+"SwapAddressRange\SwapAddressRange.h"
+"TelnetServer\TelnetServer.c"
+"TelnetServer\TelnetServer.h"
+"Udp\Udp.c"
+"Udp\Udp.h"
+"VgaMiniPort\VgaMiniPort.c"
+"VgaMiniPort\VgaMiniPort.h"
+<endComponent>
diff --git a/Protocol/ProtocolLib.mak b/Protocol/ProtocolLib.mak
new file mode 100644
index 0000000..4d45d8e
--- /dev/null
+++ b/Protocol/ProtocolLib.mak
@@ -0,0 +1,81 @@
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2006, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 6145-F Northbelt Pkwy, Norcross, GA 30071 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#**********************************************************************
+
+#**********************************************************************
+# $Header: /Alaska/SOURCE/Modules/MPG/Calpella/MiscFramework/ProtocolLib/ProtocolLib.mak 1 10/15/08 2:19p Fasihm $
+#
+# $Revision: 1 $
+#
+# $Date: 10/15/08 2:19p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/SOURCE/Modules/MPG/Calpella/MiscFramework/ProtocolLib/ProtocolLib.mak $
+#
+# 1 10/15/08 2:19p Fasihm
+# Initial check-in for the Calpella Crb MiscFramework module used.
+#
+# 1 8/26/08 2:08p Fasihm
+# This is the first CRB drop used for the PowerOn of the Calpella CRB
+# platform (RedFort)
+# With this project one needs to add the correct CPU Microcodes.
+#
+# 1 9/12/06 9:11a Fasihm
+# FirstCheckin for the Project ProtocolLib in MiscFramework folder.
+#
+# 1 9/12/06 9:05a Fasihm
+# ProtocolLib files needed in MiscFramework.
+#
+# 1 6/05/06 6:31p Fasihm
+# Initial check-in for the MiscFramework module placed in the Edk part on
+# SSF.
+#
+# 1 5/12/06 3:12p Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: <ComponentName>.mak
+#
+# Description:
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : ProtocolLib
+
+$(BUILD_DIR)\ProtocolLib.lib : ProtocolLib
+
+ProtocolLib : $(BUILD_DIR)\ProtocolLib.mak ProtocolLibBin
+
+$(BUILD_DIR)\ProtocolLib.mak : $(ProtocolLib_DIR)\$(@B).cif $(ProtocolLib_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(ProtocolLib_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+ProtocolLibBin :
+ $(MAKE) /$(MAKEFLAGS) $(EDK_DEFAULTS)\
+ /f $(BUILD_DIR)\ProtocolLib.mak all\
+ "MY_INCLUDES=$(EDK_INCLUDES) $(MISCFRAMEWORK_INCLUDES) /I$(PROJECT_DIR)" \
+ TYPE=LIBRARY \
+#**********************************************************************
+#**********************************************************************
+#** **
+#** (C)Copyright 1985-2006, American Megatrends, Inc. **
+#** **
+#** All Rights Reserved. **
+#** **
+#** 6145-F Northbelt Pkwy, Norcross, GA 30071 **
+#** **
+#** Phone: (770)-246-8600 **
+#** **
+#**********************************************************************
+#********************************************************************** \ No newline at end of file
diff --git a/Protocol/ProtocolLib.sdl b/Protocol/ProtocolLib.sdl
new file mode 100644
index 0000000..585fcaf
--- /dev/null
+++ b/Protocol/ProtocolLib.sdl
@@ -0,0 +1,29 @@
+TOKEN
+ Name = "ProtocolLib_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable ProtocolLib support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+End
+
+PATH
+ Name = "ProtocolLib_DIR"
+End
+
+MODULE
+ Help = "Includes ProtocolLib.mak to Project"
+ File = "ProtocolLib.mak"
+End
+
+ELINK
+ Name = "ProtocolLib_LIB"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\ProtocolLib.lib"
+ Parent = "ProtocolLib_LIB"
+ InvokeOrder = AfterParent
+End \ No newline at end of file
diff --git a/Protocol/SimpleAudioOut/SimpleAudioOut.c b/Protocol/SimpleAudioOut/SimpleAudioOut.c
new file mode 100644
index 0000000..87057af
--- /dev/null
+++ b/Protocol/SimpleAudioOut/SimpleAudioOut.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SimpleAudioOut.c
+
+Abstract:
+
+ EFI Simple Audio Out Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (SimpleAudioOut)
+
+EFI_GUID gEfiSimpleAudioOutProtocolGuid = EFI_SIMPLE_AUDIO_OUT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleAudioOutProtocolGuid, "Simple Audio Out Protocol", "EFI 1.1 Simple Audio Out Protocol");
diff --git a/Protocol/SimpleAudioOut/SimpleAudioOut.h b/Protocol/SimpleAudioOut/SimpleAudioOut.h
new file mode 100644
index 0000000..9284480
--- /dev/null
+++ b/Protocol/SimpleAudioOut/SimpleAudioOut.h
@@ -0,0 +1,149 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SimpleAudioOut.h
+
+Abstract:
+
+ EFI Simple Audio Out Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_SIMPLE_AUDIO_OUT_H_
+#define _EFI_SIMPLE_AUDIO_OUT_H_
+
+//
+// GUID for Simple Audio Out Protocol
+//
+#define EFI_SIMPLE_AUDIO_OUT_PROTOCOL_GUID \
+ { \
+ 0xc723f288, 0x52f9, 0x4d80, 0xb6, 0x33, 0xe1, 0x52, 0xf9, 0x30, 0xa0, 0xdc \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_AUDIO_OUT_PROTOCOL);
+
+typedef enum {
+ EfiAudioOutStart,
+ EfiAudioOutPause,
+ EfiAudioOutContinue,
+ EfiAudioOutStop
+} EFI_SIMPLE_AUDIO_OUT_OPERATION;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_AUDIO_OUT_STREAM_OPERATION) (
+ IN EFI_SIMPLE_AUDIO_OUT_PROTOCOL * This,
+ IN EFI_SIMPLE_AUDIO_OUT_OPERATION Operation,
+ IN UINT8 *Buffer OPTIONAL,
+ IN UINT32 BufferSize OPTIONAL
+ );
+
+#define EFI_SIMPLE_AUDIO_OUT_STATE_BUFFER_DRAIN 0x00000001
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_AUDIO_OUT_QUERY_STATE) (
+ IN EFI_SIMPLE_AUDIO_OUT_PROTOCOL * This,
+ OUT UINT32 *State
+ );
+
+//
+// Ac97 Audio channel definition
+//
+typedef enum _AC97_AUDIO_CHANNEL_NUMBER
+{
+ Ac97Channels2 = 0,
+ Ac97Channels4 = 1,
+ Ac97Channels6 = 2,
+} AC97_AUDIO_CHANNEL_NUMBER;
+
+//
+// Ac97 Audio mode definition
+//
+typedef enum _AC97_AUDIO_PCM_MODE
+{
+ Ac97Audio16Bit = 0,
+ Ac97Audio20Bit = 1,
+} AC97_AUDIO_PCM_MODE;
+
+//
+// Ac97 Audio volume definition
+//
+#pragma pack(1)
+
+typedef struct {
+ UINT16 RigthChannelVol : 6;
+ UINT16 Reserved1 : 2;
+ UINT16 LeftChannelVol : 6;
+ UINT16 Reserved2 : 1;
+ UINT16 Mute : 1;
+} AC97_AUDIO_GENERAL_VOLUME;
+
+typedef struct {
+ UINT16 Treble : 4;
+ UINT16 Reserved1 : 4;
+ UINT16 Bass : 4;
+ UINT16 Reserved2 : 4;
+} AC97_AUDIO_GENERAL_TONE;
+
+#pragma pack()
+//
+// Ac97 Audio driver attribute definition
+//
+typedef enum {
+ EfiAudioOutChannelNumber,
+ EfiAudioOutSampleRate,
+ EfiAudioOutPcmMode,
+ EfiAudioOutMasterVolume,
+ EfiAudioOutAuxVolume,
+ EfiAudioOutMonoVolume,
+ EfiAudioOutMasterTone,
+} EFI_SIMPLE_AUDIO_OUT_ATTRIBUTE_TARGET;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_AUDIO_OUT_GET_ATTRIBUTE) (
+ IN EFI_SIMPLE_AUDIO_OUT_PROTOCOL * This,
+ IN EFI_SIMPLE_AUDIO_OUT_ATTRIBUTE_TARGET Target,
+ OUT VOID *Buffer,
+ IN UINT32 BufferSize
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SIMPLE_AUDIO_OUT_SET_ATTRIBUTE) (
+ IN EFI_SIMPLE_AUDIO_OUT_PROTOCOL * This,
+ IN EFI_SIMPLE_AUDIO_OUT_ATTRIBUTE_TARGET Target,
+ IN VOID *Buffer,
+ IN UINT32 BufferSize
+ );
+
+typedef struct _EFI_SIMPLE_AUDIO_OUT_PROTOCOL {
+ EFI_SIMPLE_AUDIO_OUT_STREAM_OPERATION StreamOperation;
+ EFI_SIMPLE_AUDIO_OUT_QUERY_STATE QueryState;
+ EFI_SIMPLE_AUDIO_OUT_GET_ATTRIBUTE GetAttribute;
+ EFI_SIMPLE_AUDIO_OUT_SET_ATTRIBUTE SetAttribute;
+} EFI_SIMPLE_AUDIO_OUT_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleAudioOutProtocolGuid;
+
+#endif
diff --git a/Protocol/Sio/Sio.c b/Protocol/Sio/Sio.c
new file mode 100644
index 0000000..42dfb03
--- /dev/null
+++ b/Protocol/Sio/Sio.c
@@ -0,0 +1,33 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Sio.c
+
+Abstract:
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Sio)
+
+EFI_GUID gEfiSioProtocolGuid = SIO_IO_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSioProtocolGuid, "Sio Protocol", "EFI 1.1 SIO Protocol");
diff --git a/Protocol/Sio/Sio.h b/Protocol/Sio/Sio.h
new file mode 100644
index 0000000..24d65dc
--- /dev/null
+++ b/Protocol/Sio/Sio.h
@@ -0,0 +1,405 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Sio.h
+
+Abstract:
+
+--*/
+
+#ifndef _SIO_H_
+#define _SIO_H_
+
+#define SIO_IO_PROTOCOL_GUID \
+ { \
+ 0x964e5b21, 0x6000, 0x23d2, 0x9e, 0x39, 0x1, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ }
+#define VENDOR_INTEL \
+ { \
+ 0x8aa4fb2d, 0x9e81, 0x43d2, 0xb2, 0xad, 0x90, 0xc, 0x21, 0x79, 0x65, 0x20 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIO_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_DEVICE_POWER) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 LogicalDevice,
+ OUT UINT8 *Power
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_DEVICE_POWER) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 LogicalDevice,
+ OUT UINT8 Power
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ENABLEDISABLE_INTELLIGIENT_POWER_MGMT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 LogicalDevice,
+ OUT UINT8 Power
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_INTELLIGIENT_POWER_MGMT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 LogicalDevice,
+ OUT UINT8 *Power
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SETENABLEDISABLE_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT8 EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_ENABLEDISABLE_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ OUT UINT8 *EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_BASEIOADDRESS_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT16 BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_BASEIOADDRESS_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT16 *BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_INTERRUPT_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT8 InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_INTERRUPT_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT8 *InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_MODE_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT8 Mode
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_MODE_SERIAL) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 SerialNo,
+ IN UINT8 *Mode
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_SET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_GET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_SET_BASEIOADDRESS) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT16 BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_GET_BASEIOADDRESS) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT16 *BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_SET_INTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_GET_INTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_SET_DMA) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 DMAChannel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_GET_DMA) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *DMAChannel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_SET_MODE) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 Mode
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PARALLEL_GET_MODE) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *Mode
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_SET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_GET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_SET_BASEIOADDRESS) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT16 BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_GET_BASEIOADDRESS) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT16 *BaseAddress
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_SET_INTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_GET_INTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_SET_DMA) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 DMAChannel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_GET_DMA) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *DMAChannel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_SET_WRITEPROTECT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN BOOLEAN Enable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_FDC_GET_WRITEPROTECT) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT BOOLEAN *Enable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_SET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_GET_ENABLEDISABLE) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *EnableDisable
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_SET_KBINTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_GET_KBINTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_SET_MSINTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ IN UINT8 InterruptNo
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KBC_GET_MSINTERRUPT) (
+ IN EFI_SIO_PROTOCOL * This,
+ OUT UINT8 *InterruptNo
+ );
+
+EFI_STATUS
+InitializeSioDriver (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+
+Routine Description:
+
+ GC_TODO: Add function description
+
+Arguments:
+
+ ImageHandle - GC_TODO: add argument description
+ SystemTable - GC_TODO: add argument description
+
+Returns:
+
+ GC_TODO: add return values
+
+--*/
+;
+
+typedef struct _EFI_SIO_PROTOCOL {
+ //
+ // Global interface
+ //
+ EFI_GET_DEVICE_POWER GetDevicePower;
+ EFI_SET_DEVICE_POWER SetDevicePower;
+ EFI_ENABLEDISABLE_INTELLIGIENT_POWER_MGMT EnableDisableIntelliPwrMgmt;
+ EFI_GET_INTELLIGIENT_POWER_MGMT GetIntelliPwrMgmt;
+
+ //
+ // interface for serial I/O
+ //
+ EFI_SETENABLEDISABLE_SERIAL SerialSetEnableDisable;
+ EFI_GET_ENABLEDISABLE_SERIAL SerialGetEnableDisable;
+ EFI_SET_INTERRUPT_SERIAL SerialSetInterrupt;
+ EFI_GET_INTERRUPT_SERIAL SerialGetInterrupt;
+ EFI_SET_BASEIOADDRESS_SERIAL SerialSetBaseIOAddress;
+ EFI_GET_BASEIOADDRESS_SERIAL SerialGetBaseIOAddress;
+ EFI_SET_MODE_SERIAL SerialSetMode;
+ EFI_GET_MODE_SERIAL SerialGetMode;
+
+ //
+ // interface for Parallel Port
+ //
+ EFI_PARALLEL_SET_ENABLEDISABLE ParallelSetEnableDisable;
+ EFI_PARALLEL_GET_ENABLEDISABLE ParallelGetEnableDisable;
+ EFI_PARALLEL_SET_BASEIOADDRESS ParallelSetBaseIOAddress;
+ EFI_PARALLEL_GET_BASEIOADDRESS ParallelGetBaseIOAddress;
+ EFI_PARALLEL_SET_INTERRUPT ParallelSetInterrupt;
+ EFI_PARALLEL_GET_INTERRUPT ParallelGetInterrupt;
+ EFI_PARALLEL_SET_DMA ParallelSetDMA;
+ EFI_PARALLEL_GET_DMA ParallelGetDMA;
+ EFI_PARALLEL_SET_MODE ParallelSetMode;
+ EFI_PARALLEL_GET_MODE ParallelGetMode;
+
+ //
+ // interface for Floppy Disk Controller
+ //
+ EFI_FDC_SET_ENABLEDISABLE FdcSetEnableDisable;
+ EFI_FDC_GET_ENABLEDISABLE FdcGetEnableDisable;
+ EFI_FDC_SET_BASEIOADDRESS FdcSetBaseIOAddress;
+ EFI_FDC_GET_BASEIOADDRESS FdcGetBaseIOAddress;
+ EFI_FDC_SET_INTERRUPT FdcSetInterrupt;
+ EFI_FDC_GET_INTERRUPT FdcGetInterrupt;
+ EFI_FDC_SET_DMA FdcSetDMA;
+ EFI_FDC_GET_DMA FdcGetDMA;
+ EFI_FDC_SET_WRITEPROTECT FdcSetWriteProtect;
+ EFI_FDC_GET_WRITEPROTECT FdcGetWriteProtect;
+
+ //
+ // interface for Keyboard Controller
+ //
+ EFI_KBC_SET_ENABLEDISABLE KbcSetEnableDisable;
+ EFI_KBC_GET_ENABLEDISABLE KbcGetEnableDisable;
+ EFI_KBC_SET_KBINTERRUPT KbcSetKeyboardInterrupt;
+ EFI_KBC_GET_KBINTERRUPT KbcGetKeyboardInterrupt;
+ EFI_KBC_SET_MSINTERRUPT KbcSetMouseInterrupt;
+ EFI_KBC_GET_MSINTERRUPT KbcGetMouseInterrupt;
+
+} EFI_SIO_PROTOCOL;
+
+extern EFI_GUID gEfiSioProtocolGuid;
+
+#endif
diff --git a/Protocol/SmmRtProtocol/SmmRtProtocol.c b/Protocol/SmmRtProtocol/SmmRtProtocol.c
new file mode 100644
index 0000000..9c5a51d
--- /dev/null
+++ b/Protocol/SmmRtProtocol/SmmRtProtocol.c
@@ -0,0 +1,36 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SmmRtProtocol.c
+
+Abstract:
+
+ This file abstracts the common interfaces required to
+ communicate within SMM infrastructure for Runtime Calls
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (SmmRtProtocol)
+
+EFI_GUID gEfiSmmRuntimeProtocolGuid = EFI_SMM_RUNTIME_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSmmRuntimeProtocolGuid, "SMM Runtime Protocol", "SMM Runtime Protocol");
diff --git a/Protocol/SmmRtProtocol/SmmRtProtocol.h b/Protocol/SmmRtProtocol/SmmRtProtocol.h
new file mode 100644
index 0000000..9d6fb41
--- /dev/null
+++ b/Protocol/SmmRtProtocol/SmmRtProtocol.h
@@ -0,0 +1,161 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SmmRtProtocol.h
+
+Abstract:
+
+ This code abstracts SMM Runtime Protocol
+
+--*/
+
+#ifndef _SMM_RUNTIME_PROTO_H_
+#define _SMM_RUNTIME_PROTO_H_
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (SmmBase)
+
+#define EFI_SMM_RUNTIME_PROTOCOL_GUID \
+ { \
+ 0xa56897a1, 0xa77f, 0x4600, 0x84, 0xdb, 0x22, 0xb0, 0xa8, 0x1, 0xfa, 0x9a \
+ }
+
+typedef enum {
+ EfiSmmRtIdlePhase,
+ EfiSmmRtArgumentPhase,
+ EfiSmmDataFetchPhase,
+ EfiSmmCommandExecutePhase,
+ EfiSmmDataEmitPhase,
+ EfiSmmStatusPhase
+} EFI_SMM_RUNTIME_PHASE;
+
+typedef struct {
+ UINTN SimpleData[(2048 / 4)];
+} SMM_RUNTIME_UINTN_DATA;
+
+typedef struct {
+ UINTN SimpleData[2048];
+} SMM_RUNTIME_UINT8_DATA;
+
+typedef union {
+ SMM_RUNTIME_UINTN_DATA UintnData;
+ SMM_RUNTIME_UINT8_DATA Uint8Data;
+} SMM_RUNTIME_DATA;
+
+typedef struct {
+ EFI_SMM_RUNTIME_PHASE SmmRuntimePhase;
+ EFI_HANDLE SmmRuntimeCallHandle;
+ BOOLEAN ArgIsPointer;
+ UINT64 Argument;
+ SMM_RUNTIME_DATA Data;
+ UINTN TotalDataSize;
+ UINTN CurrentDataSize;
+} SMM_RUNTIME_COMMUNICATION_DATA;
+
+typedef struct {
+ EFI_GUID HeaderGuid;
+ UINTN MessageLength;
+ SMM_RUNTIME_COMMUNICATION_DATA PrivateData;
+} SMM_RUNTIME_COMMUNICATION_STRUCTURE;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ENABLE_PROTOCOL_NOTIFY_EVENT) (
+ IN EFI_EVENT_NOTIFY CallbackFunction,
+ IN VOID *Context,
+ IN EFI_GUID * ProtocolGuid,
+ OUT EFI_EVENT * Event
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DISABLE_PROTOCOL_NOTIFY_EVENT) (
+ IN EFI_EVENT Event
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMM_LOCATE_PROTOCOL_HANDLES) (
+ EFI_GUID * Protocol,
+ EFI_HANDLE **Handles,
+ UINTN *HandlesCount
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMM_HANDLE_PROTOCOL) (
+ IN EFI_HANDLE Handle,
+ IN EFI_GUID * Protocol,
+ OUT VOID **Interface
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_VENDOR_CONFIG_TABLE) (
+ IN EFI_GUID * Guid,
+ OUT VOID **Table
+ );
+
+typedef
+VOID
+(EFIAPI *EFI_SMM_RUNTIME_CALLBACK) (
+ IN VOID *Context,
+ IN EFI_SMM_SYSTEM_TABLE * Smst,
+ IN VOID *ChildRuntimeBuffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_SMM_RUNTIME_CHILD) (
+ IN EFI_SMM_RUNTIME_CALLBACK SmmRuntimeCallback,
+ IN VOID *Context,
+ OUT EFI_HANDLE * SmmRuntimeCallHandle
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UNREGISTER_SMM_RUNTIME_CHILD) (
+ IN EFI_SMM_RUNTIME_CALLBACK SmmRuntimeCallback
+ );
+
+//
+// SMM RUNTIME PROTOCOL
+//
+typedef struct {
+ EFI_LOCATE_PROTOCOL LocateProtocol;
+ EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
+ EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
+ EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
+ EFI_SIGNAL_EVENT SignalProtocol;
+ EFI_ENABLE_PROTOCOL_NOTIFY_EVENT EnableProtocolNotify;
+ EFI_DISABLE_PROTOCOL_NOTIFY_EVENT DisableProtocolNotify;
+ EFI_SMM_LOCATE_PROTOCOL_HANDLES LocateProtocolHandles;
+ EFI_SMM_HANDLE_PROTOCOL HandleProtocol;
+ EFI_INSTALL_CONFIGURATION_TABLE InstallVendorConfigTable;
+ EFI_GET_VENDOR_CONFIG_TABLE GetVendorConfigTable;
+ EFI_REGISTER_SMM_RUNTIME_CHILD RegisterSmmRuntimeChild;
+ EFI_UNREGISTER_SMM_RUNTIME_CHILD UnRegisterSmmRuntimeChild;
+ EFI_RUNTIME_SERVICES SmmRuntime;
+ SMM_RUNTIME_COMMUNICATION_STRUCTURE *ChildRuntimeBuffer;
+} EFI_SMM_RUNTIME_PROTOCOL;
+
+extern EFI_GUID gEfiSmmRuntimeProtocolGuid;
+
+#endif
diff --git a/Protocol/Smtp/Smtp.c b/Protocol/Smtp/Smtp.c
new file mode 100644
index 0000000..f5cd5a8
--- /dev/null
+++ b/Protocol/Smtp/Smtp.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Smtp.c
+
+Abstract:
+
+ This file abstracts the common interfaces required to
+ communicate with the SMTP Server
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (Smtp)
+
+EFI_GUID gEfiSmtpProtocolGuid = EFI_SMTP_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSmtpProtocolGuid, "SMTP Protocol", "SMTP Protocol");
diff --git a/Protocol/Smtp/Smtp.h b/Protocol/Smtp/Smtp.h
new file mode 100644
index 0000000..622ec7b
--- /dev/null
+++ b/Protocol/Smtp/Smtp.h
@@ -0,0 +1,81 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Smtp.h
+
+Abstract:
+
+ This code abstracts SMTP Protocol
+
+--*/
+
+#ifndef _EFI_SMTP_PROTOCOL_
+#define _EFI_SMTP_PROTOCOL_
+
+#include "Tiano.h"
+
+#define EFI_SMTP_PROTOCOL_GUID \
+ { \
+ 0x5f67d40c, 0x1d06, 0x4e3e, 0x8b, 0x4a, 0xd2, 0x71, 0x3f, 0x46, 0xe1, 0xdc \
+ }
+
+#define SMTP_PORT 25
+
+EFI_FORWARD_DECLARATION (EFI_SMTP_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_GET_SERVER) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN OUT UINT32 *UrlStringSize,
+ OUT EFI_IP_ADDRESS * ServerAddress,
+ OUT UINT8 *ServerUrl
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_SET_SERVER) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN OUT EFI_IP_ADDRESS * ServerAddress,
+ IN OUT UINT8 *ServerUrl
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_SEND_MAIL) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN UINT8 *Message,
+ IN UINT8 *Subject,
+ IN UINT8 *Sender,
+ IN UINT8 *Receiver
+ );
+
+//
+// SMTP PROTOCOL
+//
+typedef struct _EFI_SMTP_PROTOCOL {
+ EFI_SMTP_SEND_MAIL SendMail;
+ EFI_SMTP_SET_SERVER SetMailServer;
+ EFI_SMTP_GET_SERVER GetMailServer;
+} EFI_SMTP_PROTOCOL;
+
+extern EFI_GUID gEfiSmtpProtocolGuid;
+
+#endif
diff --git a/Protocol/SocketService/SocketService.c b/Protocol/SocketService/SocketService.c
new file mode 100644
index 0000000..75e0968
--- /dev/null
+++ b/Protocol/SocketService/SocketService.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SocketService.c
+
+Abstract:
+
+ EFI PC Card Socket Service Protocol
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (SocketService)
+
+EFI_GUID gEfiPcCardSsProtocolGuid = EFI_PCCARD_SS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiPcCardSsProtocolGuid, "Socket Service Protocol", "EFI 1.1 Socket Service Protocol");
diff --git a/Protocol/SocketService/SocketService.h b/Protocol/SocketService/SocketService.h
new file mode 100644
index 0000000..2eb5ea3
--- /dev/null
+++ b/Protocol/SocketService/SocketService.h
@@ -0,0 +1,155 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SocketService.h
+
+Abstract:
+
+ EFI PC Card Socket Service Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_PCCARD_SS_H
+#define _EFI_PCCARD_SS_H
+
+//
+// Global GUID for PC Card Socket Service Protocol
+//
+#define EFI_PCCARD_SS_PROTOCOL_GUID \
+ { \
+ 0xc38e6d34, 0x5a7f, 0x4bf9, 0xbe, 0x57, 0x94, 0xdd, 0x30, 0x38, 0x02, 0x76 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_PCCARD_SS_PROTOCOL);
+
+//
+// Prototypes for PC Card Socket Service Protocol
+//
+//
+// EFI PC Card Socket Event Bits
+//
+#define EFI_PCCARD_SS_EVENT_DETECT 0x00000001
+#define EFI_PCCARD_SS_EVENT_POWERCYCLE 0x00000002
+#define EFI_PCCARD_SS_EVENT_STSCHG 0x00000004
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_SS_GET_EVENT) (
+ IN EFI_PCCARD_SS_PROTOCOL * This,
+ OUT UINT32 *Event
+ );
+
+//
+// EFI PC Card Status Bits
+//
+#define EFI_PCCARD_SS_STATUS_DETECT 0x00000001
+#define EFI_PCCARD_SS_STATUS_POWERCYCLE 0x00000002
+#define EFI_PCCARD_SS_STATUS_STSCHG 0x00000004
+#define EFI_PCCARD_SS_STATUS_BADVCCREQ 0x00000008
+#define EFI_PCCARD_SS_STATUS_READY 0x00000010
+#define EFI_PCCARD_SS_STATUS_DATALOST 0x00000020
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_SS_GET_STATUS) (
+ IN EFI_PCCARD_SS_PROTOCOL * This,
+ OUT UINT32 *Status
+ );
+
+//
+// EFI PC Card Capability Object
+//
+typedef enum {
+ EfiPccardCapabilitySocket,
+ EfiPccardCapabilityCard,
+ EfiPccardCapabilityMaximum
+} EFI_PCCARD_CAPABILITY_OBJECT;
+
+//
+// EFI PC Card Capability Bits
+//
+#define EFI_PCCARD_CAPABILITY_YV 0x00000001
+#define EFI_PCCARD_CAPABILITY_XV 0x00000002
+#define EFI_PCCARD_CAPABILITY_3V 0x00000004
+#define EFI_PCCARD_CAPABILITY_5V 0x00000008
+#define EFI_PCCARD_CAPABILITY_16BIT 0x00000100
+#define EFI_PCCARD_CAPABILITY_32BIT 0x00000200
+#define EFI_PCCARD_CAPABILITY_UNKOWNCARD 0x80000000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_SS_CAPABILITY) (
+ IN EFI_PCCARD_SS_PROTOCOL * This,
+ IN EFI_PCCARD_CAPABILITY_OBJECT Object,
+ OUT UINT32 *Capability
+ );
+
+//
+// EFI PC Card Attribute Operation
+//
+typedef enum {
+ EfiPccardAttributeGet,
+ EfiPccardAttributeSet,
+ EfiPccardAttributeMaximum
+} EFI_PCCARD_ATTRIBUTE_OPERATION;
+
+//
+// EFI PC Card Attibute Bits
+//
+#define EFI_PCCARD_ATTRIBUTE_VCC_YV 0x00000001
+#define EFI_PCCARD_ATTRIBUTE_VCC_XV 0x00000002
+#define EFI_PCCARD_ATTRIBUTE_VCC_3V 0x00000004
+#define EFI_PCCARD_ATTRIBUTE_VCC_5V 0x00000008
+#define EFI_PCCARD_ATTRIBUTE_VPP_YV 0x00000100
+#define EFI_PCCARD_ATTRIBUTE_VPP_XV 0x00000200
+#define EFI_PCCARD_ATTRIBUTE_VPP_3V 0x00000400
+#define EFI_PCCARD_ATTRIBUTE_VPP_5V 0x00000800
+#define EFI_PCCARD_ATTRIBUTE_VPP_12V 0x00001000
+#define EFI_PCCARD_ATTRIBUTE_ATUOPOWER 0x00010000
+#define EFI_PCCARD_ATTRIBUTE_STOPCLK 0x00020000
+#define EFI_PCCARD_ATTRIBUTE_FORCE_DETECT 0x00040000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_SS_ATTRIBUTE) (
+ IN EFI_PCCARD_SS_PROTOCOL * This,
+ IN EFI_PCCARD_ATTRIBUTE_OPERATION Operation,
+ IN OUT UINT64 *Attribute
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PCCARD_SS_RESET) (
+ IN EFI_PCCARD_SS_PROTOCOL * This
+ );
+
+typedef struct _EFI_PCCARD_SS_PROTOCOL {
+ EFI_PCCARD_SS_GET_EVENT GetEvent;
+ EFI_PCCARD_SS_GET_STATUS GetStatus;
+ EFI_PCCARD_SS_CAPABILITY Capability;
+ EFI_PCCARD_SS_ATTRIBUTE Attribute;
+ EFI_PCCARD_SS_RESET Reset;
+} EFI_PCCARD_SS_PROTOCOL;
+
+extern EFI_GUID gEfiPcCardSsProtocolGuid;
+
+#endif
diff --git a/Protocol/Speaker/Speaker.c b/Protocol/Speaker/Speaker.c
new file mode 100644
index 0000000..1ca1592
--- /dev/null
+++ b/Protocol/Speaker/Speaker.c
@@ -0,0 +1,37 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Speaker.c
+
+Abstract:
+
+ EFI Speaker Interface
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Speaker)
+
+EFI_GUID gEfiSpeakerInterfaceProtocolGuid = EFI_SPEAKER_INTERFACE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSpeakerInterfaceProtocolGuid, "Speaker Interface", "");
diff --git a/Protocol/Speaker/Speaker.h b/Protocol/Speaker/Speaker.h
new file mode 100644
index 0000000..8932f80
--- /dev/null
+++ b/Protocol/Speaker/Speaker.h
@@ -0,0 +1,75 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reservedb
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Speaker.h
+
+Abstract:
+
+ EFI Speaker Interface Protocol
+
+Revision History
+
+--*/
+
+#ifndef _EFI_SPEAKER_H
+#define _EFI_SPEAKER_H
+
+//
+// Global Id for Speaker Interface
+//
+#define EFI_SPEAKER_INTERFACE_PROTOCOL_GUID \
+ { \
+ 0x400b4476, 0x3081, 0x11d6, 0x87, 0xed, 0x00, 0x06, 0x29, 0x45, 0xc3, 0xb9 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SPEAKER_IF_PROTOCOL);
+
+//
+// Beep Code
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GENERATE_BEEP) (
+ IN EFI_SPEAKER_IF_PROTOCOL * This,
+ IN UINTN NumberOfBeep,
+ IN UINTN BeepDuration,
+ IN UINTN TimeInterval
+ );
+
+//
+// Set Frequency
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SPEAKER_SET_FREQUENCY) (
+ IN EFI_SPEAKER_IF_PROTOCOL * This,
+ IN UINT16 Frequency
+ );
+
+//
+// Protocol definition
+//
+typedef struct _EFI_SPEAKER_IF_PROTOCOL {
+ EFI_SPEAKER_SET_FREQUENCY SetSpeakerToneFrequency;
+ EFI_GENERATE_BEEP GenerateBeep;
+} EFI_SPEAKER_IF_PROTOCOL;
+
+extern EFI_GUID gEfiSpeakerInterfaceProtocolGuid;
+#endif
diff --git a/Protocol/SwapAddressRange/SwapAddressRange.c b/Protocol/SwapAddressRange/SwapAddressRange.c
new file mode 100644
index 0000000..1b95129
--- /dev/null
+++ b/Protocol/SwapAddressRange/SwapAddressRange.c
@@ -0,0 +1,33 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SwapAddressRange.c
+
+Abstract:
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (SwapAddressRange)
+
+EFI_GUID gEfiSwapAddressRangeProtocolGuid = EFI_SWAP_ADDRESS_RANGE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSwapAddressRangeProtocolGuid, "SwapAddressRange Protocol", "Swap Address Range protocol");
diff --git a/Protocol/SwapAddressRange/SwapAddressRange.h b/Protocol/SwapAddressRange/SwapAddressRange.h
new file mode 100644
index 0000000..62e0be8
--- /dev/null
+++ b/Protocol/SwapAddressRange/SwapAddressRange.h
@@ -0,0 +1,106 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ SwapAddressRange.h
+
+Abstract:
+
+--*/
+
+#ifndef _EFI_SWAP_ADDRESS_RANGE_PROTOCOL_H_
+#define _EFI_SWAP_ADDRESS_RANGE_PROTOCOL_H_
+
+#define EFI_SWAP_ADDRESS_RANGE_PROTOCOL_GUID \
+ { \
+ 0x1259f60d, 0xb754, 0x468e, 0xa7, 0x89, 0x4d, 0xb8, 0x5d, 0x55, 0xe8, 0x7e \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_SWAP_ADDRESS_RANGE_PROTOCOL);
+
+#define EFI_UNSUPPORT_LOCK 0
+#define EFI_SOFTWARE_LOCK 1
+#define EFI_HARDWARE_LOCK 2
+
+typedef UINT8 EFI_SWAP_LOCK_CAPABILITY;
+
+//
+// Protocl APIs
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_RANGE_LOCATION) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ OUT EFI_PHYSICAL_ADDRESS * BootBlockBase,
+ OUT UINTN *BootBlockSize,
+ OUT EFI_PHYSICAL_ADDRESS * BackupBlockBase,
+ OUT UINTN *BackupBlockSize
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_SWAP_STATE) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ OUT BOOLEAN *SwapState
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_SWAP_STATE) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ IN BOOLEAN NewSwapState
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_RTC_POWER_STATUS) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ OUT BOOLEAN *RtcPowerFailed
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_SWAP_LOCK_CAPABILITY) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ OUT EFI_SWAP_LOCK_CAPABILITY * LockCapability
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_SWAP_LOCK) (
+ IN EFI_SWAP_ADDRESS_RANGE_PROTOCOL * This,
+ IN EFI_SWAP_LOCK_CAPABILITY LockCapability,
+ IN BOOLEAN NewLockState
+ );
+
+typedef struct _EFI_SWAP_ADDRESS_RANGE_PROTOCOL {
+ EFI_GET_RANGE_LOCATION GetRangeLocation; // has output parameters for base and length
+ EFI_GET_SWAP_STATE GetSwapState; // are ranges swapped or not
+ EFI_SET_SWAP_STATE SetSwapState; // swap or unswap ranges
+ EFI_GET_RTC_POWER_STATUS GetRtcPowerStatus; // checks RTC battery, or whatever...
+ EFI_GET_SWAP_LOCK_CAPABILITY GetSwapLockCapability; // Get TOP_SWAP lock capability,
+ EFI_SET_SWAP_LOCK SetSwapLock; // Set TOP_SWAP lock state
+} EFI_SWAP_ADDRESS_RANGE_PROTOCOL;
+
+extern EFI_GUID gEfiSwapAddressRangeProtocolGuid;
+
+#endif
diff --git a/Protocol/TcpSock/TcpSock.c b/Protocol/TcpSock/TcpSock.c
new file mode 100644
index 0000000..5206bc4
--- /dev/null
+++ b/Protocol/TcpSock/TcpSock.c
@@ -0,0 +1,36 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ TcpSock.c
+
+Abstract:
+
+ This file abstracts the common interfaces required to
+ communicate within TCP Sockets
+
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (TcpSock)
+
+EFI_GUID gEfiTcpSockProtocolGuid = EFI_TCP_SOCK_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiTcpSockProtocolGuid, "TCP Sock Protocol", "TCP Sock Protocol");
diff --git a/Protocol/TcpSock/TcpSock.h b/Protocol/TcpSock/TcpSock.h
new file mode 100644
index 0000000..9db3c20
--- /dev/null
+++ b/Protocol/TcpSock/TcpSock.h
@@ -0,0 +1,97 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ TcpSock.h
+
+Abstract:
+
+ This code abstracts TCP Socket Protocol
+
+--*/
+
+#ifndef _EFI_TCP_SOCK_PROTOCOL_
+#define _EFI_TCP_SOCK_PROTOCOL_
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (Tcp)
+
+#define EFI_TCP_SOCK_PROTOCOL_GUID \
+ { \
+ 0x5187359b, 0x790d, 0x425b, 0xa5, 0x93, 0xca, 0x1c, 0xdb, 0x3c, 0xeb, 0xad \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_TCP_SOCK_PROTOCOL);
+
+typedef
+VOID
+(EFIAPI *FIN_CALLBACK_FUNCTION) ();
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_SOCKET_WRITE_DATA) (
+ IN EFI_TCP_SOCK_PROTOCOL * This,
+ IN UINT8 SocketId,
+ IN UINT8 *Data,
+ IN UINTN Size,
+ IN BOOLEAN Blocked
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_SOCKET_READ_DATA) (
+ IN EFI_TCP_SOCK_PROTOCOL * This,
+ IN UINT8 SocketId,
+ IN OUT UINT8 *Data,
+ IN OUT UINTN *Size,
+ IN BOOLEAN Blocked
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_DISCONNECT_SOCKET) (
+ IN EFI_TCP_SOCK_PROTOCOL * This,
+ UINT8 SocketId,
+ BOOLEAN Forced
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_CONNECT_SOCKET) (
+ IN EFI_TCP_SOCK_PROTOCOL * This,
+ IN EFI_IP_ADDRESS * DestIp,
+ IN UINT16 SrcPort,
+ IN UINT16 DestPort,
+ IN FIN_CALLBACK_FUNCTION FinCallback,
+ OUT UINT8 *SocketId
+ );
+
+//
+// TCP SOCK PROTOCOL
+//
+typedef struct _EFI_TCP_SOCK_PROTOCOL {
+ EFI_TCP_CONNECT_SOCKET ConnectSocket;
+ EFI_TCP_DISCONNECT_SOCKET DisconnectSocket;
+ EFI_TCP_SOCKET_READ_DATA ReadSocketData;
+ EFI_TCP_SOCKET_WRITE_DATA WriteSocketData;
+} EFI_TCP_SOCK_PROTOCOL;
+
+extern EFI_GUID gEfiTcpSockProtocolGuid;
+
+#endif
diff --git a/Protocol/TelnetServer/TelnetServer.c b/Protocol/TelnetServer/TelnetServer.c
new file mode 100644
index 0000000..8a5aa37
--- /dev/null
+++ b/Protocol/TelnetServer/TelnetServer.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ TelnetServer.c
+
+Abstract:
+
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (TelnetServer)
+
+EFI_GUID gEfiTelnetServerGuid = EFI_TELNET_SERVER_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiTelnetServerGuid, "Telnet Server Protocol", "EFI Telnet Server Code Protocol");
diff --git a/Protocol/TelnetServer/TelnetServer.h b/Protocol/TelnetServer/TelnetServer.h
new file mode 100644
index 0000000..4da5ccc
--- /dev/null
+++ b/Protocol/TelnetServer/TelnetServer.h
@@ -0,0 +1,89 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ TelnetServer.h
+
+Abstract:
+
+ Private Data definition for Telnet Server driver
+
+--*/
+
+#ifndef _EFI_TELNET_SERVER_PROTOCOL_H_
+#define _EFI_TELNET_SERVER_PROTOCOL_H_
+
+#define EFI_TELNET_SERVER_PROTOCOL_GUID \
+ { \
+ 0x6d3569d4, 0x85e5, 0x4943, 0xae, 0x46, 0xee, 0x67, 0xa6, 0xe1, 0xab, 0x5a \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_TELNET_SERVER_PROTOCOL);
+
+//
+// Telnet Options (used in conjunction with Telnet Commands)
+//
+#define TRANSMIT_BINARY (UINT8) 0 // Transmit in 8-bit binary form
+#define ECHO (UINT8) 1 // Allow one side to echo data it receives
+#define SUPPRESS_GA (UINT8) 3 // Suppress Go-ahead signal after data
+#define STATUS (UINT8) 5 // Request status of TELNET option from
+// remote
+//
+#define TIMING_MARK (UINT8) 6 // Request timing mark be inserted in return
+// stream to synch two ends of connection
+//
+#define TERMINAL_TYPE (UINT8) 24 // Exchange information about the make and
+// model of a terminal being used
+//
+#define END_OF_RECORD (UINT8) 25 // Terminate data sent with EOR code
+#define WINDOW_SIZE (UINT8) 31 // Send sub-option with windowing size back
+#define LINE_MODE (UINT8) 34 // Send complete lines instead of
+// individual characters
+//
+// Supported terminal type
+//
+#define PcAnsiType 0
+#define VT100Type 1
+#define VT100PlusType 2
+#define VTUTF8Type 3
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TELNET_SERVER_SET_OPTION) (
+ IN EFI_TELNET_SERVER_PROTOCOL * This,
+ IN UINT8 OptionCode,
+ IN UINTN OptionValue
+ );
+
+//
+// Efi Telnet Server Protocol structure
+//
+#define EFI_TELNET_SERVER_REVISION 0x00010000
+
+typedef struct _EFI_TELNET_SERVER_PROTOCOL {
+ UINT64 Revision;
+ UINT8 TerminalType;
+ EFI_TELNET_SERVER_SET_OPTION SetOption;
+} EFI_TELNET_SERVER_PROTOCOL;
+
+//
+// Global Variables
+//
+extern EFI_GUID gEfiTelnetServerGuid;
+
+#endif
diff --git a/Protocol/Udp/Udp.c b/Protocol/Udp/Udp.c
new file mode 100644
index 0000000..5043226
--- /dev/null
+++ b/Protocol/Udp/Udp.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 2002 Intel Corporation. All rights reserved.
+
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+ Udp.c
+
+Abstract:
+ User Datagram Protocol GUID Declaration
+
+--*/
+
+#include "Tiano.h"
+
+#include EFI_PROTOCOL_DEFINITION (Udp)
+
+EFI_GUID gEfiUdpProtocolGuid = EFI_UDP_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiUdpProtocolGuid, "UDP Protocol", "EFI 1.1 UDP Protocol");
+
+/* EOF - Udp.c */
diff --git a/Protocol/Udp/Udp.h b/Protocol/Udp/Udp.h
new file mode 100644
index 0000000..787fc43
--- /dev/null
+++ b/Protocol/Udp/Udp.h
@@ -0,0 +1,202 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+#ifndef _EFI_UDP_H_
+// GC_TODO: move protective #ifndef after comment header
+#define _EFI_UDP_H_
+
+/*++
+
+Copyright (c) 2002 Intel Corporation. All rights reserved.
+
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+ Udp.h
+
+Abstract:
+ EFI User Datagram Protocol Definition
+
+--*/
+#include "Tiano.h"
+#include "TianoTypes.h"
+
+EFI_FORWARD_DECLARATION (EFI_UDP_PROTOCOL);
+
+#include EFI_PROTOCOL_DEFINITION (Ip)
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+#define EFI_UDP_PROTOCOL_GUID \
+ { \
+ 0xc56fb1b2, 0x017b, 0x4984, 0xa3, 0xf6, 0x3f, 0x73, 0x4f, 0xfa, 0x9e, 0x33 \
+ }
+
+extern EFI_GUID gEfiUdpProtocolGuid;
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+//
+//
+//
+//
+//
+#pragma pack(1)
+
+typedef struct {
+ UINT16 SourcePort;
+ UINT16 DestinationPort;
+ UINT16 Length;
+ UINT16 Checksum;
+} EFI_UDP_HEADER;
+
+#pragma pack()
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+//
+//
+//
+typedef VOID *EFI_UDP_HANDLE;
+
+//
+//
+//
+typedef
+VOID
+(EFIAPI *EFI_UDP_RECEIVE) (
+ IN VOID *Context,
+ IN EFI_IP_ADDRESS * DestinationIp,
+ IN UINT16 DestinationPort,
+ IN EFI_IP_ADDRESS * SourceIp,
+ IN UINT16 SourcePort,
+ IN UINTN BufferLen,
+ IN VOID *Buffer
+ );
+
+/*++
+ * Description:
+ * The UDP receive function is called during UDP event processing when a
+ * valid UDP packet has been received. All processing of the received data
+ * must be completed before returning control to the UDP protocol driver.
+ * The contents of the DestinationIp, SourceIp and Buffer parameters may
+ * be overwritten or unallocated after control is returned to the UDP
+ * protocol driver.
+ *
+ * Parameters:
+ * Context - Pointer to receive context data.
+ * DestinationIp - IP address that the packet was sent to.
+ * DestinationPort - UDP port number that the packet was sent to.
+ * SourceIp - IP address that the packet was sent from.
+ * SourcePort - UDP port number that the packet was sent from.
+ * BufferLen - Length of received UDP packet. May be zero.
+ * Buffer - Pointer to received UDP packet. May be NULL.
+ *
+ * Returns:
+ * n/a
+--*/
+
+//
+//
+//
+typedef struct {
+ VOID *Context;
+ EFI_IP_ADDRESS StationIp;
+ EFI_IP_ADDRESS SubnetMask;
+ EFI_IP_ADDRESS GatewayIp;
+ UINT8 TypeOfService;
+ UINT8 TimeToLive;
+ BOOLEAN DoNotFragment;
+ BOOLEAN Promiscuous;
+ BOOLEAN Broadcast;
+ BOOLEAN AnyPort;
+ UINT16 Port;
+ EFI_UDP_RECEIVE Receive;
+ UINTN MulticastIpCount;
+ EFI_IP_ADDRESS *MulticastIpList;
+} EFI_UDP_OPEN_DATA;
+
+/*++
+ * StationIp - IP address assigned to this UDP handle.
+ * SubnetMask - Subnet mask. Used to check if the destination IP
+ * address is on the same subnet as the StationIp.
+ * GatewayIp - Default gateway IP address. Used if the destination
+ * IP address is not on the same subnet as the StationIp
+ * and is also not present in the route table.
+ * TypeOfService - Packet service priority.
+ * TimeToLive - Number of gateway 'hops' before packet 'dies'.
+ * DoNotFragment - If TRUE, transmitted UDP packets will have the
+ * 'do not fragment' bit set in the IP header.
+ * Promiscuous - If TRUE, accept all UDP packets if they get past
+ * the port filters.
+ * Broadcast - If TRUE, accept broadcast UDP packets if they get
+ * past the port filters.
+ * AnyPort - Accept UDP packets sent to any port number.
+ * Port - If AnyPort is FALSE, only accept UDP packets sent
+ * to this port number.
+ * Receive - Pointer to the UDP receive function for this handle.
+ * MulticastIpCount - Number of multicast IP addresses in the MulticastIpList
+ * array. May be zero.
+ * MulticastIpList - Array of multicast IP addresses. UDP packets sent to
+ * these addresses will be accepted by the UDP protocol
+ * driver if they get past the port filters.
+--*/
+
+//
+//
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP_OPEN) (
+ IN EFI_UDP_PROTOCOL * This,
+ IN EFI_UDP_OPEN_DATA * UdpOpenData,
+ OUT EFI_UDP_HANDLE * NewUdpHandle
+ );
+
+//
+//
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP_CLOSE) (
+ IN EFI_UDP_HANDLE UdpHandle,
+ IN BOOLEAN Flush
+ );
+
+//
+//
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UDP_TRANSMIT) (
+ IN EFI_UDP_HANDLE UdpHandle,
+ IN EFI_IP_ADDRESS * DestinationIp,
+ IN UINT16 DestinationPort,
+ IN BOOLEAN Flush,
+ IN UINTN BufferLen,
+ IN VOID *Buffer
+ );
+
+//
+// UDP protocol interface.
+//
+typedef struct _EFI_UDP_PROTOCOL {
+ EFI_UDP_OPEN Open;
+ EFI_UDP_CLOSE Close;
+ EFI_UDP_TRANSMIT Transmit;
+ EFI_EVENT Event;
+} EFI_UDP_PROTOCOL;
+
+#endif /* _EFI_UDP_H */
+
+/* EOF - Udp.h */
diff --git a/Protocol/VgaMiniPort/VgaMiniPort.c b/Protocol/VgaMiniPort/VgaMiniPort.c
new file mode 100644
index 0000000..e03e092
--- /dev/null
+++ b/Protocol/VgaMiniPort/VgaMiniPort.c
@@ -0,0 +1,36 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ VgaMiniPort.c
+
+Abstract:
+
+ EFI VGA Mini Port Protocol
+
+Revision History
+
+*/
+
+// GC_TODO: fix comment to start with /*++
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (VgaMiniPort)
+
+EFI_GUID gEfiVgaMiniPortProtocolGuid = EFI_VGA_MINI_PORT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiVgaMiniPortProtocolGuid, "VGA Mini Port Protocol", "EFI VGA Mini Port Protocol");
diff --git a/Protocol/VgaMiniPort/VgaMiniPort.h b/Protocol/VgaMiniPort/VgaMiniPort.h
new file mode 100644
index 0000000..e21a894
--- /dev/null
+++ b/Protocol/VgaMiniPort/VgaMiniPort.h
@@ -0,0 +1,78 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ VgaMiniPort.h
+
+Abstract:
+
+ Vga Mini port binding for a VGA controller
+
+Revision History
+
+--*/
+
+#ifndef _VGA_MINI_PORT_H
+#define _VGA_MINI_PORT_H
+
+#define EFI_VGA_MINI_PORT_PROTOCOL_GUID \
+ { \
+ 0xc7735a2f, 0x88f5, 0x4882, 0xae, 0x63, 0xfa, 0xac, 0x8c, 0x8b, 0x86, 0xb3 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_VGA_MINI_PORT_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
+ IN EFI_VGA_MINI_PORT_PROTOCOL * This,
+ IN UINTN ModeNumber
+ );
+
+/*++
+
+ Routine Description:
+ Sets the text display mode of a VGA controller
+
+ Arguments:
+ This - Protocol instance pointer.
+ Mode - Mode number. 0 - 80x25 1-80x50
+
+ Returns:
+ EFI_SUCCESS - The mode was set
+ EFI_DEVICE_ERROR - The device is not functioning properly.
+
+--*/
+typedef struct _EFI_VGA_MINI_PORT_PROTOCOL {
+ EFI_VGA_MINI_PORT_SET_MODE SetMode;
+
+ UINT64 VgaMemoryOffset;
+ UINT64 CrtcAddressRegisterOffset;
+ UINT64 CrtcDataRegisterOffset;
+
+ UINT8 VgaMemoryBar;
+ UINT8 CrtcAddressRegisterBar;
+ UINT8 CrtcDataRegisterBar;
+
+ UINT8 MaxMode;
+} EFI_VGA_MINI_PORT_PROTOCOL;
+
+extern EFI_GUID gEfiVgaMiniPortProtocolGuid;
+
+#endif