Further check-in to smooth Intel IPF compiler building.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2332 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24 2007-01-29 06:09:43 +00:00
parent 2c9b03f219
commit 963cbacb5f
14 changed files with 165 additions and 93 deletions

View File

@ -388,7 +388,7 @@ Returns:
for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / MEM_UNIT_SIZE); Count++) {
ASSERT ((TempHeaderPtr->BitArrayPtr[Index] & bit (Index2) )== bit (Index2));
TempHeaderPtr->BitArrayPtr[Index] ^= (UINT8) (bit (Index2));
TempHeaderPtr->BitArrayPtr[Index] = (UINT8) (TempHeaderPtr->BitArrayPtr[Index] ^ (bit (Index2)));
Index2++;
if (Index2 == 8) {
Index += 1;
@ -516,7 +516,7 @@ Returns:
//
// right shift the byte
//
ByteValue = ByteValue >> 1;
ByteValue = (UINT8) (ByteValue >> 1);
if (BitValue == 0) {
//
@ -604,7 +604,7 @@ Returns:
for (TempBytePos = FoundBytePos, Index = FoundBitPos, Count = 0; Count < NumberOfMemoryUnit; Count++) {
ASSERT ((MemoryHeader->BitArrayPtr[TempBytePos] & bit (Index) )== 0);
MemoryHeader->BitArrayPtr[TempBytePos] |= bit (Index);
MemoryHeader->BitArrayPtr[TempBytePos] = (UINT8) (MemoryHeader->BitArrayPtr[TempBytePos] | bit (Index));
Index++;
if (Index == 8) {
TempBytePos += 1;

View File

@ -21,7 +21,7 @@ Revision History
#include "Ehci.h"
STATIC
EFI_STATUS
SetAndWaitDoorBell (
IN USB2_HC_DEV *HcDev,

View File

@ -89,7 +89,7 @@ Returns:
--*/
{
CdbPtr->StatFlags |= AdapterInfo->State;
CdbPtr->StatFlags = (PXE_STATFLAGS) (CdbPtr->StatFlags | AdapterInfo->State);
return ;
}
@ -377,7 +377,6 @@ Returns:
--*/
{
PXE_CPB_INITIALIZE *CpbPtr;
PXE_DB_INITIALIZE *DbPtr;
if ((CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DETECT_CABLE) &&
(CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE)) {
@ -396,7 +395,6 @@ Returns:
}
CpbPtr = (PXE_CPB_INITIALIZE *) (UINTN) CdbPtr->CPBaddr;
DbPtr = (PXE_DB_INITIALIZE *) (UINTN) CdbPtr->DBaddr;
if (CpbPtr->MemoryLength < (UINT32) MEMORY_NEEDED) {
CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;
@ -553,7 +551,7 @@ Returns:
case PXE_OPFLAGS_INTERRUPT_DISABLE:
if (IntMask != 0) {
AdapterInfo->int_mask &= ~(IntMask);
AdapterInfo->int_mask = (UINT16) (AdapterInfo->int_mask & ~(IntMask));
E100bSetInterruptState (AdapterInfo);
break;
}
@ -633,7 +631,7 @@ Returns:
}
NewFilter |= AdapterInfo->Rx_Filter;
NewFilter = (UINT16) (NewFilter | AdapterInfo->Rx_Filter);
//
// all other flags are ignored except mcast_reset
//
@ -695,7 +693,7 @@ Returns:
// if you want to enable anything, you got to have unicast
// and you have what you already enabled!
//
NewFilter |= (PXE_OPFLAGS_RECEIVE_FILTER_UNICAST | AdapterInfo->Rx_Filter);
NewFilter = (UINT16) (NewFilter | (PXE_OPFLAGS_RECEIVE_FILTER_UNICAST | AdapterInfo->Rx_Filter));
break;
@ -754,7 +752,7 @@ JustRead:
// give the stat flags here
//
if (AdapterInfo->Receive_Started) {
CdbPtr->StatFlags |= AdapterInfo->Rx_Filter;
CdbPtr->StatFlags = (PXE_STATFLAGS) (CdbPtr->StatFlags | AdapterInfo->Rx_Filter);
}
@ -1112,7 +1110,7 @@ Returns:
if ((CdbPtr->OpFlags & PXE_OPFLAGS_GET_INTERRUPT_STATUS) != 0) {
Status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
AdapterInfo->Int_Status |= Status;
AdapterInfo->Int_Status = (UINT16) (AdapterInfo->Int_Status | Status);
//
// acknoledge the interrupts
@ -1282,7 +1280,6 @@ Returns:
--*/
{
PXE_CPB_RECEIVE *cpbptr;
//
// check if RU has started...
@ -1293,7 +1290,6 @@ Returns:
return ;
}
cpbptr = (PXE_CPB_RECEIVE *) (UINTN) CdbPtr->CPBaddr;
CdbPtr->StatCode = (UINT16) E100bReceive (AdapterInfo, CdbPtr->CPBaddr, CdbPtr->DBaddr);
if (CdbPtr->StatCode != PXE_STATCODE_SUCCESS) {
@ -1513,6 +1509,7 @@ badcdb:
return ;
}
STATIC
UINT8
ChkSum (
IN VOID *Buffer,

View File

@ -43,10 +43,10 @@ static UINT8 basic_config_cmd[22] = {
//
#define wait_for_cmd_done(cmd_ioaddr) \
{ \
INT16 wait = 2000; \
while ((InByte (AdapterInfo, cmd_ioaddr) != 0) && --wait >= 0) \
INT16 wait_count = 2000; \
while ((InByte (AdapterInfo, cmd_ioaddr) != 0) && --wait_count >= 0) \
DelayIt (AdapterInfo, 10); \
if (wait == 0) \
if (wait_count == 0) \
DelayIt (AdapterInfo, 50); \
}
@ -269,6 +269,7 @@ Returns:
return ;
}
STATIC
UINTN
MapIt (
IN NIC_DATA_INSTANCE *AdapterInfo,
@ -337,6 +338,7 @@ Returns:
return PXE_STATCODE_SUCCESS;
}
STATIC
VOID
UnMapIt (
IN NIC_DATA_INSTANCE *AdapterInfo,
@ -384,6 +386,7 @@ Returns:
return ;
}
STATIC
VOID
DelayIt (
IN NIC_DATA_INSTANCE *AdapterInfo,
@ -409,6 +412,7 @@ Returns:
}
}
STATIC
VOID
BlockIt (
IN NIC_DATA_INSTANCE *AdapterInfo,
@ -434,6 +438,7 @@ Returns:
}
}
STATIC
UINT8
Load_Base_Regs (
NIC_DATA_INSTANCE *AdapterInfo
@ -483,6 +488,7 @@ Returns:
return 0;
}
STATIC
UINT8
IssueCB (
NIC_DATA_INSTANCE *AdapterInfo,
@ -549,6 +555,7 @@ Returns:
return 0;
}
STATIC
UINT8
Configure (
NIC_DATA_INSTANCE *AdapterInfo
@ -588,9 +595,9 @@ Returns:
}
my_filter = (UINT8) ((AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS) ? 1 : 0);
my_filter |= (AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST) ? 0 : 2;
my_filter = (UINT8) ((my_filter | (AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST) ? 0 : 2));
data_ptr[15] |= my_filter;
data_ptr[15] = (UINT8) (data_ptr[15] | my_filter);
data_ptr[19] = (UINT8) (AdapterInfo->Duplex ? 0xC0 : 0x80);
data_ptr[21] = (UINT8) ((AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST) ? 0x0D : 0x05);
@ -686,6 +693,7 @@ Returns:
return 0;
}
STATIC
VOID
StopRU (
IN NIC_DATA_INSTANCE *AdapterInfo
@ -721,6 +729,7 @@ Returns:
return ;
}
STATIC
INT8
StartRU (
NIC_DATA_INSTANCE *AdapterInfo
@ -1049,7 +1058,7 @@ Returns:
//
// enable unicast and start the RU
//
AdapterInfo->Rx_Filter |= (new_filter | PXE_OPFLAGS_RECEIVE_FILTER_UNICAST);
AdapterInfo->Rx_Filter = (UINT8) (AdapterInfo->Rx_Filter | (new_filter | PXE_OPFLAGS_RECEIVE_FILTER_UNICAST));
StartRU (AdapterInfo);
} else {
//
@ -1290,7 +1299,7 @@ Returns:
ret_code = PXE_STATCODE_NO_DATA;
pkt_type = PXE_FRAME_TYPE_NONE;
status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
AdapterInfo->Int_Status |= status;
AdapterInfo->Int_Status = (UINT16) (AdapterInfo->Int_Status | status);
//
// acknoledge the interrupts
//
@ -1774,7 +1783,6 @@ Returns:
--*/
{
RxFD *rx_ptr;
RxFD *head_ptr;
RxFD *tail_ptr;
UINT16 Index;
@ -1804,7 +1812,6 @@ Returns:
}
}
head_ptr = (&AdapterInfo->rx_ring[0]);
tail_ptr = (&AdapterInfo->rx_ring[AdapterInfo->RxBufCnt - 1]);
tail_ptr->cb_header.link = (UINT32) AdapterInfo->rx_phy_addr;
@ -1890,6 +1897,7 @@ Returns:
#define EE_READ_CMD 6 // 110b
#define EE_ERASE_CMD (7 << 6)
STATIC
VOID
shift_bits_out (
IN NIC_DATA_INSTANCE *AdapterInfo,
@ -1932,7 +1940,7 @@ Returns:
// mask off the data_in bit
//
Tmp = (UINT8) (InByte (AdapterInfo, EEAddr) &~EE_DI);
Tmp |= dataval;
Tmp = (UINT8) (Tmp | dataval);
OutByte (AdapterInfo, Tmp, EEAddr);
eeprom_delay (100);
//
@ -1948,6 +1956,7 @@ Returns:
}
}
STATIC
UINT16
shift_bits_in (
IN NIC_DATA_INSTANCE *AdapterInfo
@ -1999,6 +2008,7 @@ Returns:
return retval;
}
STATIC
BOOLEAN
E100bSetEepromLockOut (
IN NIC_DATA_INSTANCE *AdapterInfo
@ -2047,6 +2057,7 @@ Returns:
return TRUE;
}
STATIC
VOID
E100bReSetEepromLockOut (
IN NIC_DATA_INSTANCE *AdapterInfo
@ -3199,17 +3210,6 @@ Returns:
MdiMiscReg |= (NSC_TX_CONG_TXREADY | NSC_TX_CONG_F_CONNECT);
#if CONGESTION_CONTROL
//
// If we are configured to do congestion control, then enable the
// congestion control bit in the National Phy
//
if (AdapterInfo->Congest) {
MdiMiscReg |= NSC_TX_CONG_ENABLE;
} else {
MdiMiscReg &= ~NSC_TX_CONG_ENABLE;
}
#endif
MdiWrite (
AdapterInfo,
NSC_CONG_CONTROL_REG,
@ -3226,21 +3226,6 @@ Returns:
// to attempt a software workaround to the PHY_100 A/B step problem.
//
#if DO_PHY_100B_SOFTWARE_FIX
//
// Handle the Intel PHY_100 (A and B steps)
//
if ((PhyId == PHY_100_A) && (AdapterInfo->LinkSpeed == 100)) {
//
// The PHY_100 is very sensitive to collisions at 100mb, so increase
// the Adaptive IFS value with the intention of reducing the number of
// collisions that the adapter generates.
//
AdapterInfo->CurrentIFSValue = 0x18;
AdapterInfo->AdaptiveIFS = 0;
}
#endif
return (TRUE);
}
@ -3395,7 +3380,7 @@ Returns:
// AND the two advertisement registers together, and get rid of any
// extraneous bits.
//
MdiOwnAdReg &= (MdiLinkPartnerAdReg & NWAY_LP_ABILITY);
MdiOwnAdReg = (UINT16) (MdiOwnAdReg & (MdiLinkPartnerAdReg & NWAY_LP_ABILITY));
//
// Get speed setting
@ -3540,6 +3525,7 @@ Returns:
return 0;
}
STATIC
INT8
SoftwareReset (
NIC_DATA_INSTANCE *AdapterInfo

View File

@ -124,7 +124,7 @@ enum speedo_offsets {
SCBEarlyRx = 20, // Early receive byte count.
SCBEarlyRxInt = 24, SCBFlowCtrlReg = 25, SCBPmdr = 27,
// offsets for general control registers (GCRs)
SCBGenCtrl = 28, SCBGenStatus = 29, SCBGenCtrl2 = 30, SCBRsvd = 31,
SCBGenCtrl = 28, SCBGenStatus = 29, SCBGenCtrl2 = 30, SCBRsvd = 31
};
#define GCR2_EEPROM_ACCESS_SEMAPHORE 0x80 // bit offset into the gcr2
@ -137,7 +137,7 @@ enum commands {
CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7,
CmdSuspend = 0x4000, /* Suspend after completion. */
CmdIntr = 0x2000, /* Interrupt after completion. */
CmdTxFlex = 0x0008, /* Use "Flexible mode" for CmdTx command. */
CmdTxFlex = 0x0008 /* Use "Flexible mode" for CmdTx command. */
};
//-------------------------------------------------------------------------

View File

@ -864,19 +864,19 @@ Returns:
EFI_PCI_IO_PROTOCOL_WIDTH Width;
NIC_DATA_INSTANCE *AdapterInfo;
Width = 0;
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
AdapterInfo = (NIC_DATA_INSTANCE *) (UINTN) UnqId;
switch (Len) {
case 2:
Width = 1;
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
break;
case 4:
Width = 2;
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
break;
case 8:
Width = 3;
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
break;
}

View File

@ -176,24 +176,113 @@ TmpMemIo (
//
// functions defined in decode.c
//
VOID UNDI_GetState();
VOID UNDI_Start();
VOID UNDI_Stop();
VOID UNDI_GetInitInfo();
VOID UNDI_GetConfigInfo();
VOID UNDI_Initialize();
VOID UNDI_Reset();
VOID UNDI_Shutdown();
VOID UNDI_Interrupt();
VOID UNDI_RecFilter();
VOID UNDI_StnAddr();
VOID UNDI_Statistics();
VOID UNDI_ip2mac();
VOID UNDI_NVData();
VOID UNDI_Status();
VOID UNDI_FillHeader();
VOID UNDI_Transmit();
VOID UNDI_Receive();
VOID
UNDI_GetState (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Start (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Stop (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_GetInitInfo (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_GetConfigInfo (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Initialize (
IN PXE_CDB *CdbPtr,
NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Reset (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Shutdown (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Interrupt (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_RecFilter (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_StnAddr (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Statistics (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_ip2mac (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_NVData (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Status (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_FillHeader (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Transmit (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
UNDI_Receive (
IN PXE_CDB *CdbPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID UNDI_APIEntry_new(UINT64);
VOID UNDI_APIEntry_old(UINT64);

View File

@ -39,12 +39,4 @@ Abstract:
//
#include <Guid/PeiPerformanceHob.h>
EFI_STATUS
EFIAPI
PeiCore (
IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,
IN VOID *Data
)
;
#endif

View File

@ -144,6 +144,7 @@ PERFORMANCE_PROTOCOL mPerformanceInterface = {
@retval The index of gauge entry in the array.
**/
STATIC
UINT32
InternalSearchForGaugeEntry (
IN CONST VOID *Handle, OPTIONAL
@ -363,6 +364,7 @@ GetGauge (
to DXE performance data structures.
**/
STATIC
VOID
InternalGetPeiPerformance (
VOID
@ -625,5 +627,5 @@ PerformanceMeasurementEnabled (
VOID
)
{
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
}

View File

@ -65,7 +65,7 @@ DebugPrint (
//
// Send the print string to a Serial Port
//
SerialPortWrite (Buffer, AsciiStrLen(Buffer));
SerialPortWrite ((UINT8 *) Buffer, AsciiStrLen(Buffer));
}
@ -110,7 +110,7 @@ DebugAssert (
//
// Send the print string to the Console Output device
//
SerialPortWrite (Buffer, AsciiStrLen(Buffer));
SerialPortWrite ((UINT8 *) Buffer, AsciiStrLen(Buffer));
//
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings
@ -176,7 +176,7 @@ DebugAssertEnabled (
VOID
)
{
return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
}
@ -197,7 +197,7 @@ DebugPrintEnabled (
VOID
)
{
return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
}
@ -218,7 +218,7 @@ DebugCodeEnabled (
VOID
)
{
return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
}
@ -239,5 +239,5 @@ DebugClearMemoryEnabled (
VOID
)
{
return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
}

View File

@ -31,6 +31,7 @@ STATIC PERFORMANCE_PROTOCOL *mPerformance = NULL;
@retval Other Performance protocol is not located to log performance.
**/
STATIC
EFI_STATUS
GetPerformanceProtocol (
VOID
@ -245,5 +246,5 @@ PerformanceMeasurementEnabled (
VOID
)
{
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
}

View File

@ -22,6 +22,7 @@ Abstract:
EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService = NULL;
EFI_PLABEL mPlabel;
STATIC
EFI_STATUS
EFIAPI
DxeSalLibInitialize (
@ -43,7 +44,7 @@ DxeSalLibInitialize (
// virtual). So lets grap the physical PLABEL for the EsalEntryPoint and store it
// away. We cache it in a module global, so we can register the vitrual version.
//
Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, &mEsalBootService);
Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, (VOID **) &mEsalBootService);
if (EFI_ERROR (Status)) {
mEsalBootService = NULL;
return EFI_SUCCESS;
@ -58,6 +59,7 @@ DxeSalLibInitialize (
return EFI_SUCCESS;
}
STATIC
VOID
EFIAPI
DxeSalVirtualNotifyEvent (

View File

@ -36,6 +36,7 @@ Abstract:
@retval The index of log entry in the array.
**/
STATIC
PEI_PERFORMANCE_LOG_HEADER *
InternalGetPerformanceHobLog (
VOID
@ -83,6 +84,7 @@ InternalGetPerformanceHobLog (
@retval The index of log entry in the array.
**/
STATIC
UINT32
InternalSearchForLogEntry (
IN PEI_PERFORMANCE_LOG_HEADER *PeiPerformanceLog,
@ -326,5 +328,5 @@ PerformanceMeasurementEnabled (
VOID
)
{
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
}

View File

@ -31,6 +31,7 @@ Abstract:
#include "Common/FirmwareFileSystem.h"
#include "GuidedSection.h"
EFI_STATUS
GuidedSectionExtractionProtocolConstructor (