1. Fixed tools_def.template to meet ICC build for IA32
2. Modified some source files to meet ICC build for IA32 and IPF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3271 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -351,7 +351,7 @@ EhcGetRootHubPortStatus (
|
||||
|
||||
for (Index = 0; Index < MapSize; Index++) {
|
||||
if (EHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {
|
||||
PortStatus->PortStatus |= mUsbPortStateMap[Index].UefiState;
|
||||
PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | mUsbPortStateMap[Index].UefiState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ EhcGetRootHubPortStatus (
|
||||
|
||||
for (Index = 0; Index < MapSize; Index++) {
|
||||
if (EHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {
|
||||
PortStatus->PortChangeStatus |= mUsbPortChangeMap[Index].UefiState;
|
||||
PortStatus->PortChangeStatus = (UINT16) (PortStatus->PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,7 +707,7 @@ EhcControlTransfer (
|
||||
// endpoint is bidirectional. EhcCreateUrb expects this
|
||||
// combination of Ep addr and its direction.
|
||||
//
|
||||
Endpoint = 0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0);
|
||||
Endpoint = (UINT8) (0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0));
|
||||
Urb = EhcCreateUrb (
|
||||
Ehc,
|
||||
DeviceAddress,
|
||||
@@ -1340,7 +1340,7 @@ EhcDriverBindingSupported (
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
&PciIo,
|
||||
(VOID **) &PciIo,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -1491,7 +1491,7 @@ EhcDriverBindingStart (
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
&PciIo,
|
||||
(VOID **) &PciIo,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -1636,7 +1636,7 @@ EhcDriverBindingStop (
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiUsb2HcProtocolGuid,
|
||||
&Usb2Hc,
|
||||
(VOID **) &Usb2Hc,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
|
@@ -66,7 +66,7 @@ enum {
|
||||
EHC_SYNC_POLL_TIME = 20 * EHC_STALL_1_MICROSECOND,
|
||||
EHC_ASYNC_POLL_TIME = 50 * 10000UL, // The unit of time is 100us
|
||||
|
||||
EHC_TPL = TPL_NOTIFY,
|
||||
EHC_TPL = TPL_NOTIFY
|
||||
};
|
||||
|
||||
//
|
||||
@@ -95,7 +95,7 @@ enum {
|
||||
|
||||
#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
|
||||
|
||||
typedef struct _USB2_HC_DEV {
|
||||
struct _USB2_HC_DEV {
|
||||
UINTN Signature;
|
||||
EFI_USB2_HC_PROTOCOL Usb2Hc;
|
||||
|
||||
@@ -143,7 +143,7 @@ typedef struct _USB2_HC_DEV {
|
||||
// Misc
|
||||
//
|
||||
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
|
||||
} USB2_HC_DEV;
|
||||
};
|
||||
|
||||
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding;
|
||||
|
@@ -30,7 +30,7 @@ enum {
|
||||
|
||||
EHC_DEBUG_QH = (UINTN)(1 << 8),
|
||||
EHC_DEBUG_QTD = (UINTN)(1 << 9),
|
||||
EHC_DEBUG_BUF = (UINTN)(1 << 10),
|
||||
EHC_DEBUG_BUF = (UINTN)(1 << 10)
|
||||
};
|
||||
|
||||
|
||||
|
@@ -93,7 +93,7 @@ enum {
|
||||
//
|
||||
EHC_PCI_CLASSC = 0x09,
|
||||
EHC_PCI_CLASSC_PI = 0x20,
|
||||
EHC_BAR_INDEX = 0, /* how many bytes away from USB_BASE to 0x10 */
|
||||
EHC_BAR_INDEX = 0 /* how many bytes away from USB_BASE to 0x10 */
|
||||
};
|
||||
|
||||
#define EHC_LINK_TERMINATED(Link) (((Link) & 0x01) != 0)
|
||||
|
@@ -486,7 +486,7 @@ EhcCreateQtds (
|
||||
// Switch the Toggle bit if odd number of packets are included in the QTD.
|
||||
//
|
||||
if (((Qtd->DataLen + Ep->MaxPacket - 1) / Ep->MaxPacket) % 2) {
|
||||
Toggle = 1 - Toggle;
|
||||
Toggle = (UINT8) (1 - Toggle);
|
||||
}
|
||||
|
||||
Len += Qtd->DataLen;
|
||||
@@ -588,7 +588,7 @@ EhcCreateUrb (
|
||||
|
||||
Ep = &Urb->Ep;
|
||||
Ep->DevAddr = DevAddr;
|
||||
Ep->EpAddr = EpAddr & 0x0F;
|
||||
Ep->EpAddr = (UINT8) (EpAddr & 0x0F);
|
||||
Ep->Direction = ((EpAddr & 0x80) ? EfiUsbDataIn : EfiUsbDataOut);
|
||||
Ep->DevSpeed = DevSpeed;
|
||||
Ep->MaxPacket = MaxPacket;
|
||||
|
@@ -83,7 +83,7 @@ enum {
|
||||
QH_MICROFRAME_6 = 0x40,
|
||||
QH_MICROFRAME_7 = 0x80,
|
||||
|
||||
USB_ERR_SHORT_PACKET = 0x200,
|
||||
USB_ERR_SHORT_PACKET = 0x200
|
||||
};
|
||||
|
||||
//
|
||||
@@ -180,13 +180,13 @@ typedef struct _USB_ENDPOINT {
|
||||
// Software QTD strcture, this is used to manage all the
|
||||
// QTD generated from a URB. Don't add fields before QtdHw.
|
||||
//
|
||||
typedef struct _EHC_QTD {
|
||||
struct _EHC_QTD {
|
||||
QTD_HW QtdHw;
|
||||
UINT32 Signature;
|
||||
LIST_ENTRY QtdList; // The list of QTDs to one end point
|
||||
UINT8 *Data; // Buffer of the original data
|
||||
UINTN DataLen; // Original amount of data in this QTD
|
||||
} EHC_QTD;
|
||||
};
|
||||
|
||||
//
|
||||
// Software QH structure. All three different transaction types
|
||||
@@ -203,19 +203,19 @@ typedef struct _EHC_QTD {
|
||||
// transfer is supported. A dummy QH is linked to EHCI AsyncListAddr
|
||||
// as the reclamation header. New transfer is inserted after this QH.
|
||||
//
|
||||
typedef struct _EHC_QH {
|
||||
struct _EHC_QH {
|
||||
QH_HW QhHw;
|
||||
UINT32 Signature;
|
||||
EHC_QH *NextQh; // The queue head pointed to by horizontal link
|
||||
LIST_ENTRY Qtds; // The list of QTDs to this queue head
|
||||
UINTN Interval;
|
||||
} EHC_QH;
|
||||
};
|
||||
|
||||
//
|
||||
// URB (Usb Request Block) contains information for all kinds of
|
||||
// usb requests.
|
||||
//
|
||||
typedef struct _URB {
|
||||
struct _URB {
|
||||
UINT32 Signature;
|
||||
LIST_ENTRY UrbList;
|
||||
|
||||
@@ -244,7 +244,7 @@ typedef struct _URB {
|
||||
UINT32 Result;
|
||||
UINTN Completed; // completed data length
|
||||
UINT8 DataToggle;
|
||||
} URB;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@@ -520,7 +520,7 @@ UsbHcFreeMem (
|
||||
for (Count = 0; Count < (AllocSize / USBHC_MEM_UNIT); Count++) {
|
||||
ASSERT (USB_HC_BIT_IS_SET (Block->Bits[Byte], Bit));
|
||||
|
||||
Block->Bits[Byte] ^= (UINT8) USB_HC_BIT (Bit);
|
||||
Block->Bits[Byte] = (UINT8) (Block->Bits[Byte] ^ USB_HC_BIT (Bit));
|
||||
NEXT_BIT (Byte, Bit);
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ Revision History
|
||||
|
||||
typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK;
|
||||
|
||||
typedef struct _USBHC_MEM_BLOCK {
|
||||
struct _USBHC_MEM_BLOCK {
|
||||
UINT8 *Bits; // Bit array to record which unit is allocated
|
||||
UINTN BitsLen;
|
||||
UINT8 *Buf;
|
||||
@@ -45,7 +45,7 @@ typedef struct _USBHC_MEM_BLOCK {
|
||||
UINTN BufLen; // Memory size in bytes
|
||||
VOID *Mapping;
|
||||
USBHC_MEM_BLOCK *Next;
|
||||
} USBHC_MEM_BLOCK;
|
||||
};
|
||||
|
||||
//
|
||||
// USBHC_MEM_POOL is used to manage the memory used by USB
|
||||
@@ -63,7 +63,7 @@ enum {
|
||||
USBHC_MEM_UNIT = 64, // Memory allocation unit, must be 2^n, n>4
|
||||
|
||||
USBHC_MEM_UNIT_MASK = USBHC_MEM_UNIT - 1,
|
||||
USBHC_MEM_DEFAULT_PAGES = 16,
|
||||
USBHC_MEM_DEFAULT_PAGES = 16
|
||||
};
|
||||
|
||||
#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
|
||||
|
Reference in New Issue
Block a user