1 / 4

Using RealTek interrupts

Using RealTek interrupts. We construct a prototype driver that supports receiving of network packets. Interrupt Mask Register. 15 14 13 6 5 4 3 2 1 0. S E R R. T i m e O u t. L e n C h g. reserved. R

audra-ford
Télécharger la présentation

Using RealTek interrupts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using RealTek interrupts We construct a prototype driver that supports receiving of network packets

  2. Interrupt Mask Register 15 14 13 6 5 4 3 2 1 0 S E R R T i m e O u t L e n C h g reserved R X F O V F P U N / L C R X B O V F T E R T O K R E R R O K 0x3C Legend ROK (Received OK packet) TOK (Transmit completed OK) RER (Received Error packet) TER (Transmit was aborted) RxBOvf (Receive Buffer Overflowed) SERR (System Error on PCI bus) RxFOvf (Receive FIFO Overflowed) LenChg (Cable Length changed) TimeOut (Timer Count == Timer Intr) PUN/LC (Packet Underrun/Link Changed) (0 = masked, 1=unmasked)

  3. Interrupt Status Register 15 14 13 6 5 4 3 2 1 0 S E R R T i m e O u t L e n C h g reserved R X F O V F P U N / L C R X B O V F T E R T O K R E R R O K 0x3E Legend ROK (Received OK packet) TOK (Transmit completed OK) RER (Received Error packet) TER (Transmit was aborted) RxBOvf (Receive Buffer Overflowed) SERR (System Error on PCI bus) RxFOvf (Receive FIFO Overflowed) LenChg (Cable Length changed) TimeOut (Timer Count == Timer Intr) PUN/LC (Packet Underrun/Link Changed) (0 = inactive, 1=active) NOTE: An ‘active’ bit is cleared by writing ‘1’ to that bit

  4. A code ‘walkthrough’ • We have written an initial ‘prototype’ for a character-mode device-driver for the 8139 • It supports packet-reception (w/ interrupts) • A companion application (‘nicread.cpp’) is useful for testing this device driver • We will walk through the driver’s design • Can you spot any ‘bugs’ in this driver? • Can you implement packet-transmission?

More Related