mirror of https://github.com/acidanthera/audk.git
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:
parent
2c9b03f219
commit
963cbacb5f
|
@ -388,7 +388,7 @@ Returns:
|
||||||
for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / MEM_UNIT_SIZE); Count++) {
|
for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / MEM_UNIT_SIZE); Count++) {
|
||||||
ASSERT ((TempHeaderPtr->BitArrayPtr[Index] & bit (Index2) )== bit (Index2));
|
ASSERT ((TempHeaderPtr->BitArrayPtr[Index] & bit (Index2) )== bit (Index2));
|
||||||
|
|
||||||
TempHeaderPtr->BitArrayPtr[Index] ^= (UINT8) (bit (Index2));
|
TempHeaderPtr->BitArrayPtr[Index] = (UINT8) (TempHeaderPtr->BitArrayPtr[Index] ^ (bit (Index2)));
|
||||||
Index2++;
|
Index2++;
|
||||||
if (Index2 == 8) {
|
if (Index2 == 8) {
|
||||||
Index += 1;
|
Index += 1;
|
||||||
|
@ -516,7 +516,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// right shift the byte
|
// right shift the byte
|
||||||
//
|
//
|
||||||
ByteValue = ByteValue >> 1;
|
ByteValue = (UINT8) (ByteValue >> 1);
|
||||||
|
|
||||||
if (BitValue == 0) {
|
if (BitValue == 0) {
|
||||||
//
|
//
|
||||||
|
@ -604,7 +604,7 @@ Returns:
|
||||||
for (TempBytePos = FoundBytePos, Index = FoundBitPos, Count = 0; Count < NumberOfMemoryUnit; Count++) {
|
for (TempBytePos = FoundBytePos, Index = FoundBitPos, Count = 0; Count < NumberOfMemoryUnit; Count++) {
|
||||||
|
|
||||||
ASSERT ((MemoryHeader->BitArrayPtr[TempBytePos] & bit (Index) )== 0);
|
ASSERT ((MemoryHeader->BitArrayPtr[TempBytePos] & bit (Index) )== 0);
|
||||||
MemoryHeader->BitArrayPtr[TempBytePos] |= bit (Index);
|
MemoryHeader->BitArrayPtr[TempBytePos] = (UINT8) (MemoryHeader->BitArrayPtr[TempBytePos] | bit (Index));
|
||||||
Index++;
|
Index++;
|
||||||
if (Index == 8) {
|
if (Index == 8) {
|
||||||
TempBytePos += 1;
|
TempBytePos += 1;
|
||||||
|
|
|
@ -21,7 +21,7 @@ Revision History
|
||||||
|
|
||||||
#include "Ehci.h"
|
#include "Ehci.h"
|
||||||
|
|
||||||
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
SetAndWaitDoorBell (
|
SetAndWaitDoorBell (
|
||||||
IN USB2_HC_DEV *HcDev,
|
IN USB2_HC_DEV *HcDev,
|
||||||
|
|
|
@ -89,7 +89,7 @@ Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CdbPtr->StatFlags |= AdapterInfo->State;
|
CdbPtr->StatFlags = (PXE_STATFLAGS) (CdbPtr->StatFlags | AdapterInfo->State);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,7 +377,6 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
PXE_CPB_INITIALIZE *CpbPtr;
|
PXE_CPB_INITIALIZE *CpbPtr;
|
||||||
PXE_DB_INITIALIZE *DbPtr;
|
|
||||||
|
|
||||||
if ((CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DETECT_CABLE) &&
|
if ((CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DETECT_CABLE) &&
|
||||||
(CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE)) {
|
(CdbPtr->OpFlags != PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE)) {
|
||||||
|
@ -396,7 +395,6 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
CpbPtr = (PXE_CPB_INITIALIZE *) (UINTN) CdbPtr->CPBaddr;
|
CpbPtr = (PXE_CPB_INITIALIZE *) (UINTN) CdbPtr->CPBaddr;
|
||||||
DbPtr = (PXE_DB_INITIALIZE *) (UINTN) CdbPtr->DBaddr;
|
|
||||||
|
|
||||||
if (CpbPtr->MemoryLength < (UINT32) MEMORY_NEEDED) {
|
if (CpbPtr->MemoryLength < (UINT32) MEMORY_NEEDED) {
|
||||||
CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;
|
CdbPtr->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;
|
||||||
|
@ -553,7 +551,7 @@ Returns:
|
||||||
|
|
||||||
case PXE_OPFLAGS_INTERRUPT_DISABLE:
|
case PXE_OPFLAGS_INTERRUPT_DISABLE:
|
||||||
if (IntMask != 0) {
|
if (IntMask != 0) {
|
||||||
AdapterInfo->int_mask &= ~(IntMask);
|
AdapterInfo->int_mask = (UINT16) (AdapterInfo->int_mask & ~(IntMask));
|
||||||
E100bSetInterruptState (AdapterInfo);
|
E100bSetInterruptState (AdapterInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -633,7 +631,7 @@ Returns:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NewFilter |= AdapterInfo->Rx_Filter;
|
NewFilter = (UINT16) (NewFilter | AdapterInfo->Rx_Filter);
|
||||||
//
|
//
|
||||||
// all other flags are ignored except mcast_reset
|
// all other flags are ignored except mcast_reset
|
||||||
//
|
//
|
||||||
|
@ -695,7 +693,7 @@ Returns:
|
||||||
// if you want to enable anything, you got to have unicast
|
// if you want to enable anything, you got to have unicast
|
||||||
// and you have what you already enabled!
|
// 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;
|
break;
|
||||||
|
|
||||||
|
@ -754,7 +752,7 @@ JustRead:
|
||||||
// give the stat flags here
|
// give the stat flags here
|
||||||
//
|
//
|
||||||
if (AdapterInfo->Receive_Started) {
|
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) {
|
if ((CdbPtr->OpFlags & PXE_OPFLAGS_GET_INTERRUPT_STATUS) != 0) {
|
||||||
|
|
||||||
Status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
|
Status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
|
||||||
AdapterInfo->Int_Status |= Status;
|
AdapterInfo->Int_Status = (UINT16) (AdapterInfo->Int_Status | Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// acknoledge the interrupts
|
// acknoledge the interrupts
|
||||||
|
@ -1282,7 +1280,6 @@ Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
PXE_CPB_RECEIVE *cpbptr;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// check if RU has started...
|
// check if RU has started...
|
||||||
|
@ -1293,7 +1290,6 @@ Returns:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpbptr = (PXE_CPB_RECEIVE *) (UINTN) CdbPtr->CPBaddr;
|
|
||||||
|
|
||||||
CdbPtr->StatCode = (UINT16) E100bReceive (AdapterInfo, CdbPtr->CPBaddr, CdbPtr->DBaddr);
|
CdbPtr->StatCode = (UINT16) E100bReceive (AdapterInfo, CdbPtr->CPBaddr, CdbPtr->DBaddr);
|
||||||
if (CdbPtr->StatCode != PXE_STATCODE_SUCCESS) {
|
if (CdbPtr->StatCode != PXE_STATCODE_SUCCESS) {
|
||||||
|
@ -1513,6 +1509,7 @@ badcdb:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINT8
|
UINT8
|
||||||
ChkSum (
|
ChkSum (
|
||||||
IN VOID *Buffer,
|
IN VOID *Buffer,
|
||||||
|
|
|
@ -43,10 +43,10 @@ static UINT8 basic_config_cmd[22] = {
|
||||||
//
|
//
|
||||||
#define wait_for_cmd_done(cmd_ioaddr) \
|
#define wait_for_cmd_done(cmd_ioaddr) \
|
||||||
{ \
|
{ \
|
||||||
INT16 wait = 2000; \
|
INT16 wait_count = 2000; \
|
||||||
while ((InByte (AdapterInfo, cmd_ioaddr) != 0) && --wait >= 0) \
|
while ((InByte (AdapterInfo, cmd_ioaddr) != 0) && --wait_count >= 0) \
|
||||||
DelayIt (AdapterInfo, 10); \
|
DelayIt (AdapterInfo, 10); \
|
||||||
if (wait == 0) \
|
if (wait_count == 0) \
|
||||||
DelayIt (AdapterInfo, 50); \
|
DelayIt (AdapterInfo, 50); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,6 +269,7 @@ Returns:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINTN
|
UINTN
|
||||||
MapIt (
|
MapIt (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo,
|
IN NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -337,6 +338,7 @@ Returns:
|
||||||
return PXE_STATCODE_SUCCESS;
|
return PXE_STATCODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
UnMapIt (
|
UnMapIt (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo,
|
IN NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -384,6 +386,7 @@ Returns:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
DelayIt (
|
DelayIt (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo,
|
IN NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -409,6 +412,7 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
BlockIt (
|
BlockIt (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo,
|
IN NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -434,6 +438,7 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINT8
|
UINT8
|
||||||
Load_Base_Regs (
|
Load_Base_Regs (
|
||||||
NIC_DATA_INSTANCE *AdapterInfo
|
NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -483,6 +488,7 @@ Returns:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINT8
|
UINT8
|
||||||
IssueCB (
|
IssueCB (
|
||||||
NIC_DATA_INSTANCE *AdapterInfo,
|
NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -549,6 +555,7 @@ Returns:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINT8
|
UINT8
|
||||||
Configure (
|
Configure (
|
||||||
NIC_DATA_INSTANCE *AdapterInfo
|
NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -588,9 +595,9 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
my_filter = (UINT8) ((AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS) ? 1 : 0);
|
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[19] = (UINT8) (AdapterInfo->Duplex ? 0xC0 : 0x80);
|
||||||
data_ptr[21] = (UINT8) ((AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST) ? 0x0D : 0x05);
|
data_ptr[21] = (UINT8) ((AdapterInfo->Rx_Filter & PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST) ? 0x0D : 0x05);
|
||||||
|
|
||||||
|
@ -686,6 +693,7 @@ Returns:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
StopRU (
|
StopRU (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -721,6 +729,7 @@ Returns:
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
INT8
|
INT8
|
||||||
StartRU (
|
StartRU (
|
||||||
NIC_DATA_INSTANCE *AdapterInfo
|
NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -1049,7 +1058,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// enable unicast and start the RU
|
// 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);
|
StartRU (AdapterInfo);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
@ -1290,7 +1299,7 @@ Returns:
|
||||||
ret_code = PXE_STATCODE_NO_DATA;
|
ret_code = PXE_STATCODE_NO_DATA;
|
||||||
pkt_type = PXE_FRAME_TYPE_NONE;
|
pkt_type = PXE_FRAME_TYPE_NONE;
|
||||||
status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
|
status = InWord (AdapterInfo, AdapterInfo->ioaddr + SCBStatus);
|
||||||
AdapterInfo->Int_Status |= status;
|
AdapterInfo->Int_Status = (UINT16) (AdapterInfo->Int_Status | status);
|
||||||
//
|
//
|
||||||
// acknoledge the interrupts
|
// acknoledge the interrupts
|
||||||
//
|
//
|
||||||
|
@ -1774,7 +1783,6 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
RxFD *rx_ptr;
|
RxFD *rx_ptr;
|
||||||
RxFD *head_ptr;
|
|
||||||
RxFD *tail_ptr;
|
RxFD *tail_ptr;
|
||||||
UINT16 Index;
|
UINT16 Index;
|
||||||
|
|
||||||
|
@ -1804,7 +1812,6 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
head_ptr = (&AdapterInfo->rx_ring[0]);
|
|
||||||
tail_ptr = (&AdapterInfo->rx_ring[AdapterInfo->RxBufCnt - 1]);
|
tail_ptr = (&AdapterInfo->rx_ring[AdapterInfo->RxBufCnt - 1]);
|
||||||
tail_ptr->cb_header.link = (UINT32) AdapterInfo->rx_phy_addr;
|
tail_ptr->cb_header.link = (UINT32) AdapterInfo->rx_phy_addr;
|
||||||
|
|
||||||
|
@ -1890,6 +1897,7 @@ Returns:
|
||||||
#define EE_READ_CMD 6 // 110b
|
#define EE_READ_CMD 6 // 110b
|
||||||
#define EE_ERASE_CMD (7 << 6)
|
#define EE_ERASE_CMD (7 << 6)
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
shift_bits_out (
|
shift_bits_out (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo,
|
IN NIC_DATA_INSTANCE *AdapterInfo,
|
||||||
|
@ -1932,7 +1940,7 @@ Returns:
|
||||||
// mask off the data_in bit
|
// mask off the data_in bit
|
||||||
//
|
//
|
||||||
Tmp = (UINT8) (InByte (AdapterInfo, EEAddr) &~EE_DI);
|
Tmp = (UINT8) (InByte (AdapterInfo, EEAddr) &~EE_DI);
|
||||||
Tmp |= dataval;
|
Tmp = (UINT8) (Tmp | dataval);
|
||||||
OutByte (AdapterInfo, Tmp, EEAddr);
|
OutByte (AdapterInfo, Tmp, EEAddr);
|
||||||
eeprom_delay (100);
|
eeprom_delay (100);
|
||||||
//
|
//
|
||||||
|
@ -1948,6 +1956,7 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
UINT16
|
UINT16
|
||||||
shift_bits_in (
|
shift_bits_in (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -1999,6 +2008,7 @@ Returns:
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
E100bSetEepromLockOut (
|
E100bSetEepromLockOut (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -2047,6 +2057,7 @@ Returns:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
E100bReSetEepromLockOut (
|
E100bReSetEepromLockOut (
|
||||||
IN NIC_DATA_INSTANCE *AdapterInfo
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
@ -3199,17 +3210,6 @@ Returns:
|
||||||
|
|
||||||
MdiMiscReg |= (NSC_TX_CONG_TXREADY | NSC_TX_CONG_F_CONNECT);
|
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 (
|
MdiWrite (
|
||||||
AdapterInfo,
|
AdapterInfo,
|
||||||
NSC_CONG_CONTROL_REG,
|
NSC_CONG_CONTROL_REG,
|
||||||
|
@ -3226,21 +3226,6 @@ Returns:
|
||||||
// to attempt a software workaround to the PHY_100 A/B step problem.
|
// 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);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3395,7 +3380,7 @@ Returns:
|
||||||
// AND the two advertisement registers together, and get rid of any
|
// AND the two advertisement registers together, and get rid of any
|
||||||
// extraneous bits.
|
// extraneous bits.
|
||||||
//
|
//
|
||||||
MdiOwnAdReg &= (MdiLinkPartnerAdReg & NWAY_LP_ABILITY);
|
MdiOwnAdReg = (UINT16) (MdiOwnAdReg & (MdiLinkPartnerAdReg & NWAY_LP_ABILITY));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get speed setting
|
// Get speed setting
|
||||||
|
@ -3540,6 +3525,7 @@ Returns:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
INT8
|
INT8
|
||||||
SoftwareReset (
|
SoftwareReset (
|
||||||
NIC_DATA_INSTANCE *AdapterInfo
|
NIC_DATA_INSTANCE *AdapterInfo
|
||||||
|
|
|
@ -124,7 +124,7 @@ enum speedo_offsets {
|
||||||
SCBEarlyRx = 20, // Early receive byte count.
|
SCBEarlyRx = 20, // Early receive byte count.
|
||||||
SCBEarlyRxInt = 24, SCBFlowCtrlReg = 25, SCBPmdr = 27,
|
SCBEarlyRxInt = 24, SCBFlowCtrlReg = 25, SCBPmdr = 27,
|
||||||
// offsets for general control registers (GCRs)
|
// 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
|
#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,
|
CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7,
|
||||||
CmdSuspend = 0x4000, /* Suspend after completion. */
|
CmdSuspend = 0x4000, /* Suspend after completion. */
|
||||||
CmdIntr = 0x2000, /* Interrupt after completion. */
|
CmdIntr = 0x2000, /* Interrupt after completion. */
|
||||||
CmdTxFlex = 0x0008, /* Use "Flexible mode" for CmdTx command. */
|
CmdTxFlex = 0x0008 /* Use "Flexible mode" for CmdTx command. */
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
|
@ -864,19 +864,19 @@ Returns:
|
||||||
EFI_PCI_IO_PROTOCOL_WIDTH Width;
|
EFI_PCI_IO_PROTOCOL_WIDTH Width;
|
||||||
NIC_DATA_INSTANCE *AdapterInfo;
|
NIC_DATA_INSTANCE *AdapterInfo;
|
||||||
|
|
||||||
Width = 0;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 0;
|
||||||
AdapterInfo = (NIC_DATA_INSTANCE *) (UINTN) UnqId;
|
AdapterInfo = (NIC_DATA_INSTANCE *) (UINTN) UnqId;
|
||||||
switch (Len) {
|
switch (Len) {
|
||||||
case 2:
|
case 2:
|
||||||
Width = 1;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
Width = 2;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
Width = 3;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,24 +176,113 @@ TmpMemIo (
|
||||||
//
|
//
|
||||||
// functions defined in decode.c
|
// functions defined in decode.c
|
||||||
//
|
//
|
||||||
VOID UNDI_GetState();
|
VOID
|
||||||
VOID UNDI_Start();
|
UNDI_GetState (
|
||||||
VOID UNDI_Stop();
|
IN PXE_CDB *CdbPtr,
|
||||||
VOID UNDI_GetInitInfo();
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
VOID UNDI_GetConfigInfo();
|
);
|
||||||
VOID UNDI_Initialize();
|
|
||||||
VOID UNDI_Reset();
|
VOID
|
||||||
VOID UNDI_Shutdown();
|
UNDI_Start (
|
||||||
VOID UNDI_Interrupt();
|
IN PXE_CDB *CdbPtr,
|
||||||
VOID UNDI_RecFilter();
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
VOID UNDI_StnAddr();
|
);
|
||||||
VOID UNDI_Statistics();
|
|
||||||
VOID UNDI_ip2mac();
|
VOID
|
||||||
VOID UNDI_NVData();
|
UNDI_Stop (
|
||||||
VOID UNDI_Status();
|
IN PXE_CDB *CdbPtr,
|
||||||
VOID UNDI_FillHeader();
|
IN NIC_DATA_INSTANCE *AdapterInfo
|
||||||
VOID UNDI_Transmit();
|
);
|
||||||
VOID UNDI_Receive();
|
|
||||||
|
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_new(UINT64);
|
||||||
VOID UNDI_APIEntry_old(UINT64);
|
VOID UNDI_APIEntry_old(UINT64);
|
||||||
|
|
|
@ -39,12 +39,4 @@ Abstract:
|
||||||
//
|
//
|
||||||
#include <Guid/PeiPerformanceHob.h>
|
#include <Guid/PeiPerformanceHob.h>
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
PeiCore (
|
|
||||||
IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,
|
|
||||||
IN VOID *Data
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -144,6 +144,7 @@ PERFORMANCE_PROTOCOL mPerformanceInterface = {
|
||||||
@retval The index of gauge entry in the array.
|
@retval The index of gauge entry in the array.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
UINT32
|
UINT32
|
||||||
InternalSearchForGaugeEntry (
|
InternalSearchForGaugeEntry (
|
||||||
IN CONST VOID *Handle, OPTIONAL
|
IN CONST VOID *Handle, OPTIONAL
|
||||||
|
@ -363,6 +364,7 @@ GetGauge (
|
||||||
to DXE performance data structures.
|
to DXE performance data structures.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
InternalGetPeiPerformance (
|
InternalGetPeiPerformance (
|
||||||
VOID
|
VOID
|
||||||
|
@ -625,5 +627,5 @@ PerformanceMeasurementEnabled (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ DebugPrint (
|
||||||
//
|
//
|
||||||
// Send the print string to a Serial Port
|
// 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
|
// 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
|
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings
|
||||||
|
@ -176,7 +176,7 @@ DebugAssertEnabled (
|
||||||
VOID
|
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
|
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
|
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
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
|
return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ STATIC PERFORMANCE_PROTOCOL *mPerformance = NULL;
|
||||||
@retval Other Performance protocol is not located to log performance.
|
@retval Other Performance protocol is not located to log performance.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GetPerformanceProtocol (
|
GetPerformanceProtocol (
|
||||||
VOID
|
VOID
|
||||||
|
@ -245,5 +246,5 @@ PerformanceMeasurementEnabled (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ Abstract:
|
||||||
EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService = NULL;
|
EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService = NULL;
|
||||||
EFI_PLABEL mPlabel;
|
EFI_PLABEL mPlabel;
|
||||||
|
|
||||||
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DxeSalLibInitialize (
|
DxeSalLibInitialize (
|
||||||
|
@ -43,7 +44,7 @@ DxeSalLibInitialize (
|
||||||
// virtual). So lets grap the physical PLABEL for the EsalEntryPoint and store it
|
// 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.
|
// 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)) {
|
if (EFI_ERROR (Status)) {
|
||||||
mEsalBootService = NULL;
|
mEsalBootService = NULL;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@ -58,6 +59,7 @@ DxeSalLibInitialize (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DxeSalVirtualNotifyEvent (
|
DxeSalVirtualNotifyEvent (
|
||||||
|
|
|
@ -36,6 +36,7 @@ Abstract:
|
||||||
@retval The index of log entry in the array.
|
@retval The index of log entry in the array.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
PEI_PERFORMANCE_LOG_HEADER *
|
PEI_PERFORMANCE_LOG_HEADER *
|
||||||
InternalGetPerformanceHobLog (
|
InternalGetPerformanceHobLog (
|
||||||
VOID
|
VOID
|
||||||
|
@ -83,6 +84,7 @@ InternalGetPerformanceHobLog (
|
||||||
@retval The index of log entry in the array.
|
@retval The index of log entry in the array.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
UINT32
|
UINT32
|
||||||
InternalSearchForLogEntry (
|
InternalSearchForLogEntry (
|
||||||
IN PEI_PERFORMANCE_LOG_HEADER *PeiPerformanceLog,
|
IN PEI_PERFORMANCE_LOG_HEADER *PeiPerformanceLog,
|
||||||
|
@ -326,5 +328,5 @@ PerformanceMeasurementEnabled (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ Abstract:
|
||||||
|
|
||||||
|
|
||||||
#include "Common/FirmwareFileSystem.h"
|
#include "Common/FirmwareFileSystem.h"
|
||||||
|
#include "GuidedSection.h"
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GuidedSectionExtractionProtocolConstructor (
|
GuidedSectionExtractionProtocolConstructor (
|
||||||
|
|
Loading…
Reference in New Issue