![]() |
MCUSW
|
The Virtual Mac Ethernet Driver provides low-level access to the five-port or night-port Gigabit Ethernet Switch hardware in the Jacinto 7 family which integrate Ethernet Firmware functionality.
The Ethernet Driver is part of the Communication Stack in the AUTOSAR Basic Software (BSW).
Functions | |
| FUNC (Std_ReturnType, ETH_CODE) Eth_VirtMacRpcInit(P2CONST(Eth_ConfigType | |
| This function initializes Eth Virtual MAC driver's Remote Procedure Call. More... | |
| FUNC (void, ETH_CODE) Eth_VirtMac_MainFunction(uint8 ctrlIdx) | |
| This function initializes the driver. More... | |
Variables | |
| AUTOMATIC | |
| ETH_PBCFG | CfgPtr |
| uint8 * | macAddress |
| uint8 * | ipv4Address |
| uint8 uint32 | vlanId |
| FUNC | ( | Std_ReturnType | , |
| ETH_CODE | |||
| ) |
This function initializes Eth Virtual MAC driver's Remote Procedure Call.
Dispatch virtual VLAN leave command to ethernet firmware.
Dispatch virtual VLAN join request to ethernet firmware.
Dispatch virtual mac removal of given mac address from switch address resolution table request to ethernet firmware.
Dispatch virtual mac addition of given multicast address to switch address resolution table request to ethernet firmware.
Dispatch virtual mac IPV4 address:destination mac disassociation request to ethernet firmware.
Dispatch virtual mac IPV4 address:destination mac association request to ethernet firmware.
Dispatch virtual mac destination traffic unsubscription request to ethernet firmware.
Dispatch virtual mac destination mac traffic subscription request to ethernet firmware.
Dispatch virtual mac all traffic unsubscription request to ethernet firmware.
Dispatch virtual mac all traffic subscription request to ethernet firmware.
Notify Ethernet driver that a RPC msg has been received from ethernet firmware.
Dispatch virtual mac deinit request to ethernet firmware.
Dispatch virtual mac initialization request to ethernet firmware.
* Service name : Eth_VirtMacRpcInit * Syntax : Std_ReturnType Eth_VirtMacRpcInit(Eth_ConfigType *CfgPtr) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x2BU * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CfgPtr. Pointer to virt mac config struct. Refer to /ref Eth_ConfigType * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function initializes the RPC configuration required to invoke remote procedure * calls to ethernet firmware to enable data path setup to AUTOSAR Eth MCAL * driver. On initialization of AUTOSAR MCAL driver in virtual mac mode, the driver * announces autosar ethernet mcal driver RpMsg service to the ethernet * firmware core. The ethernet firmware server service will block waiting for * the announcment from MCAL driver and then attach to the Ethernet MCAL driver * by sending it a EthFwInfo msg * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacInit * Syntax : Std_ReturnType Eth_DispatchVirtmacInit(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x1CU * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: RPC init failed * * Description : The function dispatches RPC command to ethernet * firmware core to allocate data path resources. * The allocated Tx, Rx DMA channels are then setup in the * Eth_Init() API. The function only send the * RPC msg to ethernet firmware core. Completion of RPC msg * processing is indicated by invokcation of * rpcCmdComplete part of Eth_ConfigType sturcture. * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacDeinit * Syntax : Std_ReturnType Eth_DispatchVirtmacDeinit(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x1DU * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: virtual mac init failed * * Description : The function dispatches RPC command to ethernet * firmware core to free data path resources. * This function dispatches RPC msg to ethernet firmware core. * Completion of RPC msg processing is indicated by invokcation * of rpcCmdComplete part of Eth_ConfigType sturcture. * Once complete the data path to Ethernet virtual MAC * has been torn down and driver can no loner send or receive packets *
* Service name : Eth_NotifyVirtmacMsgReceived * Syntax : Std_ReturnType Eth_NotifyVirtmacMsgReceived(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x1EU * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : Invocation of this function will cause the Ethernet * MCAL driver to process any queued messages received * from ethernet firmware. Depending on type of msg received * ethernet firmware will invoke rpcCmdComplete/fwRegisteredCb * application callbacks. This function is typically * called from the Cdd_IpcNewMessageNotify if the channel * id matches the Ethernet MCAL IPC channel id * (ethfwRpcComChId member of Eth_ConfigType structure) * Application can also trigger recv msg processing by * setting pollRecvMsgInEthMain in Eth_ConfigType to TRUE * Invoking Eth_MainFunction with this config set will * trigger recv msg processing. In triggering recv msg * processing from Eth_MainFunction, this API should be * disabled * *
* Service name : Eth_DispatchVirtmacSubscribeAllTraffic * Syntax : Std_ReturnType Eth_DispatchVirtmacSubscribeAllTraffic(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x1FU * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to subscribe to all default flow traffic * received on host port.The default flow contains all * traffic that is not explicitly categorized into a specific * flow using a classifier entry in the switch . * Note that only one core can subscribe to default flow * traffic in a system and this is by default the ethernet * firmware core. This API requires a compatible ethernet * firmware that _does_ _not_ subscribe to default flow * and allows Eth Driver to subscribe to default flow * The function only send the RPC msg to ethernet firmware core. * Completion of RPC msg processing is indicated by invokcation of * rpcCmdComplete part of Eth_ConfigType sturcture. * A failure status indicates ethernet firmware does not allow * AUTOSAR Eth Driver to subscribe to default flow * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeAllTraffic() * 7. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacUnsubscribeAllTraffic * Syntax : Std_ReturnType Eth_DispatchVirtmacUnsubscribeAllTraffic(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x20U * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to unsubscribe to all default flow traffic * received on host port.The driver should have subscribed * to all default flow traffic previously by invoking * Eth_DispatchVirtmacSubscribeAllTraffic(). * On unsubscribing to default flow all traffic with * default flow will be dropped. * The function only send the RPC msg to ethernet firmware core. * Completion of RPC msg processing is indicated by invokcation of * rpcCmdComplete part of Eth_ConfigType sturcture. * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeAllTraffic() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_SetControllerMode(ETH_MODE_ACTIVE) * 9. Packet processing using Eth_Receive/Eth_Trasmit * 10. Eth_DispatchVirtmacUnsubscribeAllTraffic * 11. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure * *
* Service name : Eth_DispatchVirtmacSubscribeDstMac * Syntax : Std_ReturnType Eth_DispatchVirtmacSubscribeDstMac(CtrlIdx, macAddress) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x21 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * macAddress: Destination Mac address * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to subscribe to traffic with the given * destination macAddress to be routed to the rx flow * of the Ethernet MCAL driver so that driver can receive * the packets.The macAddres can be a unicast address * allocated to the EthDriver (returned by Eth_GetPhysAddr()) * or a multicast address. * The switch address resolution table should have an entry to * route the destination mac address to the host port. * For unicast address , the switch address resolution table * can be updated using Eth_DispatchVirtmacSubscribeDstMac() * For multicast address , the switch address resolution table * can be updated using Eth_DispatchVirtmacSubscribeDstMac() * Note that broadcast address is usually subscribed to by * ethernet firmware so that it can respond to ARP requests. * If ARP response handling by ethernet firmware is required, * Eth driver should not be subscribed to broadcast address. * The function only send the RPC msg to ethernet firmware core. * Completion of RPC msg processing is indicated by invokcation of * rpcCmdComplete part of Eth_ConfigType sturcture. * A failure status indicates ethernet firmware does not allow * AUTOSAR Eth Driver to subscribe to default flow * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacUnsubscribeDstMac * Syntax : Std_ReturnType Eth_DispatchVirtmacUnsubscribeDstMac(CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x22 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * macAddress: Destination Mac address * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to unsubscribe the specified destination * mac address flow traffic received on host port. * The driver should have subscribed to the destination mac * address previously by invoking * Eth_DispatchVirtmacSubscribeDstMac(). * On unsubscribing to destination mac flow , traffic with * given destination mac address flow will be directed to * default flow. * The function only send the RPC msg to ethernet firmware core. * Completion of RPC msg processing is indicated by invokcation of * rpcCmdComplete part of Eth_ConfigType sturcture. * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_SetControllerMode(ETH_MODE_ACTIVE) * 9. Packet processing using Eth_Receive/Eth_Trasmit * 10. Eth_DispatchVirtmacUnsubscribeDstMac() * 11. Wait for rpcCmdComplete() callback with status E_OK * 12. Eth_SetControllerMode(ETH_MODE_DOWN) * Note that all subscribed MAC address must be unsubscribed * before Eth_SetControllerMode(ETH_MODE_DOWN) is invoked * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacAssociateIPv4Macaddr * Syntax : Std_ReturnType Eth_DispatchVirtmacAssociateIPv4Macaddr(CtrlIdx, ipv4Address, macAddress) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x23 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * ipv4Address: IPv4 address * macAddress: Destination Mac address * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to associate the given unicast macaddress * with the given IP address. * The ethernet firmware maintains the ARP database for * the ethernet driver and ethfw will respond to any ARP request. * To correctly respond to ARP queries for IP address assigned to * the AUTOSAR network stack , the AUTOSAR stack must invoke * this API so that the ARP database maintained by ethernet * firmware is updated.The macAddres must be a unicast address * allocated to the EthDriver (returned by Eth_GetPhysAddr()) * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_SetControllerMode(ETH_MODE_ACTIVE) * 9. Send out DHCP request to acquire IP address for the * AUTOSAR network stack * 10. On getting DHCP response with IP address, invoke * Eth_DispatchVirtmacAssociateIPv4Macaddr * 11. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacDisassociateIPv4Macaddr * Syntax : Std_ReturnType Eth_DispatchVirtmacDisassociateIPv4Macaddr(CtrlIdx, ipv4Address) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x24 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * ipv4Address: IPv4 address * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to remove the given IP address from the * ARP database maintained by ethernet firmware. * On deletion the ethfw will no longer respond to any ARP * queries for the given IP address. * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_SetControllerMode(ETH_MODE_ACTIVE) * 9. Send out DHCP request to acquire IP address for the * AUTOSAR network stack * 10. On getting DHCP response with IP address, invoke * Eth_DispatchVirtmacAssociateIPv4Macaddr * 11. Wait for rpcCmdComplete() callback with status E_OK * 12. Network Packet processing * 13. Eth_DispatchVirtmacDisassociateIPv4Macaddr * 14. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacAddMcastAddr * Syntax : Std_ReturnType Eth_DispatchVirtmacAddMcastAddr(CtrlIdx, macAddress, numLsbToIgnore, vlanId, portList) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x26 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * macAddress: _Exclusive_ multicast address, or _shared_ multicast address * in devices with ALE multihost support * vlanId: Vlan Id associated with the mac Address. If vlan id is not needed, 0 should be passed * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to add the given multicast macaddress * to the switch address resolution table with the given * vlan id. * Note that this API requires that either the address is an * _exclusive_ multicast address not claimed by any other * remote client, or if the address is a _shared_ multicast * address that the device supports ALE multihost feature * (ETHFW with VEPA support). _Shared_ multicast address * support in devices withotu ALE multihost feature are * currently not supported as this requires shared memory * packet transfer, which is not supported in MCAL. * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_DispatchVirtmacAddMcastAddr() * 9. Wait for rpcCmdComplete() callback with status E_OK * 10. Eth_SetControllerMode(ETH_MODE_ACTIVE) * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacDelAddr * Syntax : Std_ReturnType Eth_DispatchVirtmacDelAddr(uint8 CtrlIdx, uint8 *macAddress, uint32 vlanId) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x27 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * macAddress: Multicast Mac address to be removed from filter * vlanId: Vlan Id associated with the mac Address. If vlan id is not needed, 0 should be passed * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to remove the given multicast macaddress * and vlan id from the switch address resolution table * On removal of entry switch would switch frames * received with the given destination macAddress: * vlan id combo by flooding to all the ports in vlan membership. * Address should have been added previously using * Eth_DispatchVirtmacAddMcastAddr(). * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_DispatchVirtmacAddMcastAddr() * 9. Wait for rpcCmdComplete() callback with status E_OK * 10. Eth_DispatchVirtmacDelAddr() * 11. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacAddVlan * Syntax : Std_ReturnType Eth_DispatchVirtmacAddVlan(CtrlIdx, vlanId) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x28 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * vlanId: Vlan Id for which port membership is to be added to switch VLAN membership table * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to join a VLAN. The VLAN creation is * owned by ethernet firmware which defines what * Ethernet ports and virtual ports are members. If * the virtual client is not a member of the VLAN, then * the request to join the VLAN will be rejected. * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_DispatchVirtmacAddVlan() * 9. Wait for rpcCmdComplete() callback with status E_OK * 10. Eth_SetControllerMode(ETH_MODE_ACTIVE) * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
* Service name : Eth_DispatchVirtmacDelVlan * Syntax : Std_ReturnType Eth_DispatchVirtmacDelVlan(uint8 CtrlIdx, uint32 vlanId) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x29 * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Driver * vlanId: Vlan Id which is to be removed from switch VLAN membership table * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * E_OK: success * E_NOT_OK: otherwise * * Description : The function dispatches RPC command to ethernet * firmware core to leave a VLAN previously joined * through Eth_DispatchVirtmacAddVlan(). * If configured in virtual mac mode application should * invoke this API as follows: * 1. Eth_VirtMacRpcInit() * 2. Wait for fwRegisteredCb() callback * 3. Eth_DispatchVirtmacInit * 4. Wait for rpcCmdComplete() callback with status E_OK * 5. Eth_Init() * 6. Eth_DispatchVirtmacSubscribeDstMac() * 7. Wait for rpcCmdComplete() callback with status E_OK * 8. Eth_DispatchVirtmacAddVlan() * 9. Wait for rpcCmdComplete() callback with status E_OK * 10. Eth_DispatchVirtmacDelVlan() * 11. Wait for rpcCmdComplete() callback with status E_OK * The callbacks fwRegisteredCb() and rpcCmdComplete() are * populated by the application as part of the Eth_ConfigType * structure *
| FUNC | ( | void | , |
| ETH_CODE | |||
| ) |
This function initializes the driver.
The function checks for state related to EthFw(attach/error, or new message from EthFw) polling state changes.
* Service name : Eth_VirtMac_MainFunction * Syntax : Std_ReturnType Eth_VirtMac_MainFunction(uint8 CtrlIdx) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : None * Sync/Async : Asynchronous * Reentrancy : Non-Reentrant * Parameters (in) : CtrlIdx: Index of the controller within the context of the * Ethernet Drivere * Parameters (inout): None * Parameters (out) : None * Return value : None * * Description : The function check the controller state(firmware attach state or * recovery state) *
The function checks for controller errors and lost frames. Used for polling state changes. Calls EthIf_CtrlModeIndication when the controller mode changed.
Function returns the version information of this module.
This function triggers frame transmission confirmation.
This function triggers frame reception.
This function reads back the ingress time stamp on a dedicated message object.
This function reads back the egress time stamp on a dedicated message object.
This function activates egress time stamping on a dedicated message object.
This function sets the physical source address used by the indexed controller.
This function obtains the physical source address used by the indexed controller.
* Service name : Eth_Init * Syntax : void Eth_Init( * const Eth_ConfigType* CfgPtr * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x01 * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CfPtr. Points to the implementation specific structure * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : Initializes the Ethernet Driver. *
* Service name : Eth_GetPhysAddr * Syntax : void Eth_GetPhysAddr( * uint8 CtrlIdx, * uint8 *PhysAddrPtr * ) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : 0x08 * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): * Parameters (out) : PhysAddrPtr. Physical source address (MAC address) in network * byte order * Return value : None * Description : Obtains the physical source address used by the indexed * controller. *
* Service name : Eth_SetPhysAddr * Syntax : void Eth_SetPhysAddr( * uint8 CtrlIdx, * const uint8* PhysAddrPtr * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x13 * Sync/Async : Synchronous * Reentrancy : Non Reentrant for the same CtrlIdx, reentrant for different * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * PhysAddrPtr. Pointer to memory containing the physical source * address (MAC address) in network byte order * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : Sets the physical source address used by the indexed * controller. *
* Service name : Eth_EnableEgressTimeStamp * Syntax : void Eth_EnableEgressTimeStamp( * uint8 CtrlIdx, * Eth_BufIdxType BufIdx * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x17 * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * BufIdx. Index of the message buffer, where Application * expects egress time stamping * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : Activates egress time stamping on a dedicated message * object. * Some HW does store once the egress time stamp marker and * some HW needs it always before transmission. There will be * no disable functionality, due to the fact, that the message * type is always "time stamped" by network design. *
* Service name : Eth_GetEgressTimeStamp * Syntax : void Eth_GetEgressTimeStamp( * uint8 CtrlIdx, * Eth_BufIdxType BufIdx, * Eth_TimeStampQualType* timeQualPtr, * Eth_TimeStampType *timeStampPtr * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x18 * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * BufIdx. Index of the message buffer, where Application * expects egress time stamping * Parameters (inout): timeQualPtr. Quality of HW time stamp, e.g. based on current * drift * timeStampPtr. Current time stamp * Parameters (out) : None * Return value : None * Description : Reads back the egress time stamp on a dedicated message * object. * It must be called within the TxConfirmation() function. *
* Service name : Eth_GetIngressTimeStamp * Syntax : void Eth_GetIngressTimeStamp( * uint8 CtrlIdx, * Eth_DataType* DataPtr, * Eth_TimeStampQualType* timeQualPtr, * Eth_TimeStampType *timeStampPtr * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x19 * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * DataPtr. Pointer to the message buffer, where Application * expects ingress time stamping * Parameters (inout): timeQualPtr. Quality of HW time stamp, e.g. based on current * drift * timeStampPtr. Current time stamp * Parameters (out) : None * Return value : None * Description : Reads back the ingress time stamp on a dedicated message * object. * It must be called within the RxIndication() function. *
* Service name : Eth_Receive * Syntax : void Eth_Receive( * uint8 CtrlIdx, * uint8 FifoIdx, * Eth_RxStatusType* RxStatusPtr * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0xB * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (in) : FifoIdx. Specifies the related fifo * Parameters (inout): None * Parameters (out) : RxStatusPtr. Indicates whether a frame has been received and * if so, whether more frames are available or * frames got lost * Return value : None * Description : Triggers frame reception. *
* Service name : Eth_TxConfirmation * Syntax : void Eth_TxConfirmation( * uint8 CtrlIdx * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0xC * Sync/Async : Synchronous * Reentrancy : Non Reentrant * Parameters (in) : CtrlIdx. Index of the controller within the context of the * Ethernet Driver * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : Triggers frame transmission confirmation. *
* Service name : Eth_GetVersionInfo * Syntax : void Eth_GetVersionInfo( * Std_VersionInfoType* versioninfo * ) * Mode : User Mode (Non-Privileged Mode) * Service ID[hex] : 0xD * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : None * Parameters (inout): None * Parameters (out) : VersionInfoPtr. Pointer to where to store the version * information of this module * Return value : None * Description : Returns the version information of this module. *
* Service name : Eth_MainFunction * Syntax : void Eth_MainFunction( * void * ) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : 0x0A * Description : The function checks for controller errors and lost frames. * Used for polling state changes. Calls EthIf_CtrlModeIndication * when the controller mode changed. *
| AUTOMATIC |
| ETH_PBCFG CfgPtr |
| uint8 * macAddress |
| uint8 * ipv4Address |
| uint32 vlanId |