• Advanced Systems Programming - Lesson 23: More 82573L detailsAdvanced Systems Programming - Lesson 23: More 82573L details

    Statistics registers • The 82573L has several dozen statistical counters which automatically operate to keep track of significant events affecting the ethernet controller’s performance • Most are 32-bit ‘read-only’ registers, and they are automatically cleared when read • Your module’s initialization routine could read them all (to start co...

    pdf20 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 933 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 22: 82573LAdvanced Systems Programming - Lesson 22: 82573L

    • We want to create a Linux Kernel Module that can serve application-programs as a character-mode device-driver for our NIC • So, as with the UART device, we will need to implement ‘read()’ and ‘write()’ methods • But which method should we do first? • No way to “test” a ‘read()’ method without having a way to send packets to our NIC

    pdf25 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 927 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 21: Exploring a modern NICAdvanced Systems Programming - Lesson 21: Exploring a modern NIC

    Ethernet Versus Token Ring ETHERNET Ethernet is the most widely used data sending protocol. Each computer listens to the cable before sending data over the network. If the network is clear, the computer will transmit. If another PC is already transmitting data, the computer will wait and try again when the line is clear. If two computers trans...

    pdf19 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 957 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 20: Dynamic visualizationsAdvanced Systems Programming - Lesson 20: Dynamic visualizations

    Two ‘dynamic visualizations’ Showing the Linux kernel’s algorithm for setting up ‘permanent kernel mappings’ Showing the dual-CPUs’ responses to device-interrupts and CPU-exceptions. Some application tools • We need to modify the terminal-console’s normal way of processing keyboard-input and of displaying its line-at-a-time output • ANSI...

    pdf23 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 957 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 19: Detecting PCI devicesAdvanced Systems Programming - Lesson 19: Detecting PCI devices

    Early PCs • Peripheral devices in the early PCs used fixed i/o-ports and fixed memory-addresses, e.g.: – Video memory address-range: 0xA0000-0xBFFFF – Programmable timer i/o-ports: 0x40-0x43 – Keyboard and mouse i/o-ports: 0x60-0x64 – Real-Time Clock’s i/o-ports: 0x70-0x71 – Hard Disk controller’s i/o-ports: 0x01F0-01F7 – Graphics controlle...

    pdf22 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 961 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 18: Kernel timing issuesAdvanced Systems Programming - Lesson 18: Kernel timing issues

    Kernel timers • Linux offers a facility that lets drivers put a process to sleep until a fixed amount of time has elapsed (as measured in jiffies) • When the timer expires, a driver-defined action will be performed, which can ‘wake up’ the process that was put to sleep, or could perform some alternative action (for example, the kernel timer...

    pdf27 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 936 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 17: On using ‘tasklets’Advanced Systems Programming - Lesson 17: On using ‘tasklets’

    Recall purpose of Project #2 • Allow you to gain experience encountering the kinds of issues that commonly arise in crafting software to operate real hardware: – Learning the hardware device’s capabilities – Deciding which driver-methods to implement – Accommodating your platform’s interfaces – Exploiting the OS kernel’s support-functions –...

    pdf21 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 879 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 16: The ‘ioctl’ driver-functionAdvanced Systems Programming - Lesson 16: The ‘ioctl’ driver-function

    ‘struct file_operations’ • For a Linux device-driver’s ‘module_init()’ function, there are two main actions: – Initializing the driver’s global data-structures (this includes verifying the device’s presence) – Registering the driver’s service-functions with the kernel (i.e., the ‘file_operations’ structure) • The driver’s ‘module_exit()’ fun...

    pdf13 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 954 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 15: Access to video memoryAdvanced Systems Programming - Lesson 15: Access to video memory

    How much VRAM is needed? • This depends on (1) the total number of pixels, and on (2) the number of bits-per-pixel • The total number of pixels is determined by the screen’s width and height (measured in pixels) • Example: when our “screen-resolution” is set to 1280-by-960, we are seeing 1,228,800 pixels • The number of bits-per-pixel (“colo...

    pdf32 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 945 | Lượt tải: 0

  • Advanced Systems Programming - Lesson 14: Handling a UART interruptAdvanced Systems Programming - Lesson 14: Handling a UART interrupt

    The new ‘anchor’ cluster To reduce contention for CS workstations that have null-modem cables attached, we are bringing online an additional cluster of eight servers – you access them remotely LDD3: kernel 2.6.10 • Our text “Linux Device Drivers (3rd Ed)” is published by O’Reilly in February 2005 • The kernel version it covers is 2.6.10 ...

    pdf17 trang | Chia sẻ: candy98 | Ngày: 01/12/2020 | Lượt xem: 945 | Lượt tải: 0