Linux Device Drivers (3rd Edition) [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Device Drivers (3rd Edition) [Electronic resources] - نسخه متنی

Jonathan Corbet, Greg Kroah-Hartman, Alessandro Rubini

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








Chapter 15. Memory Mapping and DMA


This chapter delves into the area of Linux memory management, with an
emphasis on techniques that are useful to the device driver writer.
Many types of driver programming require some understanding of how
the virtual memory subsystem works; the material we cover in this
chapter comes in handy more than once as we get into some of the more
complex and performance-critical subsystems. The virtual memory
subsystem is also a highly interesting part of the core Linux kernel
and, therefore, it merits a look.

The material in this chapter is divided into three sections:

  • The first covers the implementation of the mmap
    system call, which allows the mapping of device memory directly into
    a user process's address space. Not all devices
    require mmap support, but, for some, mapping
    device memory can yield significant performance improvements.

  • We then look at crossing the boundary from the other direction with a
    discussion of direct access to user-space pages. Relatively few
    drivers need this capability; in many cases, the kernel performs this
    sort of mapping without the driver even being aware of it. But an
    awareness of how to map user-space memory into the kernel (with
    get_user_pages) can be useful.

  • The final section covers

    direct
    memory access (DMA) I/O operations, which provide peripherals with
    direct access to system memory.


Of course, all of these techniques require an understanding of how
Linux memory management works, so we start with an overview of that
subsystem.


    / 202