1. vmalloc 與 ioremap
2. vmalloc 使用到 kmalloc(GFP_KERNEL)
3. 多REVIEW 講義(二)P.161 圖8-2的Memory-mapped 概念圖
4. RAM與I/O MEM的差別在於RAM並不屬於reserved page
5. driver 中的fops->mmap 與 user space process 中的 mmap(GLIBC提供)所負責的工作有哪些 <= 參考講義(二)p.162
6. 講義(二)p.172中為何user space process 執行ioctl VIDEOCAPTURE是使用copy_from_user()?
7. BTTV driver 路徑: /drivers/media/video/bttv-driver.c , bttv.h
8. 將講義(二)p.174的driver架構圖整理起來
9. static struct vdeo_device *video_device[VIDEO_NUM_DEVICES] <=代表宣告video_device結構陣列。
10. v4l.c 在嵌入式原理與實務的第七章有介紹,為整合bttv driver的影像應用程式。
11. bttv-driver.c 中 會呼叫 videodev.c的video_register_device()將下層函數的功能註冊給上層函數。
12. v4l.c只與videodev.c做溝通,也就是說v4l.c下ioctl命令會透過videodev呼叫到bttv-driver.c所提供的命令功能。
2010年4月9日 星期五
2010年4月7日 星期三
USB driver 與 Network device driver 開發
1. 開發USB驅動程式並不需要指定是字元型,或區塊型的。
2. USB 的驅動架構是採用封包方式,而不使用傳統的read/ write 方式,亦可自行新增fops,建構裝置檔將資料傳回給user space process。
3. OS底下的USB只進行一樣工作 => I/O 存取 (丟封包的方式)
4. Input device 為處理人為輸入的一個sub-system。
5. 配合與講義(二)的投影片P.68與後面第十章研讀usbmouse.c。
6. tty終端機應用的架構(由上到下): application -> tty -> input device subsystem -> user space standard input / output。
7. usb_device_id <= 建立一個table讓kernel知道這個driver所支援的硬體裝置。 8. 滑鼠移動 =>產生中斷由usb-core收到 => 傳送urb封包給device driver 的 callback function。
9. 滑鼠 <= interrupt transfers webCam <= isochronous transfers 10. 函數呼叫順序: usb_alloc_urb => usb_fill_[control bulk int]_urb => usb_free_urb
11. usb_fill_xxx_urb 系列函數中參數 usb_complete * complete 為一含數指標,該函數的工作在於讓driver可以知道剛才丟給裝置的urb封包已經被處理完成了(透過usb-core callback complete函數)。
12. 同上函數中,pipe參數的設定(transmit / receive)會決定complete 函數的實作方式。
13. 當complete function 被callback後,可以將transfer buffer 指標指向下一筆資料。
14. input device 也是一個subsystem ,負責接收人為輸入,當driver接收到資料欲傳送給user space process時,必須透過input device subsystem來丟。
15. 重要資料結構: usb_device、usb_driver、urb。
16. input device sub-system 中重要的資料結構: input_dev
2. USB 的驅動架構是採用封包方式,而不使用傳統的read/ write 方式,亦可自行新增fops,建構裝置檔將資料傳回給user space process。
3. OS底下的USB只進行一樣工作 => I/O 存取 (丟封包的方式)
4. Input device 為處理人為輸入的一個sub-system。
5. 配合與講義(二)的投影片P.68與後面第十章研讀usbmouse.c。
6. tty終端機應用的架構(由上到下): application -> tty -> input device subsystem -> user space standard input / output。
7. usb_device_id <= 建立一個table讓kernel知道這個driver所支援的硬體裝置。 8. 滑鼠移動 =>產生中斷由usb-core收到 => 傳送urb封包給device driver 的 callback function。
9. 滑鼠 <= interrupt transfers webCam <= isochronous transfers 10. 函數呼叫順序: usb_alloc_urb => usb_fill_[control bulk int]_urb => usb_free_urb
11. usb_fill_xxx_urb 系列函數中參數 usb_complete * complete 為一含數指標,該函數的工作在於讓driver可以知道剛才丟給裝置的urb封包已經被處理完成了(透過usb-core callback complete函數)。
12. 同上函數中,pipe參數的設定(transmit / receive)會決定complete 函數的實作方式。
13. 當complete function 被callback後,可以將transfer buffer 指標指向下一筆資料。
14. input device 也是一個subsystem ,負責接收人為輸入,當driver接收到資料欲傳送給user space process時,必須透過input device subsystem來丟。
15. 重要資料結構: usb_device、usb_driver、urb。
16. input device sub-system 中重要的資料結構: input_dev
2010年4月5日 星期一
2010年4月2日 星期五
2010年4月1日 星期四
訂閱:
文章 (Atom)