阅读:692回复:0
求教9052
小弟正在用DS做9052的驱动,但是基础不好,想请教各位一些基本的问题
到底怎么获得卡上的本地地址呢? 看了半天帮助找到下面几个东东,但是那些: bus phys address, number of UCHARs,Bus addressperipheral,current process memory address 是怎么得到的呢? 搞不明白,隐约觉得是硬件手册上有介绍的,还有要自己设置的,但是不肯定,请大家帮帮忙看看吧 KMemoryRange DeviceRegion; status = DeviceRegion.Initialize( PCIBus, // bus type 0, // bus number 0xF8000000, // bus phys address 0x10000 // number of UCHARs TRUE // do mapping ); KIoRange DeviceIos; status = DeviceIos.Initialize( Isa, // Bus type 0, // Bus number 0xE700, // Bus address 8, // Device size TRUE // Map to system space ); ULONGLONG p = 0xF8000000; KMemoryToProcessMap* DeviceRegion = new (NonPagedPool) KMemoryToProcessMap( PCIBus, // bus type 0, // bus number, may vary p, // peripheral memory address 0x10000, // number of bytes (HANDLE)-1, // current process FALSE, // don\'t do kernel mapping NULL, // any address ViewShare // view inherit by child process ); |
|