mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
zynq: make nic driver independent of hw kernel
Use uncached ram dataspace for RX and TX communication buffers instead of cache maintainance functions that are not part of the Genode API. Fix #3291
This commit is contained in:
parent
c767f6ccf1
commit
d6332f1767
@ -28,8 +28,6 @@
|
|||||||
#include "rx_buffer_descriptor.h"
|
#include "rx_buffer_descriptor.h"
|
||||||
#include "marvell_phy.h"
|
#include "marvell_phy.h"
|
||||||
|
|
||||||
#include <kernel/interface.h>
|
|
||||||
|
|
||||||
namespace Genode
|
namespace Genode
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -486,16 +484,6 @@ namespace Genode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _invalidate_rx_buffers()
|
|
||||||
{
|
|
||||||
Kernel::update_data_region(_rx_buf_region, _rx_buf_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _clean_tx_buffers()
|
|
||||||
{
|
|
||||||
Kernel::update_data_region(_tx_buf_region, _tx_buf_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void _handle_irq()
|
virtual void _handle_irq()
|
||||||
{
|
{
|
||||||
/* 16.3.9 Receiving Frames */
|
/* 16.3.9 Receiving Frames */
|
||||||
@ -503,8 +491,6 @@ namespace Genode
|
|||||||
const Interrupt_status::access_t status = read<Interrupt_status>();
|
const Interrupt_status::access_t status = read<Interrupt_status>();
|
||||||
const Rx_status::access_t rxStatus = read<Rx_status>();
|
const Rx_status::access_t rxStatus = read<Rx_status>();
|
||||||
|
|
||||||
_invalidate_rx_buffers();
|
|
||||||
|
|
||||||
if ( Interrupt_status::Rx_complete::get(status) ) {
|
if ( Interrupt_status::Rx_complete::get(status) ) {
|
||||||
|
|
||||||
while (_rx_buffer.next_packet()) {
|
while (_rx_buffer.next_packet()) {
|
||||||
@ -598,7 +584,7 @@ namespace Genode
|
|||||||
addr_t const base, size_t const size, const int irq)
|
addr_t const base, size_t const size, const int irq)
|
||||||
:
|
:
|
||||||
Genode::Attached_mmio(env, base, size),
|
Genode::Attached_mmio(env, base, size),
|
||||||
Session_component(tx_buf_size, rx_buf_size, Genode::CACHED,
|
Session_component(tx_buf_size, rx_buf_size, Genode::UNCACHED,
|
||||||
rx_block_md_alloc, env),
|
rx_block_md_alloc, env),
|
||||||
_timer(env),
|
_timer(env),
|
||||||
_sys_ctrl(env, _timer),
|
_sys_ctrl(env, _timer),
|
||||||
@ -707,8 +693,6 @@ namespace Genode
|
|||||||
{
|
{
|
||||||
_handle_acks();
|
_handle_acks();
|
||||||
|
|
||||||
_clean_tx_buffers();
|
|
||||||
|
|
||||||
while (_send());
|
while (_send());
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -1,5 +1,5 @@
|
|||||||
REQUIRES = hw arm_v7
|
REQUIRES = arm_v7
|
||||||
TARGET = zynq_nic_drv
|
TARGET = zynq_nic_drv
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
LIBS = base syscall-hw
|
LIBS = base
|
||||||
INC_DIR += $(PRG_DIR)
|
INC_DIR += $(PRG_DIR)
|
Loading…
Reference in New Issue
Block a user