WINDOWS NT Device Driver Development Basis (4)

zhaozj2021-02-11  190

1.3.4 Find hardware information

i) Equipment automatically searches for

When the system is started, the component NTDete will automatically search for the hardware existing on the computer, including strings, parallel

Port, keyboard, mouse, and most PCI and EISA devices. And put them information, including bus type, bus number

, Use the port number and quantity, interrupt vector number, DMA channel number, and memory, etc., add the registry in a certain format.

/ HKEY_LOCAL_MACHINE / HARDWARE / DESCRIPTION / SYSTEM / key. I can use I in the driver

OqueryDeviceDescription and a callback function configcallback to find equipment that meets the requirements, and

Get its configuration information.

II) Devices that cannot be snapped automatically

Some ISA devices cannot be automatically detected by the system, which is manually added in the registry while installing the driver.

Their configuration information. When the driver starts, you can use RTLQueryRegistryValues ​​and other functions to query the registry.

these messages.

1.3.5 Related Memory

The 32-bit CPU above 80386 can manage up to 4GB of physical memory. It divides these memory into many sizes of 64K

B segment and 4kb page to manage, and pass the segment descriptor and page table to enable the physical address to become system address for program access

. Since Windows NT uses virtual memory technology, you may have some physical address corresponding to some system addresses to hard drive.

Working whenever the program reads these addresses, a method of removing the pages is generated, allowing the CPU to transfer these memory into the physical memory. This

Some memory is called paging memory. In response, non-paging memory (Nonpaged), this part

Deposit guarantee is physical residence. The process of running between the running level is greater than or equal to Dispatch_level is not access

Page memory, otherwise the system crashes.

-

转载请注明原文地址:https://www.9cbs.com/read-3790.html

New Post(0)