創用 CC BOS & Network Driver Practice Ben Wei (A system creator) JULUOSDev 星系主題.

download 創用 CC BOS & Network Driver Practice Ben Wei (A system creator) JULUOSDev 星系主題.

If you can't read please download the document

description

創用 CC Agenda BOS 簡介 lspci e100_attach Transmit & Receive Demo Issues Qemu OSE 3

Transcript of 創用 CC BOS & Network Driver Practice Ben Wei (A system creator) JULUOSDev 星系主題.

CC BOS & Network Driver Practice Ben Wei (A system creator) JULUOSDev CC Agenda BOS lspci e100_attach Transmit & Receive Demo Issues Qemu OSE 2 CC Agenda BOS lspci e100_attach Transmit & Receive Demo Issues Qemu OSE 3 CC Bos 4 CC Architecture 5 CU RU Kernel E100 i82559ER PCI Func PCI Func Timer Kernel Kthread (Bshell) Mem lspci net Network Driver CC Agenda BOS lspci e100_attach Transmit & Receive Demo Issues Qemu OSE 6 CC lspci OSDev.org here I can find Programming Info on PCI?here I can find Programming Info on PCI? sysInLong: pci sysOutLong: pci 7 CC MIT OSE x86.h uint32_t inl(int port) __asm __volatile("inl %w1,%0" : "=a" (data) : "d" (port)); void outl(int port, uint32_t data) __asm __volatile("outl %0,%w1" : : "a" (data), "d" (port)); 8 CC inl/outl NASM ;uint32_t _intl(int port) _inl: mov edx, [esp+4] mov eax, 0 in eax, dx ret ;void _outl(int port, uint32_t data) _outl: mov edx, [esp+4] ; port mov eax, [esp+8] ; data out dx, eax ret 9 CC PCI Config Read pciConfigRead(uint32_t bus, uint32_t slot, uint32_t func, uin32_t offset) address = (uint32_t)((bus