Make MdeModulePkg GCC clean.
It also pass ICC+IPF and MYTOOLS+EBC build. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -368,7 +368,6 @@ EhcEnablePeriodSchd (
|
|||||||
@return EFI_DEVICE_ERROR : Fail to disable periodic schedule
|
@return EFI_DEVICE_ERROR : Fail to disable periodic schedule
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EhcDisablePeriodSchd (
|
EhcDisablePeriodSchd (
|
||||||
IN USB2_HC_DEV *Ehc,
|
IN USB2_HC_DEV *Ehc,
|
||||||
@@ -422,7 +421,6 @@ EhcEnableAsyncSchd (
|
|||||||
@return Others : Failed to disable the asynchronous schedule
|
@return Others : Failed to disable the asynchronous schedule
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EhcDisableAsyncSchd (
|
EhcDisableAsyncSchd (
|
||||||
IN USB2_HC_DEV *Ehc,
|
IN USB2_HC_DEV *Ehc,
|
||||||
|
@@ -547,7 +547,7 @@ SCSIBusDriverBindingStop (
|
|||||||
gBS->OpenProtocol (
|
gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiExtScsiPassThruProtocolGuid,
|
&gEfiExtScsiPassThruProtocolGuid,
|
||||||
(VOID **) &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
|
&ScsiPassThru,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
ChildHandleBuffer[Index],
|
ChildHandleBuffer[Index],
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
@@ -556,7 +556,7 @@ SCSIBusDriverBindingStop (
|
|||||||
gBS->OpenProtocol (
|
gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiScsiPassThruProtocolGuid,
|
&gEfiScsiPassThruProtocolGuid,
|
||||||
(VOID **) &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
|
&ScsiPassThru,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
ChildHandleBuffer[Index],
|
ChildHandleBuffer[Index],
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
|
@@ -70,7 +70,7 @@ typedef struct {
|
|||||||
//
|
//
|
||||||
#define EFI_SCSI_BUS_PROTOCOL_GUID \
|
#define EFI_SCSI_BUS_PROTOCOL_GUID \
|
||||||
{ \
|
{ \
|
||||||
0x5261213D, 0x3A3D, 0x441E, 0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17 \
|
0x5261213D, 0x3A3D, 0x441E, {0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17} \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct _EFI_SCSI_BUS_PROTOCOL {
|
typedef struct _EFI_SCSI_BUS_PROTOCOL {
|
||||||
|
@@ -284,7 +284,6 @@ UsbHubCtrlGetPortStatus (
|
|||||||
@retval Others Failed to reset the port
|
@retval Others Failed to reset the port
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UsbHubCtrlResetTT (
|
UsbHubCtrlResetTT (
|
||||||
IN USB_DEVICE *HubDev,
|
IN USB_DEVICE *HubDev,
|
||||||
@@ -319,7 +318,6 @@ UsbHubCtrlResetTT (
|
|||||||
@retval Others Failed to set the feature
|
@retval Others Failed to set the feature
|
||||||
|
|
||||||
**/
|
**/
|
||||||
STATIC
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UsbHubCtrlSetHubFeature (
|
UsbHubCtrlSetHubFeature (
|
||||||
IN USB_DEVICE *HubDev,
|
IN USB_DEVICE *HubDev,
|
||||||
|
@@ -84,7 +84,7 @@ enum {
|
|||||||
#define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
|
#define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
|
||||||
|
|
||||||
#define EFI_USB_BUS_PROTOCOL_GUID \
|
#define EFI_USB_BUS_PROTOCOL_GUID \
|
||||||
{0x2B2F68CC, 0x0CD2, 0x44cf, 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}
|
{0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}
|
||||||
|
|
||||||
#define USB_INTERFACE_FROM_USBIO(a) \
|
#define USB_INTERFACE_FROM_USBIO(a) \
|
||||||
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)
|
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)
|
||||||
|
@@ -98,7 +98,7 @@ USBKeyboardCheckForKey (
|
|||||||
);
|
);
|
||||||
|
|
||||||
EFI_GUID gEfiUsbKeyboardDriverGuid = {
|
EFI_GUID gEfiUsbKeyboardDriverGuid = {
|
||||||
0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c
|
0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c}
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -330,7 +330,7 @@ USBKeyboardDriverBindingStart (
|
|||||||
//
|
//
|
||||||
// We only care interrupt endpoint here
|
// We only care interrupt endpoint here
|
||||||
//
|
//
|
||||||
UsbKeyboardDevice->IntEndpointDescriptor = EndpointDescriptor;
|
CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));
|
||||||
Found = TRUE;
|
Found = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -108,14 +108,14 @@ UsbBotInit (
|
|||||||
(UsbBot->BulkInEndpoint == NULL)) {
|
(UsbBot->BulkInEndpoint == NULL)) {
|
||||||
|
|
||||||
UsbBot->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);
|
UsbBot->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);
|
||||||
*UsbBot->BulkInEndpoint = EndPoint;
|
CopyMem(UsbBot->BulkInEndpoint, &EndPoint, sizeof (EndPoint));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
|
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
|
||||||
(UsbBot->BulkOutEndpoint == NULL)) {
|
(UsbBot->BulkOutEndpoint == NULL)) {
|
||||||
|
|
||||||
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;
|
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;
|
||||||
*UsbBot->BulkOutEndpoint = EndPoint;
|
CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -111,14 +111,14 @@ UsbCbiInit (
|
|||||||
(UsbCbi->BulkInEndpoint == NULL)) {
|
(UsbCbi->BulkInEndpoint == NULL)) {
|
||||||
|
|
||||||
UsbCbi->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);
|
UsbCbi->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);
|
||||||
*UsbCbi->BulkInEndpoint = EndPoint;
|
CopyMem(UsbCbi->BulkInEndpoint, &EndPoint, sizeof (EndPoint));;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
|
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
|
||||||
(UsbCbi->BulkOutEndpoint == NULL)) {
|
(UsbCbi->BulkOutEndpoint == NULL)) {
|
||||||
|
|
||||||
UsbCbi->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;
|
UsbCbi->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;
|
||||||
*UsbCbi->BulkOutEndpoint = EndPoint;
|
CopyMem(UsbCbi->BulkOutEndpoint, &EndPoint, sizeof (EndPoint));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {
|
} else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {
|
||||||
@@ -129,7 +129,7 @@ UsbCbiInit (
|
|||||||
(UsbCbi->InterruptEndpoint == NULL)) {
|
(UsbCbi->InterruptEndpoint == NULL)) {
|
||||||
|
|
||||||
UsbCbi->InterruptEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;
|
UsbCbi->InterruptEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;
|
||||||
*UsbCbi->InterruptEndpoint = EndPoint;
|
CopyMem(UsbCbi->InterruptEndpoint, &EndPoint, sizeof (EndPoint));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -77,7 +77,7 @@ USBMouseDriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
EFI_GUID gEfiUsbMouseDriverGuid = {
|
EFI_GUID gEfiUsbMouseDriverGuid = {
|
||||||
0x290156b5, 0x6a05, 0x4ac0, 0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29
|
0x290156b5, 0x6a05, 0x4ac0, {0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29}
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
||||||
|
@@ -188,7 +188,7 @@ typedef struct {
|
|||||||
//
|
//
|
||||||
#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))
|
#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))
|
||||||
#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))
|
#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))
|
||||||
#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem (&(Ip1), &(Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
|
#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
|
||||||
|
|
||||||
INTN
|
INTN
|
||||||
NetGetMaskLength (
|
NetGetMaskLength (
|
||||||
@@ -249,7 +249,7 @@ extern EFI_IPv4_ADDRESS mZeroIp4Addr;
|
|||||||
|
|
||||||
#define NET_MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define NET_MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#define NET_MAX(a, b) ((a) > (b) ? (a) : (b))
|
#define NET_MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
#define NET_RANDOM(Seed) (((Seed) * 1103515245L + 12345) % 4294967295L)
|
#define NET_RANDOM(Seed) ((UINT32) ((UINT32) (Seed) * 1103515245UL + 12345) % 4294967295UL)
|
||||||
|
|
||||||
|
|
||||||
UINT32
|
UINT32
|
||||||
|
@@ -99,7 +99,7 @@ typedef struct {
|
|||||||
EFI_UDP4_TRANSMIT_DATA UdpTxData;
|
EFI_UDP4_TRANSMIT_DATA UdpTxData;
|
||||||
} UDP_TX_TOKEN;
|
} UDP_TX_TOKEN;
|
||||||
|
|
||||||
typedef struct _UDP_IO_PORT {
|
struct _UDP_IO_PORT {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
NET_LIST_ENTRY Link;
|
NET_LIST_ENTRY Link;
|
||||||
INTN RefCnt;
|
INTN RefCnt;
|
||||||
|
@@ -38,7 +38,7 @@ Abstract:
|
|||||||
|
|
||||||
typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;
|
typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;
|
||||||
|
|
||||||
typedef enum {
|
enum {
|
||||||
//
|
//
|
||||||
// Config source: dhcp or static
|
// Config source: dhcp or static
|
||||||
//
|
//
|
||||||
@@ -111,7 +111,6 @@ EFI_STATUS
|
|||||||
IN NIC_ADDR *NicAddr OPTIONAL
|
IN NIC_ADDR *NicAddr OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
|
||||||
struct _EFI_NIC_IP4_CONFIG_PROTOCOL {
|
struct _EFI_NIC_IP4_CONFIG_PROTOCOL {
|
||||||
EFI_NIC_IP4_CONFIG_GET_NAME GetName;
|
EFI_NIC_IP4_CONFIG_GET_NAME GetName;
|
||||||
EFI_NIC_IP4_CONFIG_GET_INFO GetInfo;
|
EFI_NIC_IP4_CONFIG_GET_INFO GetInfo;
|
||||||
|
@@ -47,8 +47,8 @@ EFI_IP4_CONFIG_DATA mIpIoDefaultIpConfigData = {
|
|||||||
FALSE,
|
FALSE,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE,
|
FALSE,
|
||||||
{0, 0, 0, 0},
|
{{0, 0, 0, 0}},
|
||||||
{0, 0, 0, 0},
|
{{0, 0, 0, 0}},
|
||||||
0,
|
0,
|
||||||
255,
|
255,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
@@ -77,7 +77,7 @@ IP4_ADDR mIp4AllMasks[IP4_MASK_NUM] = {
|
|||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_IPv4_ADDRESS mZeroIp4Addr = {0, 0, 0, 0};
|
EFI_IPv4_ADDRESS mZeroIp4Addr = {{0, 0, 0, 0}};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts the low nibble of a byte to hex unicode character.
|
Converts the low nibble of a byte to hex unicode character.
|
||||||
|
@@ -88,7 +88,7 @@ TERMINAL_DEV gTerminalDevTemplate = {
|
|||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
{ 0 }
|
{ {0} }
|
||||||
},
|
},
|
||||||
NULL, // ControllerNameTable
|
NULL, // ControllerNameTable
|
||||||
NULL,
|
NULL,
|
||||||
|
@@ -755,7 +755,7 @@ DhcpHandleRequest (
|
|||||||
//
|
//
|
||||||
Message = NULL;
|
Message = NULL;
|
||||||
|
|
||||||
if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
|
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
|
||||||
Message = "Lease confirmed isn't the same as that in the offer";
|
Message = "Lease confirmed isn't the same as that in the offer";
|
||||||
goto REJECT;
|
goto REJECT;
|
||||||
}
|
}
|
||||||
@@ -846,7 +846,7 @@ DhcpHandleRenewRebind (
|
|||||||
// The lease is different from the selected. Don't send a DECLINE
|
// The lease is different from the selected. Don't send a DECLINE
|
||||||
// since it isn't existed in the client's FSM.
|
// since it isn't existed in the client's FSM.
|
||||||
//
|
//
|
||||||
if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
|
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -655,7 +655,7 @@ Ip4ConfigOnDhcp4Complete (
|
|||||||
//
|
//
|
||||||
// Create a route if there is a default router.
|
// Create a route if there is a default router.
|
||||||
//
|
//
|
||||||
if (!EFI_IP4_EQUAL (Dhcp4Mode.RouterAddress, mZeroIp4Addr)) {
|
if (!EFI_IP4_EQUAL (&Dhcp4Mode.RouterAddress, &mZeroIp4Addr)) {
|
||||||
Ip4Config->RouteTableSize = 2;
|
Ip4Config->RouteTableSize = 2;
|
||||||
|
|
||||||
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));
|
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));
|
||||||
|
@@ -860,8 +860,8 @@ EfiIp4Configure (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Current->UseDefaultAddress &&
|
if (!Current->UseDefaultAddress &&
|
||||||
(!EFI_IP4_EQUAL (Current->StationAddress, IpConfigData->StationAddress) ||
|
(!EFI_IP4_EQUAL (&Current->StationAddress, &IpConfigData->StationAddress) ||
|
||||||
!EFI_IP4_EQUAL (Current->SubnetMask, IpConfigData->SubnetMask))) {
|
!EFI_IP4_EQUAL (&Current->SubnetMask, &IpConfigData->SubnetMask))) {
|
||||||
Status = EFI_ALREADY_STARTED;
|
Status = EFI_ALREADY_STARTED;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
@@ -978,7 +978,7 @@ Ip4Groups (
|
|||||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||||
Group = IpInstance->Groups[Index - 1];
|
Group = IpInstance->Groups[Index - 1];
|
||||||
|
|
||||||
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (Group, *GroupAddress)) {
|
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
|
||||||
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
|
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
@@ -306,7 +306,7 @@ Ip4Output (
|
|||||||
// them. Tag each fragment other than the first one as spawn from it.
|
// them. Tag each fragment other than the first one as spawn from it.
|
||||||
//
|
//
|
||||||
Mtu = IpSb->SnpMode.MaxPacketSize;
|
Mtu = IpSb->SnpMode.MaxPacketSize;
|
||||||
HeadLen = sizeof (IP4_HEAD) + (OptLen + 3) &~0x03;
|
HeadLen = sizeof (IP4_HEAD) + ((OptLen + 3) & (~0x03));
|
||||||
Head->Id = mIp4Id++;
|
Head->Id = mIp4Id++;
|
||||||
|
|
||||||
if (Packet->TotalSize + HeadLen > Mtu) {
|
if (Packet->TotalSize + HeadLen > Mtu) {
|
||||||
|
@@ -59,7 +59,7 @@ EfiMtftp4GetModeData (
|
|||||||
OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
|
OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
|
||||||
|
|
||||||
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
|
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
|
||||||
ModeData->ConfigData = Instance->Config;
|
CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));
|
||||||
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
|
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
|
||||||
ModeData->SupportedOptoins = mMtftp4SupportedOptions;
|
ModeData->SupportedOptoins = mMtftp4SupportedOptions;
|
||||||
ModeData->UnsupportedOptionCount = 0;
|
ModeData->UnsupportedOptionCount = 0;
|
||||||
@@ -228,7 +228,7 @@ EfiMtftp4Configure (
|
|||||||
return EFI_ACCESS_DENIED;
|
return EFI_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance->Config = *ConfigData;
|
CopyMem(&Instance->Config, ConfigData, sizeof (*ConfigData));;
|
||||||
Instance->State = MTFTP4_STATE_CONFIGED;
|
Instance->State = MTFTP4_STATE_CONFIGED;
|
||||||
|
|
||||||
NET_RESTORE_TPL (OldTpl);
|
NET_RESTORE_TPL (OldTpl);
|
||||||
|
@@ -1146,9 +1146,6 @@ PxebcBisDetect (
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID *BCNotifyReg;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.
|
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.
|
||||||
|
|
||||||
@@ -1559,7 +1556,7 @@ BcStop (
|
|||||||
return StatCode;
|
return StatCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };
|
const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -51,7 +51,7 @@ Abstract:
|
|||||||
|
|
||||||
#define SUPPORT_IPV6 0
|
#define SUPPORT_IPV6 0
|
||||||
|
|
||||||
#define PXE_BASECODE_DEVICE_SIGNATURE 'pxed'
|
#define PXE_BASECODE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'd')
|
||||||
|
|
||||||
//
|
//
|
||||||
// Determine the classes of IPv4 address
|
// Determine the classes of IPv4 address
|
||||||
@@ -166,7 +166,7 @@ typedef struct {
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
#define LOADFILE_DEVICE_SIGNATURE 'pxel'
|
#define LOADFILE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'l')
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
|
@@ -26,8 +26,8 @@ STATIC EFI_PXE_BASE_CODE_UDP_PORT DhcpServerPort = DHCP_SERVER_PORT;
|
|||||||
STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;
|
STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;
|
||||||
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;
|
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;
|
||||||
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort
|
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort
|
||||||
STATIC EFI_IP_ADDRESS BroadcastIP = { 0xffffffff };
|
STATIC EFI_IP_ADDRESS BroadcastIP = {{0xffffffff}};
|
||||||
STATIC EFI_IP_ADDRESS DefaultSubnetMask = { 0xffffff00 };
|
STATIC EFI_IP_ADDRESS DefaultSubnetMask = {{0xffffff00}};
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
DHCPV4_OP_STRUCT *OpPtr;
|
DHCPV4_OP_STRUCT *OpPtr;
|
||||||
@@ -1470,7 +1470,7 @@ Release (
|
|||||||
|
|
||||||
CopyMem (
|
CopyMem (
|
||||||
&DHCPRELEASEoptions.DhcServerIpPtr,
|
&DHCPRELEASEoptions.DhcServerIpPtr,
|
||||||
&(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
|
(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
|
||||||
sizeof DHCPRELEASEoptions.DhcServerIpPtr
|
sizeof DHCPRELEASEoptions.DhcServerIpPtr
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -681,6 +681,8 @@ Tcp4Dispatcher (
|
|||||||
|
|
||||||
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);
|
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@@ -35,7 +35,7 @@ NET_LIST_ENTRY mTcpListenQue = {
|
|||||||
|
|
||||||
TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;
|
TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;
|
||||||
|
|
||||||
STATIC CHAR16 *mTcpStateName[] = {
|
CHAR16 *mTcpStateName[] = {
|
||||||
L"TCP_CLOSED",
|
L"TCP_CLOSED",
|
||||||
L"TCP_LISTEN",
|
L"TCP_LISTEN",
|
||||||
L"TCP_SYN_SENT",
|
L"TCP_SYN_SENT",
|
||||||
@@ -267,7 +267,7 @@ TcpFindTcbByPeer (
|
|||||||
NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
|
NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
|
||||||
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
||||||
|
|
||||||
if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
|
if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
|
||||||
(LocalPort == Tcb->LocalEnd.Port)) {
|
(LocalPort == Tcb->LocalEnd.Port)) {
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -277,7 +277,7 @@ TcpFindTcbByPeer (
|
|||||||
NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
|
NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
|
||||||
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
|
||||||
|
|
||||||
if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
|
if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
|
||||||
(LocalPort == Tcb->LocalEnd.Port)) {
|
(LocalPort == Tcb->LocalEnd.Port)) {
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -33,7 +33,6 @@ TcpGetUint16 (
|
|||||||
return NTOHS (Value);
|
return NTOHS (Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC
|
|
||||||
VOID
|
VOID
|
||||||
TcpPutUint16 (
|
TcpPutUint16 (
|
||||||
IN UINT8 *Buf,
|
IN UINT8 *Buf,
|
||||||
|
@@ -424,7 +424,7 @@ Udp4FindInstanceByPort (
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_IP4_EQUAL (ConfigData->StationAddress, *Address) &&
|
if (EFI_IP4_EQUAL (&ConfigData->StationAddress, Address) &&
|
||||||
(ConfigData->StationPort == Port)) {
|
(ConfigData->StationPort == Port)) {
|
||||||
//
|
//
|
||||||
// if both the address and the port are the same, return TRUE.
|
// if both the address and the port are the same, return TRUE.
|
||||||
@@ -566,8 +566,8 @@ Udp4IsReconfigurable (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!NewConfigData->UseDefaultAddress &&
|
if (!NewConfigData->UseDefaultAddress &&
|
||||||
(!EFI_IP4_EQUAL (NewConfigData->StationAddress, OldConfigData->StationAddress) ||
|
(!EFI_IP4_EQUAL (&NewConfigData->StationAddress, &OldConfigData->StationAddress) ||
|
||||||
!EFI_IP4_EQUAL (NewConfigData->SubnetMask, OldConfigData->SubnetMask))) {
|
!EFI_IP4_EQUAL (&NewConfigData->SubnetMask, &OldConfigData->SubnetMask))) {
|
||||||
//
|
//
|
||||||
// If the instance doesn't use the default address, and the new address or
|
// If the instance doesn't use the default address, and the new address or
|
||||||
// new subnet mask is different from the old values.
|
// new subnet mask is different from the old values.
|
||||||
@@ -576,14 +576,14 @@ Udp4IsReconfigurable (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, OldConfigData->RemoteAddress)) {
|
if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &OldConfigData->RemoteAddress)) {
|
||||||
//
|
//
|
||||||
// The remoteaddress is not the same.
|
// The remoteaddress is not the same.
|
||||||
//
|
//
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
|
if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
|
||||||
//
|
//
|
||||||
// The RemotePort differs if it's designated in the configdata.
|
// The RemotePort differs if it's designated in the configdata.
|
||||||
//
|
//
|
||||||
@@ -733,13 +733,13 @@ Udp4ValidateTxToken (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_IP4_EQUAL (UdpSessionData->DestinationAddress, mZeroIp4Addr)) {
|
if (EFI_IP4_EQUAL (&UdpSessionData->DestinationAddress, &mZeroIp4Addr)) {
|
||||||
//
|
//
|
||||||
// The DestinationAddress specified in the UdpSessionData is 0.
|
// The DestinationAddress specified in the UdpSessionData is 0.
|
||||||
//
|
//
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
} else if (EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr)) {
|
} else if (EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr)) {
|
||||||
//
|
//
|
||||||
// the configured RemoteAddress is all zero, and the user doens't override the
|
// the configured RemoteAddress is all zero, and the user doens't override the
|
||||||
// destination address.
|
// destination address.
|
||||||
@@ -962,7 +962,7 @@ Udp4LeaveGroup (
|
|||||||
|
|
||||||
McastIp = Arg;
|
McastIp = Arg;
|
||||||
|
|
||||||
if ((McastIp != NULL) && (!EFI_IP4_EQUAL (*McastIp, (UINTN) Item->Key))) {
|
if ((McastIp != NULL) && (!EFI_IP4_EQUAL (McastIp, &(Item->Key)))) {
|
||||||
//
|
//
|
||||||
// McastIp is not NULL and the multicast address contained in the Item
|
// McastIp is not NULL and the multicast address contained in the Item
|
||||||
// is not the same as McastIp.
|
// is not the same as McastIp.
|
||||||
@@ -1172,16 +1172,16 @@ Udp4MatchDgram (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr) &&
|
if (!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr) &&
|
||||||
!EFI_IP4_EQUAL (ConfigData->RemoteAddress, Udp4Session->SourceAddress)) {
|
!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &Udp4Session->SourceAddress)) {
|
||||||
//
|
//
|
||||||
// This datagram doesn't come from the instance's specified sender.
|
// This datagram doesn't come from the instance's specified sender.
|
||||||
//
|
//
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_IP4_EQUAL (ConfigData->StationAddress, mZeroIp4Addr) ||
|
if (EFI_IP4_EQUAL (&ConfigData->StationAddress, &mZeroIp4Addr) ||
|
||||||
EFI_IP4_EQUAL (Udp4Session->DestinationAddress, ConfigData->StationAddress)) {
|
EFI_IP4_EQUAL (&Udp4Session->DestinationAddress, &ConfigData->StationAddress)) {
|
||||||
//
|
//
|
||||||
// The instance is configured to receive datagrams destinated to any station IP or
|
// The instance is configured to receive datagrams destinated to any station IP or
|
||||||
// the destination address of this datagram matches the configured station IP.
|
// the destination address of this datagram matches the configured station IP.
|
||||||
@@ -1702,7 +1702,7 @@ Udp4IcmpHandler (
|
|||||||
if (!Instance->Configured ||
|
if (!Instance->Configured ||
|
||||||
Instance->ConfigData.AcceptPromiscuous ||
|
Instance->ConfigData.AcceptPromiscuous ||
|
||||||
Instance->ConfigData.AcceptAnyPort ||
|
Instance->ConfigData.AcceptAnyPort ||
|
||||||
EFI_IP4_EQUAL (Instance->ConfigData.StationAddress, mZeroIp4Addr)) {
|
EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)) {
|
||||||
//
|
//
|
||||||
// Don't try to deliver the ICMP error to this instance if it is not configured,
|
// Don't try to deliver the ICMP error to this instance if it is not configured,
|
||||||
// or it's configured to be promiscuous or accept any port or accept all the
|
// or it's configured to be promiscuous or accept any port or accept all the
|
||||||
|
@@ -604,7 +604,7 @@ Udp4Transmit (
|
|||||||
// Set the SourceAddress, SrcPort and Destination according to the specified
|
// Set the SourceAddress, SrcPort and Destination according to the specified
|
||||||
// UdpSessionData.
|
// UdpSessionData.
|
||||||
//
|
//
|
||||||
if (!EFI_IP4_EQUAL (UdpSessionData->SourceAddress, mZeroIp4Addr)) {
|
if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {
|
||||||
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));
|
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user