53 void *
operator new(
size_t aSize_byte,
void * aAddress);
156 virtual bool SetMemory(
unsigned int aIndex,
void * aMemory_MA,
unsigned int aSize_byte);
218 virtual bool Interrupt_Process(
unsigned int aMessageId,
bool * aNeedMoreProcessing);
361 virtual void Packet_Send_NoLock(uint64_t aPacket_PA,
const void * aPacket_XA,
unsigned int aSize_byte,
volatile long * aCounter) = 0;
381 virtual bool Packet_Send(
const void * aPacket,
unsigned int aSize_byte,
bool aPriority,
unsigned int aRepeatCount = 1) = 0;
402 virtual unsigned int Statistics_Get(uint32_t * aOut,
unsigned int aOutSize_byte,
bool aReset);
451 void Unlock_AfterReceive(
volatile long * aCounter,
unsigned int aPacketQty);
452 void Unlock_AfterSend (
volatile long * aCounter,
unsigned int aPacketQty);
473 static void SkipDangerousBoundary(uint64_t * aIn_PA, uint8_t ** aIn_XA,
unsigned int aSize_byte, uint64_t * aOut_PA, uint8_t ** aOut_XA);
488 Hardware(OpenNetK::Adapter_Type aType,
unsigned int aPacketSize_byte);
580 inline void Hardware::Tick()
This structure is used to return the information about an adapter.
Definition: Adapter_Types.h:227
unsigned int GetCommonBufferSize() const
Retrieve the common buffer size.
virtual void Interrupt_Enable()
Enable the interrupts.
void Unlock_AfterReceive_FromThread(volatile long *aCounter, unsigned int aPacketQty, uint32_t aFlags)
Unlock the hardware after programming receive descriptors.
OpenNet_BufferHeader, OpenNet_PacketInfo (RT)
virtual void ResetMemory()
Reset all memory regions.
This class cache packet information.
Definition: Packet.h:30
Hardware(OpenNetK::Adapter_Type aType, unsigned int aPacketSize_byte)
The default constructor.
virtual void Unlock_AfterSend_Internal()=0
Hardware dependent part of the Unlock_AfterSend.
virtual void Interrupt_Disable()
Disable the interrupts.
virtual void Tx_Enable()
Enable transmission.
unsigned int GetPacketSize() const
Retrieve the configured maximum packet size.
virtual bool Packet_Drop()=0
Add a buffer to the receiving queue.
virtual bool Interrupt_Process(unsigned int aMessageId, bool *aNeedMoreProcessing)
Process an interrupt.
This structure is used to pass the configuration.
Definition: Adapter_Types.h:198
virtual void Interrupt_Process3()
Process an interrupt at third level.
virtual void Statistics_Reset()
Reset the statistics.
void Unlock_AfterSend_FromThread(volatile long *aCounter, unsigned int aPacketQty, uint32_t aFlags)
Unlock the hardware after programming transmit descriptors.
void Lock()
Lock the hardware.
Definition: Hardware.h:562
Adapter_Config mConfig
The adapter configuration.
Definition: Hardware.h:518
void Unlock()
Unlock.
Definition: SpinLock.h:118
This structure is used to return the status.
Definition: Adapter_Types.h:260
SpinLock interface.
Definition: SpinLock.h:36
This class defines the hardware interface.
Definition: Hardware.h:37
virtual bool Packet_Send(const void *aPacket, unsigned int aSize_byte, bool aPriority, unsigned int aRepeatCount=1)=0
Add the packet to the send queue.
virtual unsigned int Statistics_Get(uint32_t *aOut, unsigned int aOutSize_byte, bool aReset)
Retrieve statistics.
void Lock()
Lock.
Definition: SpinLock.h:113
void Unlock()
Unlock the hardware.
Definition: Hardware.h:567
OpenNetK::Adapter_Config, OpenNetK::Adapter_Info, OpenNetK::Adapter_State, OpenNetK::Buffer, OpenNetK::EthernetAddress, OpenNetK::IPv4Address, OpenNetK::VersionInfo (SDK)
virtual void SetConfig(const Adapter_Config &aConfig)
Set the configuation.
virtual void Packet_Receive_NoLock(Packet *aPacket, volatile long *aCounter)=0
Add the packet to the receiving queue.
virtual void GetState(Adapter_State *aState)=0
Retrieve the current state.
virtual bool D0_Exit()
Exit the D0 state.
virtual void D0_Entry()
Enter the D0 state.
virtual bool SetMemory(unsigned int aIndex, void *aMemory_MA, unsigned int aSize_byte)
Set a memory region.
virtual void Unlock_AfterReceive_Internal()=0
Hardware dependent part of the Unlock_AfterReceive.
virtual void Packet_Send_NoLock(uint64_t aPacket_PA, const void *aPacket_XA, unsigned int aSize_byte, volatile long *aCounter)=0
Add the packet to the send queue.
virtual void SetAdapter(Adapter *aAdapter)
Connect the adapter.
bool Tx_IsEnabled() const
Is Tx enabled?
Definition: Hardware.h:572
virtual void Interrupt_Process2(bool *aNeedMoreProcessing)
Process an interrupt at seconde level.
This class maintains information about an adapter on the OpenNet internal network.
Definition: Adapter.h:51
static void SkipDangerousBoundary(uint64_t *aIn_PA, uint8_t **aIn_XA, unsigned int aSize_byte, uint64_t *aOut_PA, uint8_t **aOut_XA)
Skip the dangerous 64 KiB boundaries.
virtual void Tx_Disable()
Disable transmission.
uint32_t mStatistics[64]
The adapter configuration.
Definition: Hardware.h:534
Adapter_Info mInfo
The information about the adapter.
Definition: Hardware.h:526
SpinLock * mZone0
The SpinLock used to lock the hardware.
Definition: Hardware.h:545
virtual void SetCommonBuffer(uint64_t aCommon_PA, void *aCommon_CA)
Set the common buffer.