Fix CRLF format

Signed-off-by: Tian, Hot <hot.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15155 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Tian, Hot 2014-01-22 08:38:50 +00:00 committed by hhtian
parent 4c8f6044a2
commit 4b738c76f5
10 changed files with 4723 additions and 4723 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,162 +1,162 @@
/** @file
This file is used to implement the EFI_DISK_INFO_PROTOCOL interface..
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "NvmExpress.h"
EFI_DISK_INFO_PROTOCOL gNvmExpressDiskInfoProtocolTemplate = {
EFI_DISK_INFO_NVME_INTERFACE_GUID,
NvmExpressDiskInfoInquiry,
NvmExpressDiskInfoIdentify,
NvmExpressDiskInfoSenseData,
NvmExpressDiskInfoWhichIde
};
/**
Initialize the installation of DiskInfo protocol.
This function prepares for the installation of DiskInfo protocol on the child handle.
By default, it installs DiskInfo protocol with NVME interface GUID.
@param[in] Device The pointer of NVME_DEVICE_PRIVATE_DATA.
**/
VOID
InitializeDiskInfo (
IN NVME_DEVICE_PRIVATE_DATA *Device
)
{
CopyMem (&Device->DiskInfo, &gNvmExpressDiskInfoProtocolTemplate, sizeof (EFI_DISK_INFO_PROTOCOL));
}
/**
Provides inquiry information for the controller type.
This function is used to get inquiry data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] InquiryData Pointer to a buffer for the inquiry data.
@param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoInquiry (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *InquiryData,
IN OUT UINT32 *InquiryDataSize
)
{
return EFI_NOT_FOUND;
}
/**
Provides identify information for the controller type.
This function is used to get identify data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
instance.
@param[in, out] IdentifyData Pointer to a buffer for the identify data.
@param[in, out] IdentifyDataSize Pointer to the value for the identify data
size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoIdentify (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *IdentifyData,
IN OUT UINT32 *IdentifyDataSize
)
{
EFI_STATUS Status;
NVME_DEVICE_PRIVATE_DATA *Device;
Device = NVME_DEVICE_PRIVATE_DATA_FROM_DISK_INFO (This);
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (Device->NamespaceData)) {
Status = EFI_SUCCESS;
CopyMem (IdentifyData, &Device->NamespaceData, sizeof (Device->NamespaceData));
}
*IdentifyDataSize = sizeof (Device->NamespaceData);
return Status;
}
/**
Provides sense data information for the controller type.
This function is used to get sense data.
Data format of Sense data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] SenseData Pointer to the SenseData.
@param[in, out] SenseDataSize Size of SenseData in bytes.
@param[out] SenseDataNumber Pointer to the value for the sense data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class.
@retval EFI_DEVICE_ERROR Error reading SenseData from device.
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoSenseData (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *SenseData,
IN OUT UINT32 *SenseDataSize,
OUT UINT8 *SenseDataNumber
)
{
return EFI_NOT_FOUND;
}
/**
This function is used to get controller information.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
@param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
@retval EFI_UNSUPPORTED This is not an IDE device.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoWhichIde (
IN EFI_DISK_INFO_PROTOCOL *This,
OUT UINT32 *IdeChannel,
OUT UINT32 *IdeDevice
)
{
return EFI_UNSUPPORTED;
}
/** @file
This file is used to implement the EFI_DISK_INFO_PROTOCOL interface..
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "NvmExpress.h"
EFI_DISK_INFO_PROTOCOL gNvmExpressDiskInfoProtocolTemplate = {
EFI_DISK_INFO_NVME_INTERFACE_GUID,
NvmExpressDiskInfoInquiry,
NvmExpressDiskInfoIdentify,
NvmExpressDiskInfoSenseData,
NvmExpressDiskInfoWhichIde
};
/**
Initialize the installation of DiskInfo protocol.
This function prepares for the installation of DiskInfo protocol on the child handle.
By default, it installs DiskInfo protocol with NVME interface GUID.
@param[in] Device The pointer of NVME_DEVICE_PRIVATE_DATA.
**/
VOID
InitializeDiskInfo (
IN NVME_DEVICE_PRIVATE_DATA *Device
)
{
CopyMem (&Device->DiskInfo, &gNvmExpressDiskInfoProtocolTemplate, sizeof (EFI_DISK_INFO_PROTOCOL));
}
/**
Provides inquiry information for the controller type.
This function is used to get inquiry data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] InquiryData Pointer to a buffer for the inquiry data.
@param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoInquiry (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *InquiryData,
IN OUT UINT32 *InquiryDataSize
)
{
return EFI_NOT_FOUND;
}
/**
Provides identify information for the controller type.
This function is used to get identify data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
instance.
@param[in, out] IdentifyData Pointer to a buffer for the identify data.
@param[in, out] IdentifyDataSize Pointer to the value for the identify data
size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoIdentify (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *IdentifyData,
IN OUT UINT32 *IdentifyDataSize
)
{
EFI_STATUS Status;
NVME_DEVICE_PRIVATE_DATA *Device;
Device = NVME_DEVICE_PRIVATE_DATA_FROM_DISK_INFO (This);
Status = EFI_BUFFER_TOO_SMALL;
if (*IdentifyDataSize >= sizeof (Device->NamespaceData)) {
Status = EFI_SUCCESS;
CopyMem (IdentifyData, &Device->NamespaceData, sizeof (Device->NamespaceData));
}
*IdentifyDataSize = sizeof (Device->NamespaceData);
return Status;
}
/**
Provides sense data information for the controller type.
This function is used to get sense data.
Data format of Sense data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] SenseData Pointer to the SenseData.
@param[in, out] SenseDataSize Size of SenseData in bytes.
@param[out] SenseDataNumber Pointer to the value for the sense data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class.
@retval EFI_DEVICE_ERROR Error reading SenseData from device.
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoSenseData (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *SenseData,
IN OUT UINT32 *SenseDataSize,
OUT UINT8 *SenseDataNumber
)
{
return EFI_NOT_FOUND;
}
/**
This function is used to get controller information.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
@param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
@retval EFI_UNSUPPORTED This is not an IDE device.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoWhichIde (
IN EFI_DISK_INFO_PROTOCOL *This,
OUT UINT32 *IdeChannel,
OUT UINT32 *IdeDevice
)
{
return EFI_UNSUPPORTED;
}

View File

@ -1,129 +1,129 @@
/** @file
Header file for EFI_DISK_INFO_PROTOCOL interface.
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _NVME_DISKINFO_H_
#define _NVME_DISKINFO_H_
/**
Initialize the installation of DiskInfo protocol.
This function prepares for the installation of DiskInfo protocol on the child handle.
By default, it installs DiskInfo protocol with NVME interface GUID.
@param[in] Device The pointer of NVME_DEVICE_PRIVATE_DATA.
**/
VOID
InitializeDiskInfo (
IN NVME_DEVICE_PRIVATE_DATA *Device
);
/**
Provides inquiry information for the controller type.
This function is used to get inquiry data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] InquiryData Pointer to a buffer for the inquiry data.
@param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoInquiry (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *InquiryData,
IN OUT UINT32 *InquiryDataSize
);
/**
Provides identify information for the controller type.
This function is used to get identify data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
instance.
@param[in, out] IdentifyData Pointer to a buffer for the identify data.
@param[in, out] IdentifyDataSize Pointer to the value for the identify data
size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoIdentify (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *IdentifyData,
IN OUT UINT32 *IdentifyDataSize
);
/**
Provides sense data information for the controller type.
This function is used to get sense data.
Data format of Sense data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] SenseData Pointer to the SenseData.
@param[in, out] SenseDataSize Size of SenseData in bytes.
@param[out] SenseDataNumber Pointer to the value for the sense data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class.
@retval EFI_DEVICE_ERROR Error reading SenseData from device.
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoSenseData (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *SenseData,
IN OUT UINT32 *SenseDataSize,
OUT UINT8 *SenseDataNumber
);
/**
This function is used to get controller information.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
@param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
@retval EFI_UNSUPPORTED This is not an IDE device.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoWhichIde (
IN EFI_DISK_INFO_PROTOCOL *This,
OUT UINT32 *IdeChannel,
OUT UINT32 *IdeDevice
);
#endif
/** @file
Header file for EFI_DISK_INFO_PROTOCOL interface.
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _NVME_DISKINFO_H_
#define _NVME_DISKINFO_H_
/**
Initialize the installation of DiskInfo protocol.
This function prepares for the installation of DiskInfo protocol on the child handle.
By default, it installs DiskInfo protocol with NVME interface GUID.
@param[in] Device The pointer of NVME_DEVICE_PRIVATE_DATA.
**/
VOID
InitializeDiskInfo (
IN NVME_DEVICE_PRIVATE_DATA *Device
);
/**
Provides inquiry information for the controller type.
This function is used to get inquiry data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] InquiryData Pointer to a buffer for the inquiry data.
@param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoInquiry (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *InquiryData,
IN OUT UINT32 *InquiryDataSize
);
/**
Provides identify information for the controller type.
This function is used to get identify data. Data format
of Identify data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
instance.
@param[in, out] IdentifyData Pointer to a buffer for the identify data.
@param[in, out] IdentifyDataSize Pointer to the value for the identify data
size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoIdentify (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *IdentifyData,
IN OUT UINT32 *IdentifyDataSize
);
/**
Provides sense data information for the controller type.
This function is used to get sense data.
Data format of Sense data is defined by the Interface GUID.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[in, out] SenseData Pointer to the SenseData.
@param[in, out] SenseDataSize Size of SenseData in bytes.
@param[out] SenseDataNumber Pointer to the value for the sense data size.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_NOT_FOUND Device does not support this data class.
@retval EFI_DEVICE_ERROR Error reading SenseData from device.
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoSenseData (
IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *SenseData,
IN OUT UINT32 *SenseDataSize,
OUT UINT8 *SenseDataNumber
);
/**
This function is used to get controller information.
@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
@param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
@param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
@retval EFI_UNSUPPORTED This is not an IDE device.
**/
EFI_STATUS
EFIAPI
NvmExpressDiskInfoWhichIde (
IN EFI_DISK_INFO_PROTOCOL *This,
OUT UINT32 *IdeChannel,
OUT UINT32 *IdeDevice
);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -11,23 +11,23 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _TCP_IO_H_
**/
#ifndef _TCP_IO_H_
#define _TCP_IO_H_
#include <Protocol/Tcp4.h>
#include <Protocol/Tcp6.h>
#include <Library/NetLib.h>
#include <Library/NetLib.h>
#define TCP_VERSION_4 IP_VERSION_4
#define TCP_VERSION_6 IP_VERSION_6
///
/// 10 seconds
///
///
/// 10 seconds
///
#define TCP_GET_MAPPING_TIMEOUT 100000000U
@ -40,12 +40,12 @@ typedef struct {
EFI_IPv4_ADDRESS RemoteIp;
UINT16 RemotePort;
BOOLEAN ActiveFlag;
} TCP4_IO_CONFIG_DATA;
} TCP4_IO_CONFIG_DATA;
typedef struct {
typedef struct {
UINT16 StationPort;
EFI_IPv6_ADDRESS RemoteIp;
UINT16 RemotePort;
UINT16 RemotePort;
BOOLEAN ActiveFlag;
} TCP6_IO_CONFIG_DATA;
@ -112,7 +112,7 @@ typedef struct {
@retval EFI_SUCCESS The TCP socket is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more of the control options are not
@retval EFI_UNSUPPORTED One or more of the control options are not
supported in the implementation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Failed to create the TCP socket or configure it.
@ -120,26 +120,26 @@ typedef struct {
**/
EFI_STATUS
EFIAPI
TcpIoCreateSocket (
IN EFI_HANDLE Image,
TcpIoCreateSocket (
IN EFI_HANDLE Image,
IN EFI_HANDLE Controller,
IN UINT8 TcpVersion,
IN TCP_IO_CONFIG_DATA *ConfigData,
OUT TCP_IO *TcpIo
);
/**
Destroy the socket.
@param[in] TcpIo The TcpIo which wraps the socket to be destroyed.
**/
VOID
IN UINT8 TcpVersion,
IN TCP_IO_CONFIG_DATA *ConfigData,
OUT TCP_IO *TcpIo
);
/**
Destroy the socket.
@param[in] TcpIo The TcpIo which wraps the socket to be destroyed.
**/
VOID
EFIAPI
TcpIoDestroySocket (
IN TCP_IO *TcpIo
);
TcpIoDestroySocket (
IN TCP_IO *TcpIo
);
/**
Connect to the other endpoint of the TCP socket.
@ -156,12 +156,12 @@ TcpIoDestroySocket (
@retval Others Other errors as indicated.
**/
EFI_STATUS
EFI_STATUS
EFIAPI
TcpIoConnect (
IN OUT TCP_IO *TcpIo,
IN EFI_EVENT Timeout
);
TcpIoConnect (
IN OUT TCP_IO *TcpIo,
IN EFI_EVENT Timeout
);
/**
Accept the incomding request from the other endpoint of the TCP socket.
@ -187,19 +187,19 @@ TcpIoAccept (
IN OUT TCP_IO *TcpIo,
IN EFI_EVENT Timeout
);
/**
Reset the socket.
@param[in, out] TcpIo The TcpIo wrapping the TCP socket.
**/
VOID
/**
Reset the socket.
@param[in, out] TcpIo The TcpIo wrapping the TCP socket.
**/
VOID
EFIAPI
TcpIoReset (
IN OUT TCP_IO *TcpIo
);
TcpIoReset (
IN OUT TCP_IO *TcpIo
);
/**
Transmit the Packet to the other endpoint of the socket.
@ -215,13 +215,13 @@ TcpIoReset (
@retval Others Other errors as indicated.
**/
EFI_STATUS
EFI_STATUS
EFIAPI
TcpIoTransmit (
IN TCP_IO *TcpIo,
IN NET_BUF *Packet
);
TcpIoTransmit (
IN TCP_IO *TcpIo,
IN NET_BUF *Packet
);
/**
Receive data from the socket.
@ -240,14 +240,14 @@ TcpIoTransmit (
@retval Others Other errors as indicated.
**/
EFI_STATUS
EFI_STATUS
EFIAPI
TcpIoReceive (
IN OUT TCP_IO *TcpIo,
IN NET_BUF *Packet,
IN BOOLEAN AsyncMode,
IN EFI_EVENT Timeout
);
TcpIoReceive (
IN OUT TCP_IO *TcpIo,
IN NET_BUF *Packet,
IN BOOLEAN AsyncMode,
IN EFI_EVENT Timeout
);
#endif

View File

@ -22,92 +22,92 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
/**
/**
The common notify function associated with various TcpIo events.
@param[in] Event The event signaled.
@param[in] Context The context.
**/
VOID
EFIAPI
@param[in] Event The event signaled.
@param[in] Context The context.
**/
VOID
EFIAPI
TcpIoCommonNotify (
IN EFI_EVENT Event,
IN VOID *Context
)
IN EFI_EVENT Event,
IN VOID *Context
)
{
if ((Event == NULL) || (Context == NULL)) {
return ;
}
*((BOOLEAN *) Context) = TRUE;
*((BOOLEAN *) Context) = TRUE;
}
/**
/**
The internal function for delay configuring TCP6 when IP6 driver is still in DAD.
@param[in] Tcp6 The EFI_TCP6_PROTOCOL protocol instance.
@param[in] Tcp6ConfigData The Tcp6 configuration data.
@retval EFI_SUCCESS The operational settings successfully
completed.
@param[in] Tcp6 The EFI_TCP6_PROTOCOL protocol instance.
@param[in] Tcp6ConfigData The Tcp6 configuration data.
@retval EFI_SUCCESS The operational settings successfully
completed.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval Others Failed to finish the operation.
**/
EFI_STATUS
**/
EFI_STATUS
TcpIoGetMapping (
IN EFI_TCP6_PROTOCOL *Tcp6,
IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData
)
{
EFI_STATUS Status;
EFI_EVENT Event;
IN EFI_TCP6_PROTOCOL *Tcp6,
IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData
)
{
EFI_STATUS Status;
EFI_EVENT Event;
if ((Tcp6 == NULL) || (Tcp6ConfigData == NULL)) {
return EFI_INVALID_PARAMETER;
}
Event = NULL;
Status = gBS->CreateEvent (
EVT_TIMER,
TPL_CALLBACK,
NULL,
NULL,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
Status = gBS->SetTimer (
Event,
TimerRelative,
Event = NULL;
Status = gBS->CreateEvent (
EVT_TIMER,
TPL_CALLBACK,
NULL,
NULL,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
Status = gBS->SetTimer (
Event,
TimerRelative,
TCP_GET_MAPPING_TIMEOUT
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
while (EFI_ERROR (gBS->CheckEvent (Event))) {
Tcp6->Poll (Tcp6);
Status = Tcp6->Configure (Tcp6, Tcp6ConfigData);
if (!EFI_ERROR (Status)) {
break;
}
}
ON_EXIT:
if (Event != NULL) {
gBS->CloseEvent (Event);
}
return Status;
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
while (EFI_ERROR (gBS->CheckEvent (Event))) {
Tcp6->Poll (Tcp6);
Status = Tcp6->Configure (Tcp6, Tcp6ConfigData);
if (!EFI_ERROR (Status)) {
break;
}
}
ON_EXIT:
if (Event != NULL) {
gBS->CloseEvent (Event);
}
return Status;
}
/**
@ -121,7 +121,7 @@ ON_EXIT:
@retval EFI_SUCCESS The TCP socket is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more of the control options are not
@retval EFI_UNSUPPORTED One or more of the control options are not
supported in the implementation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Failed to create the TCP socket or configure it.
@ -177,26 +177,26 @@ TcpIoCreateSocket (
//
// Create the TCP child instance and get the TCP protocol.
//
Status = NetLibCreateServiceChild (
Controller,
Image,
Status = NetLibCreateServiceChild (
Controller,
Image,
ServiceBindingGuid,
&TcpIo->Handle
);
if (EFI_ERROR (Status)) {
return Status;
}
Status = gBS->OpenProtocol (
);
if (EFI_ERROR (Status)) {
return Status;
}
Status = gBS->OpenProtocol (
TcpIo->Handle,
ProtocolGuid,
Interface,
Image,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
Image,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status) || (*Interface == NULL)) {
goto ON_ERROR;
goto ON_ERROR;
}
if (TcpVersion == TCP_VERSION_4) {
@ -204,28 +204,28 @@ TcpIoCreateSocket (
} else {
Tcp6 = TcpIo->Tcp.Tcp6;
}
TcpIo->Image = Image;
TcpIo->Controller = Controller;
//
// Set the configuration parameters.
//
ControlOption.ReceiveBufferSize = 0x200000;
ControlOption.SendBufferSize = 0x200000;
ControlOption.MaxSynBackLog = 0;
ControlOption.ConnectionTimeout = 0;
ControlOption.DataRetries = 6;
ControlOption.FinTimeout = 0;
ControlOption.TimeWaitTimeout = 0;
ControlOption.KeepAliveProbes = 4;
ControlOption.KeepAliveTime = 0;
ControlOption.KeepAliveInterval = 0;
ControlOption.EnableNagle = FALSE;
ControlOption.EnableTimeStamp = FALSE;
ControlOption.EnableWindowScaling = TRUE;
ControlOption.EnableSelectiveAck = FALSE;
ControlOption.EnablePathMtuDiscovery = FALSE;
//
// Set the configuration parameters.
//
ControlOption.ReceiveBufferSize = 0x200000;
ControlOption.SendBufferSize = 0x200000;
ControlOption.MaxSynBackLog = 0;
ControlOption.ConnectionTimeout = 0;
ControlOption.DataRetries = 6;
ControlOption.FinTimeout = 0;
ControlOption.TimeWaitTimeout = 0;
ControlOption.KeepAliveProbes = 4;
ControlOption.KeepAliveTime = 0;
ControlOption.KeepAliveInterval = 0;
ControlOption.EnableNagle = FALSE;
ControlOption.EnableTimeStamp = FALSE;
ControlOption.EnableWindowScaling = TRUE;
ControlOption.EnableSelectiveAck = FALSE;
ControlOption.EnablePathMtuDiscovery = FALSE;
if (TcpVersion == TCP_VERSION_4) {
Tcp4ConfigData.TypeOfService = 8;
@ -309,59 +309,59 @@ TcpIoCreateSocket (
}
}
//
// Create events for variuos asynchronous operations.
//
// Create events for variuos asynchronous operations.
//
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
TcpIoCommonNotify,
&TcpIo->IsConnDone,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
TcpIo->ConnToken.Tcp4Token.CompletionToken.Event = Event;
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
TcpIoCommonNotify,
&TcpIo->IsListenDone,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
TcpIo->ListenToken.Tcp4Token.CompletionToken.Event = Event;
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
TcpIoCommonNotify,
&TcpIo->IsTxDone,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
TcpIo->TxToken.Tcp4Token.CompletionToken.Event = Event;
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
TcpIoCommonNotify,
&TcpIo->IsRxDone,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
TcpIo->RxToken.Tcp4Token.CompletionToken.Event = Event;
@ -373,26 +373,26 @@ TcpIoCreateSocket (
TcpIo->RxToken.Tcp4Token.Packet.RxData = RxData;
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
TcpIoCommonNotify,
&TcpIo->IsCloseDone,
&Event
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
TcpIo->CloseToken.Tcp4Token.CompletionToken.Event = Event;
return EFI_SUCCESS;
ON_ERROR:
ON_ERROR:
TcpIoDestroySocket (TcpIo);
return Status;
}
@ -482,7 +482,7 @@ TcpIoDestroySocket (
if ((Tcp4 != NULL) || (Tcp6 != NULL)) {
gBS->CloseProtocol (
gBS->CloseProtocol (
TcpIo->Handle,
ProtocolGuid,
TcpIo->Image,
@ -518,7 +518,7 @@ TcpIoDestroySocket (
}
}
NetLibDestroyServiceChild (
NetLibDestroyServiceChild (
TcpIo->Controller,
TcpIo->Image,
ServiceBindingGuid,
@ -572,24 +572,24 @@ TcpIoConnect (
return EFI_UNSUPPORTED;
}
if (EFI_ERROR (Status)) {
return Status;
}
if (EFI_ERROR (Status)) {
return Status;
}
while (!TcpIo->IsConnDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {
if (TcpIo->TcpVersion == TCP_VERSION_4) {
Tcp4->Poll (Tcp4);
} else {
Tcp6->Poll (Tcp6);
}
}
}
if (!TcpIo->IsConnDone) {
Status = EFI_TIMEOUT;
Status = EFI_TIMEOUT;
} else {
Status = TcpIo->ConnToken.Tcp4Token.CompletionToken.Status;
}
return Status;
}
@ -642,8 +642,8 @@ TcpIoAccept (
return EFI_UNSUPPORTED;
}
if (EFI_ERROR (Status)) {
return Status;
if (EFI_ERROR (Status)) {
return Status;
}
while (!TcpIo->IsListenDone && EFI_ERROR (gBS->CheckEvent (Timeout))) {
@ -652,18 +652,18 @@ TcpIoAccept (
} else {
Tcp6->Poll (Tcp6);
}
}
}
if (!TcpIo->IsListenDone) {
Status = EFI_TIMEOUT;
Status = EFI_TIMEOUT;
} else {
Status = TcpIo->ListenToken.Tcp4Token.CompletionToken.Status;
}
//
// The new TCP instance handle created for the established connection is
// in ListenToken.
//
//
// The new TCP instance handle created for the established connection is
// in ListenToken.
//
if (!EFI_ERROR (Status)) {
if (TcpIo->TcpVersion == TCP_VERSION_4) {
ProtocolGuid = &gEfiTcp4ProtocolGuid;
@ -671,16 +671,16 @@ TcpIoAccept (
ProtocolGuid = &gEfiTcp6ProtocolGuid;
}
Status = gBS->OpenProtocol (
Status = gBS->OpenProtocol (
TcpIo->ListenToken.Tcp4Token.NewChildHandle,
ProtocolGuid,
(VOID **) (&TcpIo->NewTcp.Tcp4),
TcpIo->Image,
TcpIo->Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
}
EFI_OPEN_PROTOCOL_BY_DRIVER
);
}
return Status;
}
@ -721,10 +721,10 @@ TcpIoReset (
return ;
}
if (EFI_ERROR (Status)) {
return ;
}
if (EFI_ERROR (Status)) {
return ;
}
while (!TcpIo->IsCloseDone) {
if (TcpIo->TcpVersion == TCP_VERSION_4) {
Tcp4->Poll (Tcp4);
@ -780,16 +780,16 @@ TcpIoTransmit (
Data = AllocatePool (Size);
if (Data == NULL) {
return EFI_OUT_OF_RESOURCES;
return EFI_OUT_OF_RESOURCES;
}
((EFI_TCP4_TRANSMIT_DATA *) Data)->Push = TRUE;
((EFI_TCP4_TRANSMIT_DATA *) Data)->Urgent = FALSE;
((EFI_TCP4_TRANSMIT_DATA *) Data)->DataLength = Packet->TotalSize;
//
// Build the fragment table.
//
//
// Build the fragment table.
//
((EFI_TCP4_TRANSMIT_DATA *) Data)->FragmentCount = Packet->BlockOpNum;
NetbufBuildExt (
@ -802,8 +802,8 @@ TcpIoTransmit (
Tcp6 = NULL;
Status = EFI_DEVICE_ERROR;
//
// Trasnmit the packet.
//
// Trasnmit the packet.
//
if (TcpIo->TcpVersion == TCP_VERSION_4) {
TcpIo->TxToken.Tcp4Token.Packet.TxData = (EFI_TCP4_TRANSMIT_DATA *) Data;
@ -831,25 +831,25 @@ TcpIoTransmit (
Status = Tcp6->Transmit (Tcp6, &TcpIo->TxToken.Tcp6Token);
}
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
while (!TcpIo->IsTxDone) {
if (TcpIo->TcpVersion == TCP_VERSION_4) {
Tcp4->Poll (Tcp4);
} else {
Tcp6->Poll (Tcp6);
}
}
}
TcpIo->IsTxDone = FALSE;
Status = TcpIo->TxToken.Tcp4Token.CompletionToken.Status;
ON_EXIT:
ON_EXIT:
FreePool (Data);
return Status;
}
@ -926,22 +926,22 @@ TcpIoReceive (
return EFI_UNSUPPORTED;
}
FragmentCount = Packet->BlockOpNum;
Fragment = AllocatePool (FragmentCount * sizeof (NET_FRAGMENT));
FragmentCount = Packet->BlockOpNum;
Fragment = AllocatePool (FragmentCount * sizeof (NET_FRAGMENT));
if (Fragment == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
//
// Build the fragment table.
//
NetbufBuildExt (Packet, Fragment, &FragmentCount);
}
//
// Build the fragment table.
//
NetbufBuildExt (Packet, Fragment, &FragmentCount);
RxData->FragmentCount = 1;
CurrentFragment = 0;
Status = EFI_SUCCESS;
while (CurrentFragment < FragmentCount) {
Status = EFI_SUCCESS;
while (CurrentFragment < FragmentCount) {
RxData->DataLength = Fragment[CurrentFragment].Len;
RxData->FragmentTable[0].FragmentLength = Fragment[CurrentFragment].Len;
RxData->FragmentTable[0].FragmentBuffer = Fragment[CurrentFragment].Bulk;
@ -952,9 +952,9 @@ TcpIoReceive (
Status = Tcp6->Receive (Tcp6, &TcpIo->RxToken.Tcp6Token);
}
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
while (!TcpIo->IsRxDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) {
//
@ -966,42 +966,42 @@ TcpIoReceive (
Tcp6->Poll (Tcp6);
}
}
if (!TcpIo->IsRxDone) {
//
// Timeout occurs, cancel the receive request.
//
//
// Timeout occurs, cancel the receive request.
//
if (TcpIo->TcpVersion == TCP_VERSION_4) {
Tcp4->Cancel (Tcp4, &TcpIo->RxToken.Tcp4Token.CompletionToken);
} else {
Tcp6->Cancel (Tcp6, &TcpIo->RxToken.Tcp6Token.CompletionToken);
}
Status = EFI_TIMEOUT;
goto ON_EXIT;
} else {
Status = EFI_TIMEOUT;
goto ON_EXIT;
} else {
TcpIo->IsRxDone = FALSE;
}
Status = TcpIo->RxToken.Tcp4Token.CompletionToken.Status;
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
goto ON_EXIT;
}
Fragment[CurrentFragment].Len -= RxData->FragmentTable[0].FragmentLength;
if (Fragment[CurrentFragment].Len == 0) {
CurrentFragment++;
} else {
if (Fragment[CurrentFragment].Len == 0) {
CurrentFragment++;
} else {
Fragment[CurrentFragment].Bulk += RxData->FragmentTable[0].FragmentLength;
}
}
ON_EXIT:
}
}
ON_EXIT:
if (Fragment != NULL) {
FreePool (Fragment);
}
return Status;
}

File diff suppressed because it is too large Load Diff

View File

@ -254,15 +254,15 @@ PxeBcDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
//
//
// Get max packet size from Ip4 to calculate block size for Tftp later.
//
Status = Private->Ip4->GetModeData (Private->Ip4, &Ip4ModeData, NULL, NULL);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
//
Status = Private->Ip4->GetModeData (Private->Ip4, &Ip4ModeData, NULL, NULL);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
Private->Ip4MaxPacketSize = Ip4ModeData.MaxPacketSize;
Status = NetLibCreateServiceChild (

View File

@ -50,7 +50,7 @@ typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
#define PXEBC_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('P', 'X', 'E', 'P')
#define PXEBC_MTFTP_TIMEOUT 4
#define PXEBC_MTFTP_RETRIES 6
#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8
#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8
#define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE 4
#define PXEBC_DEFAULT_PACKET_SIZE 1480
#define PXEBC_DEFAULT_LIFETIME 50000 // 50ms, unit is microsecond

View File

@ -1,97 +1,97 @@
## @file
# Component description file for SMM Variable module.
#
# This module installs SMM variable protocol into SMM protocol database,
# which can be used by SMM driver, and installs SMM variable protocol
# into BS protocol database, which can be used to notify the SMM Runtime
# Dxe driver that the SMM variable service is ready.
# This module should be used with SMM Runtime DXE module together. The
# SMM Runtime DXE module would install variable arch protocol and variable
# write arch protocol based on SMM variable module.
#
# Caution: This module requires additional review when modified.
# This driver will have external input - variable data and communicate buffer in SMM mode.
# This external input must be validated carefully to avoid security issue like
# buffer overflow, integer overflow.
#
# Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = VariableSmm
FILE_GUID = 23A089B3-EED5-4ac5-B2AB-43E3298C2343
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
PI_SPECIFICATION_VERSION = 0x0001000A
ENTRY_POINT = VariableServiceInitialize
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
Reclaim.c
Variable.c
VariableSmm.c
Variable.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiDriverEntryPoint
MemoryAllocationLib
BaseLib
SynchronizationLib
UefiLib
SmmServicesTableLib
BaseMemoryLib
DebugLib
DxeServicesTableLib
HobLib
PcdLib
[Protocols]
gEfiSmmFirmwareVolumeBlockProtocolGuid ## SOMETIMES_CONSUMES
gEfiSmmVariableProtocolGuid ## ALWAYS_PRODUCES
gEfiSmmFaultTolerantWriteProtocolGuid ## SOMETIMES_CONSUMES
gEfiSmmAccess2ProtocolGuid ## ALWAYS_CONSUMES
gEfiSmmEndOfDxeProtocolGuid ## ALWAYS_CONSUMES
[Guids]
gEfiVariableGuid ## PRODUCES ## Configuration Table Guid
gEfiGlobalVariableGuid ## PRODUCES ## Variable Guid
gSmmVariableWriteGuid ## PRODUCES ## SMM Variable Write Guid
gEfiSystemNvDataFvGuid ## CONSUMES
gEfiHardwareErrorVariableGuid ## SOMETIMES_CONSUMES
gEdkiiFaultTolerantWriteGuid ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## SOMETIME_CONSUMES (statistic the information of variable.)
[Depex]
TRUE
## @file
# Component description file for SMM Variable module.
#
# This module installs SMM variable protocol into SMM protocol database,
# which can be used by SMM driver, and installs SMM variable protocol
# into BS protocol database, which can be used to notify the SMM Runtime
# Dxe driver that the SMM variable service is ready.
# This module should be used with SMM Runtime DXE module together. The
# SMM Runtime DXE module would install variable arch protocol and variable
# write arch protocol based on SMM variable module.
#
# Caution: This module requires additional review when modified.
# This driver will have external input - variable data and communicate buffer in SMM mode.
# This external input must be validated carefully to avoid security issue like
# buffer overflow, integer overflow.
#
# Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = VariableSmm
FILE_GUID = 23A089B3-EED5-4ac5-B2AB-43E3298C2343
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
PI_SPECIFICATION_VERSION = 0x0001000A
ENTRY_POINT = VariableServiceInitialize
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
Reclaim.c
Variable.c
VariableSmm.c
Variable.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiDriverEntryPoint
MemoryAllocationLib
BaseLib
SynchronizationLib
UefiLib
SmmServicesTableLib
BaseMemoryLib
DebugLib
DxeServicesTableLib
HobLib
PcdLib
[Protocols]
gEfiSmmFirmwareVolumeBlockProtocolGuid ## SOMETIMES_CONSUMES
gEfiSmmVariableProtocolGuid ## ALWAYS_PRODUCES
gEfiSmmFaultTolerantWriteProtocolGuid ## SOMETIMES_CONSUMES
gEfiSmmAccess2ProtocolGuid ## ALWAYS_CONSUMES
gEfiSmmEndOfDxeProtocolGuid ## ALWAYS_CONSUMES
[Guids]
gEfiVariableGuid ## PRODUCES ## Configuration Table Guid
gEfiGlobalVariableGuid ## PRODUCES ## Variable Guid
gSmmVariableWriteGuid ## PRODUCES ## SMM Variable Write Guid
gEfiSystemNvDataFvGuid ## CONSUMES
gEfiHardwareErrorVariableGuid ## SOMETIMES_CONSUMES
gEdkiiFaultTolerantWriteGuid ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## SOMETIME_CONSUMES (statistic the information of variable.)
[Depex]
TRUE