| This thesis mainly focuses on DM9103EP driver design on EM8623 platform. The system is uClinux running on ARM7 processor unit without MMU.The processor EM8623 could not use virtual memory as it has no memory management unit, therefore, EM8623 using pagination technique to manage the system memory source. The EM8623 is an advanced, single-chip audio/video decoder that provides highly-integrated solutions for HDTV, IPTV, DVD, MPEG-4.10 (H.264) and WMV9/VC-1 decoding. It incorporates flexible, advanced audio/video processing, enabling cost-effective solutions for consumer appliances. A 32-bit G-Bus connects the integrated ARM-compatible RISC processor with each functional unit.The DM9103EP is a fully integrated, high performance, and cost-effective fast Ethernet switch controller with one general PCI bus interface, two ports 10M/100Mbps PHY, and one port MII or RMII interface. The general PCI bus connects directly to internal host MAC with 32-bit data registers and internal memory. The host MAC has the similar functions as other 10/100Mbps PHY or MII does. This makes the DM9103EP act as an extended four ports switch and to shorten the latency from PCI port to destination port. The internal memory of the DM9103EP supports up to 1K uni-cast MAC address table, and provides to three ports'and PCI port's transmit and receive buffers. Each port of the DM9103EP provides four queues of priority transmit, that can be defined by port-based,802.1p VLAN, or IP packet ToS field automatically. The TCP/UDP/IPv4 checksum generation and checking functions are also provided by PCI port to offload the processor computing loading.PCI configure fields are isolated from CPU and Linux kernel processes. However, PCI bus registers could be mapping into RAM using DMA method, to fit for the CPU actions.DMA method is also designed to be used in RX/TX functions. During the TX process, program in user space using protocol in kernel to send the data packet into DMA mapped structure; and then call the TX function to send the packet. After the TX process successfully finished, DM9103EP chip sent a interrupt to inform CPU the TX status. During the RX process, in very short time, the packet arrived to the network device, the DM9103EP send an interrupt to CPU, and CPU will get data packet through the DMA mapped region. There are three conditions will cause interrupt:TX finished, RX begin, and PCI bus error. For the preventing of numerous interrupts crash the CPU processing, we design the DM9103EP driver interrupt function as simpler as possible. The Ethernet switch process don't involved into interrupt courses. Driver sends the filter frame to modify the switch and VLAN functions.This thesis aimed at the Linux device driver design, and it detailed in steps to demonstrate the DM9103EP driver coding theory. According to this driver's sustain, uClinux which running on EM8623 platform will support TCP/IP,FTP,RTSP,VPN network protocols through the kernel protocol stack. |