Linux device drivers books

Linux Device Drivers

Device drivers literally drive everything you’re interested in—disks, monitors, keyboards, modems—everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledge. For years now, programmers have relied on the classic Linux Device Drivers from O’Reilly to master this critical subject. Now in its third edition, this bestselling guide provides all the information you’ll need to write drivers for a wide range of devices.

Over the years the book has helped countless programmers learn:

  • how to support computer peripherals under the Linux operating system
  • how to develop and write software for new hardware under Linux
  • the basics of Linux operation even if they are not expecting to write a driver

Best of all, you don’t have to be a kernel hacker to understand and enjoy this book. All you need is an understanding of the C programming language and some background in Unix system calls. And for maximum ease-of-use, the book uses full-featured examples that you can compile and run without special hardware.

Today Linux holds fast as the most rapidly growing segment of the computer market and continues to win over enthusiastic adherents in many application areas. With this increasing support, Linux is now absolutely mainstream, and viewed as a solid platform for embedded systems. If you’re writing device drivers, you’ll want this book. In fact, you’ll wonder how drivers are ever written without it.

Отзывы — Написать отзыв

Избранные страницы

Содержание

Другие издания — Просмотреть все

Часто встречающиеся слова и выражения

Об авторе (2005)

Jonathan Corbet got his first look at the BSD Unix source back in 1981, when an instructor at the University of Colorado let him «fix» the paging algorithm. He has been digging around inside every system he could get his hands on ever since, working on drivers for VAX, Sun, Ardent, and x86 systems on the way. He got his first Linux system in 1993, and has never looked back. Mr. Corbet is currently the co-founder and executive editor of Linux Weekly News (http: //LWN.net/); he lives in Boulder, Colorado with his wife and two children. Alessandro installed Linux 0.99.14 soon after getting his degree as electronic engineer. He then received a Ph.D. in computer science at the University of Pavia despite his aversion toward modern technology. He left the University after getting his Ph.D. because he didn’t want to write articles. He now works as a free lancer writing device drivers and, um. articles. He used to be a young hacker before his babies were born; he’s now an old advocate of Free Software who developed a bias for non-PC computer platforms. Greg Kroah-Hartman has been writing Linux kernel drivers since 1999, and is currently the maintainer for the USB, PCI, I2C, driver core, and sysfs kernel subsystems. He is also the maintainer of the udev and hotplug userspace programs, as well as being a Gentoo kernel maintainer, ensuring that his email inbox is never empty. He is a contributing editor to Linux Journal Magazine, and works for IBM’s Linux Technology Center, doing various Linux kernel related tasks.

Читайте также:  Кали линукс просит логин

Библиографические данные

Название Linux Device Drivers
Nutshell handbook
O’Reilly Software Series
Авторы Jonathan Corbet , Alessandro Rubini , Greg Kroah-Hartman
Издание: иллюстрированное
Издатель «O’Reilly Media, Inc.», 2005
ISBN 0596005903, 9780596005900
Количество страниц Всего страниц: 615
&nbsp &nbsp
Экспорт цитаты BiBTeX EndNote RefMan

Источник

Linux Device Drivers

Linux Device Drivers

Read it now on the O’Reilly learning platform with a 10-day free trial.

O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Book description

This book is for anyone who wants to support computer peripherals under the Linux operating system or who wants to develop new hardware and run it under Linux. Linux is the fastest-growing segment of the UNIX market and is winning over enthusiastic adherents in many application areas. This book reveals information that heretofore has been passed by word-of-mouth or in cryptic source code comments, showing how to write a driver for a wide range of devices. You don’t have to be a kernel hacker to understand and enjoy this book; all you need is an understanding of C and some background in UNIX system calls. Drivers for character devices, block devices, and network interfaces are all described in step-by-step form and are illustrated with full-featured examples that show driver design issues, which can be executed without special hardware. For those who are curious about how an operating system does its job, this book provides insights into address spaces, asynchronous events, and I/O. Portability is a major concern in the text. The book is centered on version 2.0, but also covers 1.2.13 and experimental versions up to 2.1.43. You are also told how to maximize portability among hardware platforms. Contents include:

  • Building a driver and loading modules
  • Complete character, block, and network drivers
  • Debugging a driver
  • Timing
  • Memory management and DMA
  • Interrupts
  • Portability issues
  • Peripheral Component Interconnect (PCI)
  • A tour of kernel internals

Publisher resources

Table of contents

  1. Linux Device Drivers
    1. Preface
      1. Audience of This Book
      2. Organization of the Material
      3. Background Information
      4. Sources for Further Information
      5. Relevant Books
      6. Conventions Used in This Book
      7. We’d Like to Hear from You
      8. Acknowledgments
      1. The Role of the Driver Writer
      2. Splitting the Kernel
      3. Classes of Devices and Modules
      4. Security Issues
      5. Version Numbering
      6. License Terms
      7. Overview of the Book
      1. Modules Versus Applications
        1. User Space and Kernel Space
        2. Concurrency in the Kernel
        1. Version Dependency
        1. Registering Symbol Tables
        1. Error Handling in init_module
        2. The Usage Count
        3. Unloading
        1. Ports
        2. ISA Memory
        1. The Design of scull
        2. Major and Minor Numbers
          1. Dynamic Allocation of Major Numbers
          2. Removing a Driver from the System
          3. dev_t and kdev_t
          1. Overview of the Different Operations
          1. The open Method
          2. The release Method
          1. The read Method
          2. The write Method
          1. Debugging by Printing
            1. Printk
            2. How Messages Get Logged
            3. Using the Preprocessor to Ease Monitoring
            1. Using the /proc Filesystem
            2. The ioctl Method
            1. Oops Messages
              1. Using ksymoops
              2. Using oops
              3. Using klogd
              1. Using gdb
              2. Using kdebug
              3. Remote Debugging
              1. ioctl
                1. Choosing the ioctl Commands
                2. The Return Value
                3. The Predefined Commands
                4. Using the ioctl Argument
                5. Device Control Without ioctl
                1. Going to Sleep and Awakening
                2. Writing Reentrant Code
                3. Wait Queues
                4. Blocking and Nonblocking Operations
                5. A Sample Implementation: scullpipe
                1. Interaction with read and write
                  1. Reading data from the device
                  2. Writing to the device
                  3. Flushing pending output
                  1. The Driver’s Point of View
                  1. The lseek Implementation
                  1. Single-Open Devices
                  2. Restricting Access to a Single User at a Time
                  3. Blocking Open as an Alternative to EBUSY
                  4. Cloning the Device on Open
                  1. Time Intervals in the Kernel
                  2. Knowing the Current Time
                  3. Delaying Execution
                    1. Long Delays
                    2. Short Delays
                    1. The Nature of Task Queues
                    2. Predefined Task Queues
                      1. How the examples work
                      2. The scheduler queue
                      3. The timer queue
                      4. The immediate queue
                      1. The New Timer List
                      1. The Real Story of kmalloc
                        1. The Priority Argument
                        2. The Size Argument
                        1. A scull Using Whole Pages: scullp
                        1. A scull Using Virtual Addresses: scullv
                        1. Using I/O Ports
                          1. Platform Dependencies
                          2. Pausing I/O
                          3. String Operations
                          1. Basics of the Parallel Port
                          2. A Sample Driver
                          1. ISA Memory Below 1M
                          2. ISA Memory Above 1M
                          3. High PCI Memory
                          1. Preparing the Parallel Port
                          2. Installing an Interrupt Handler
                            1. The /proc Interface
                            2. Autodetecting the IRQ Number
                              1. Kernel-helped probing
                              2. Do-it-yourself probing
                              1. The internals of interrupt handling on the x86
                              1. Using Arguments
                              2. Enabling and Disabling Interrupts
                              1. The Design of Bottom Halves
                              2. Writing a Bottom Half
                              1. Installing a Shared Handler
                              2. Running the Handler
                              3. The /proc Interface
                              1. Using Circular Buffers
                              2. Disabling Interrupts
                              3. Using Lock Variables
                                1. Bit operations
                                2. Atomic integer operations
                                1. Different Prototypes for request_irq
                                2. Probing the IRQ Line
                                1. Use of Standard C Types
                                2. Assigning an Explicit Size to Data Items
                                3. Interface-Specific Types
                                4. Other Portability Issues
                                5. Quick Reference
                                1. Loading Modules on Demand
                                  1. The User-Level Side
                                  2. The Kernel-Level Side
                                  1. Using Version Support in Modules
                                  2. Exporting Versioned Symbols
                                  1. Registering the Driver
                                  2. The Header File blk.h
                                  3. Handling Requests
                                    1. Performing the Actual Data Transfer
                                    2. Clustered Requests
                                    1. check_media_change
                                    2. revalidate
                                    3. Extra Care
                                    1. The Generic Hard Disk
                                    2. Partition Detection in the Kernel
                                    3. Partition Detection in Modules
                                    4. Partition Detection Using Initrd
                                    5. The Device Methods for spull
                                    1. Memory Management in Linux
                                      1. Page Tables
                                      2. Virtual Memory Areas
                                      3. The Memory Map
                                      1. A Simple Implementation
                                      2. Maintaining the Usage Count
                                      3. Supporting the mremap System Call
                                      4. Remapping Specific I/O Regions
                                      5. Remapping RAM
                                        1. Playing with the reserved bit
                                        2. Implementing the nopage method
                                        1. Overview of a DMA Data Transfer
                                        2. Allocating the DMA Buffer
                                          1. Do-it-yourself allocation
                                          1. Registering DMA usage
                                          2. Talking to the DMA controller
                                          1. How snull Is Designed
                                            1. Assigning IP Numbers
                                            2. The Physical Transport of Packets
                                            1. Module Loading
                                            2. Initializing Each Device
                                            3. Module Unloading
                                            4. Modularized and Non-Modularized Drivers
                                            1. The Visible Head
                                            2. The Hidden Fields
                                              1. Interface information
                                              2. The device methods
                                              3. Utility fields
                                              1. The Important Fields
                                              2. Functions Acting on Socket Buffers
                                              1. Using ARP with Ethernet
                                              2. Overriding ARP
                                              3. Non-Ethernet Headers
                                              1. Kernel Support for Multicasting
                                              2. A Typical Implementation
                                              1. The PCI Interface
                                                1. PCI Addressing
                                                2. Boot Time
                                                3. Detecting the Device
                                                4. Accessing the Configuration Space
                                                  1. Looking at a configuration snapshot
                                                  1. Hardware Resources
                                                  2. ISA Programming
                                                  3. The «Plug and Play» Specification
                                                  1. MCA
                                                  2. EISA
                                                  3. VLB
                                                  1. Booting the Kernel
                                                  2. Before Booting
                                                    1. Setting Up the X86 Processors
                                                      1. Booting a bare-bones zImage kernel
                                                      2. Booting a bare-bones bzImage kernel
                                                      3. Using lilo
                                                      4. Using loadlin
                                                      5. Other booters
                                                      1. sched.c
                                                      2. Process Control
                                                      3. Modularization
                                                      4. Other Operations
                                                      1. Paging and Swapping
                                                      2. Allocation and Deallocation
                                                      3. Other Interfaces
                                                      1. Exec and Binary Formats
                                                      2. devices.c and block_dev.c
                                                      3. The VFS: Superblocks
                                                      4. Inodes and Caching Techniques
                                                      5. open.c
                                                      6. read_write.c and readdir.c
                                                      7. select.c
                                                      8. Pipes and fifos
                                                      9. Control Functions
                                                      10. File Locks
                                                      11. Minor Files
                                                      1. Char, Block, and Network Drivers
                                                      2. SCSI Drivers
                                                      3. Other Subdirectories
                                                      1. Modularization
                                                        1. Exporting Symbols
                                                        2. Declaring Parameters
                                                        3. /proc/modules
                                                        1. Prototype Differences
                                                        2. The poll Method
                                                        1. Using the New Interface

                                                        Product information

                                                        • Title: Linux Device Drivers
                                                        • Author(s): Alessandro Rubini
                                                        • Release date: February 1998
                                                        • Publisher(s): O’Reilly Media, Inc.
                                                        • ISBN: 9781565922921

                                                        Источник

                                                        Разработка драйвера устройств Linux

                                                        Все права защищены. Никакая часть этой книги не может быть воспроизведена, сохранена в поисковой системе или передана в любой форме или любыми средствами без предварительного письменного разрешения издателя, за исключением случаев кратких цитат, встроенных в критические статьи и обзоры.

                                                        При подготовке этой книги были предприняты все усилия чтобы гарантировать точность представленной информации. Тем не менее, информация, содержащаяся в этой книге, продаётся без гарантии в явном или неявном виде. Ни авторы, ни Packt Publishing, ни их дилеры и дистрибьюторы не будут нести ответственность за любые убытки, вызванные или предположительно вызванные прямо или косвенно этой книгой.

                                                        Packt Publishing пыталась предоставить информацию о товарных знаках обо всех компаниях и продуктов, упомянутых в данной книге для надлежащего использования капиталов. Тем не менее, Packt Publishing не может гарантировать точность этой информации.

                                                        Опубликовано Packt Publishing Ltd.

                                                        Состав исполнителей

                                                        Автор Джон Мадьё Рецензент Редактор выпуска Мита Раджани Редактор разработки содержания Абхишек Джадхав Технический редактор Маниш Д. Шанбханг Литературный редактор Safis Editing Джулиана Нейр Координатор проекта Джуди Хосе Корректор Safis Editing Составитель указателя Теджал Сони Дарувала Координатор производства Апарна Бхагат Графика Кирк Д’Пенья Вайбхав Бхембре Энтони Д’Атри Сьюзан Д’Атри

                                                        Об авторе

                                                        Источник

Оцените статью
Adblock
detector