Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA CompTIA Security+ Amazon AWS Microsoft AZ-900
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Personal Transformation Mindfulness Life Purpose Meditation CBT Emotional Intelligence
Web Development JavaScript React CSS Angular PHP Node.Js WordPress Vue JS
Google Flutter Android Development iOS Development React Native Swift Dart (Programming Language) Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
Microsoft Power BI SQL Tableau Business Analysis Data Modeling Business Intelligence MySQL Data Analysis Blockchain
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Business Plan Startup Freelancing Online Business Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee
IT & Software Operating Systems Linux Kernel

Linux Device Drivers - Communicating with Hardware

Linux Kernel Programming for IO Mapped and Memory Mapped devices
Rating: 4.4 out of 54.4 (20 ratings)
299 students
Created by Linux Trainer
Last updated 11/2020
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • IO Mapped IO
  • Memory Mapped IO
  • PCI
  • Kernel Modules for Keyboard and RTC

Requirements

  • Should be able to write/compile/load/unload Hello World Linux Kernel Modules

Description

What you will learn in this course:

  • Two modes of communication with hardware - IO Mapped IO and Memory Mapped IO

  • Kernel Drivers/Modules for IO Mapped IO - Speaker, RTC, Keyboard

  • Kernel Drivers/Modules for Memory Mapped IO - Hardware Random Generator, GPIO, UART

  • Accessing IO Mapped IO and Memory Mapped IO from user space

  • PCI and SMBIOS

API's/Macros/Structures

  • inb, outb, inw, outw, inl, outl

  • inb_p, outb_p, inw_p, outw_p, inl_p, outl_p

  • struct resource, request_region, release_region

  • ioperm, iopl, geteuid

  • request_mem_region, release_mem_region, ioremap, iounmap, ioread8, ioread16, ioread32, iowrite8, iowrite16, iowrite32

  • ioport_map, ioport_unmap,mmap

Files:

/dev/port, /dev/mem, /proc/iomem, /proc/ioports

Commands

  • hwclock

  • date

  • showkey

  • hexdump

  • strings

  • dd

  • lspci

  • biosdecode

  • dmidecode

Who this course is for:

  • Kernel developers curious about learning how to communicate with hardware

Course content

9 sections • 84 lectures • 3h 11m total length

  • Preview02:46
  • Preview01:03
  • Preview03:54

  • Preview01:17
  • Preview03:05
  • Preview04:42
  • Linux Kernel Module Example for requesting i/o ports
    00:55
  • Why read value is not same as write
    02:04
  • Why all ports are not listed in /proc/ioports
    01:13
  • Where to find information of processor ioports
    02:27
  • Linux Kernel Module to enable the Speaker
    02:18
  • Ports list
    01:27

  • Introduction to RTC
    01:09
  • RTC Ports and Registers Part1
    02:23
  • RTC Ports and Registers Part2
    01:33
  • Linux Kernel Module communicating with RTC
    01:41
  • Walkthrough of rtc driver in Linux kernel
    02:19
  • Hardware and software clock
    03:07
  • Linux Kernel Module example to update time
    00:55

  • Introduction to PC Keyboard
    02:05
  • Scancodes
    01:25
  • How to find out scancode of a key
    02:09
  • Typematic
    02:23
  • Reset Command
    00:50
  • I/O Ports of keyboard
    02:09
  • Linux Kernel Module sending keyboard controller commands
    03:18
  • Linux Kernel Module Enabling and Disabling mouse
    02:27
  • Linux Kernel Module Enabling and Disabling keyboard
    01:00
  • Linux Kernel Module reading command byte after disabling keyboard
    01:00
  • Status Register
    01:12
  • Linux Kernel Module to print keys typed
    02:13
  • Linux Kernel Module to turn on keyboard leds
    02:32

  • Introduction
    01:09
  • ioperm system call
    02:15
  • Add an error message to normal user
    00:54
  • What happens when you dont call ioperm and access IO Ports from userspace
    03:41
  • Accessing RTC Registers from user space
    01:03
  • iopl
    00:50
  • Accessing RTC Registers after iopl
    00:34
  • Pushing keys from user space process
    03:09
  • Restart Your Computer using keyboard port
    03:04
  • Restart Your Computer using Reset PCI Port
    00:57
  • Enabling and Disabling speaker
    00:50
  • 8254 Timers and speakers
    03:47
  • /dev/port
    01:30

  • Introduction
    02:06
  • Requesting IO Memory
    02:08
  • Accessing IO Memory
    02:33
  • Why cant we directly access IO memory
    05:19
  • Linux Kernel Module example calling request mem region failed case
    00:55
  • Linux Kernel Module example calling request mem region success case
    01:15
  • Linux Kernel Module example calling ioremap and iounmap
    00:36
  • Linux Kernel Module example writing to memory
    01:48
  • Linux Kernel Module example calling ioread and iowrite
    02:02
  • Hardware Random Number Generator
    03:45
  • Registers in Hardware Random Number Generator
    02:10
  • Ports access as IO Memory
    01:50
  • Accessing memory mapped io from user space
    04:51
  • CONFIG_STRICT_DEVMEM
    04:10
  • devmem utility
    05:39
  • Simple implementation of devmem utility in c
    01:36
  • Updated code to print string
    00:58
  • Configure GPIO using devmem
    04:51
  • RTC on qemu arm
    02:42
  • Dump BIOS data on file
    02:31
  • Writing string into RAM and reading back
    01:56

  • Introduction
    01:07
  • SMBIOS Entry Point Table
    03:00
  • Parsing Entry Point Table
    05:06
  • dmidecode
    06:14
  • biosdecode
    01:29

  • Introduction
    01:11
  • PCI Address Space
    01:22
  • PCI Configuration Space
    01:50
  • How to access registers in PCI Configuration Space
    02:48
  • lspci
    04:58
  • Access configuration address space from Linux Kernel Module
    03:08
  • Linux Kernel Module to print full address space
    02:19
  • What happens when we try to read a device which doesnt exist
    01:26
  • Base Address Registers
    05:34
  • Base Address of Base Address Register
    01:40
  • Find out amount of memory consumed by PCI Device
    02:50
  • Introduction to PCI Express
    01:27

  • Downloads
    00:01

Instructor

Linux Trainer
Trainer at Linux Weekend Learning
Linux Trainer
  • 4.1 Instructor Rating
  • 577 Reviews
  • 7,654 Students
  • 17 Courses

I have been working on Linux for more than 7 years. I have seen many people still lack their skills on Linux. So, i am working on courses for Linux which will make them Learn Linux in an easy way. The agenda of my courses will be more practical and less theoretical. Show more examples and you will easily grab the concepts.

Order of Learning

1. Learn Linux User Space Debugging

2. Learn Linux Kernel Programming

3. Character Device Drivers in Deep

4. Memory management in Linux Kernel

5. Synchronization in Linux Kernel Programming

6. Linux Kernel Development Model and Compilation

7. Linux Device Drivers - Communicating with Hardware

8. Interrupts and Bottom Halves in Linux Kernel

9. System calls in deep

10. Timing Subsystem in deep

11. Embedded Linux using Yocto

12. Embedded Linux using Yocto Part 2

13. Embedded Linux using Yocto Part 3

14. Embedded Linux using Yocto Part 4

15. Testing Linux Kernel

16. Debugging Linux kernel in deep - Part 1

17. Debugging Linux kernel in deep - Part 2

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Impressum Kontakt
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.