"IsrDll"="giisr.dll" "IsrHandler"="ISRHandler" |
g_IsrHandle = LoadIntChainHandler(IsrDll, IsrHandler, (BYTE)Irq); GIISR_INFO Info; PHYSICAL_ADDRESS PortAddress = {PhysAddr, 0}; TransBusAddrToStatic(BusType, dwBusNumber, PortAddress, dwAddrLen, &dwIOSpace, &(PVOID)PhysAddr) Info.SysIntr = dwSysIntr; Info.CheckPort = TRUE; Info.PortIsIO = (dwIOSpace) ? TRUE : FALSE; Info.UseMaskReg = TRUE; Info.PortAddr = PhysAddr + 0x0C; Info.PortSize = sizeof(DWORD); Info.MaskAddr = PhysAddr + 0x10; KernelLibIoControl(g_IsrHandle, IOCTL_GIISR_INFO, &Info, sizeof(Info), NULL, 0, NULL); |
ULONG inIoSpace = 1; ///1表示是IO空间 PHYSICAL_ADDRESS ioPhysicalBase = {iobase, 0}; ///相当于ioPhysicalBase.LowPart = iobase |
////如果地址属于物理地址空间 ioPortBase = (PUCHAR)MmMapIoSpace(ioPhysicalBase, Size, FALSE); TransBusAddrToStatic(Isa, 0, ioPhysicalBase, Size, &inIoSpace, ppStaticAddress); |
pVirtualAddress =VirtualAlloc(0, SourceSize, MEM_RESERVE, PAGE_NOACCESS); VirtualCopy(pVirtualAddress, (PVOID)(SourcePhys >> 8), SourceSize, PAGE_PHYSICAL | PAGE_READWRITE | (CacheEnable ? 0 : PAGE_NOCACHE)); |
////如果地址属于IO空间 ioPortBase = (PUCHAR)ioPhysicalBase.LowPart; *ppStaticAddress=ioPortBase |
[HKEY_LOCAL_MACHINEDriversBuiltInSerial_1] |
欢迎光临 DIY编程器网 (http://diybcq.com./) | Powered by Discuz! X3.2 |