PCI devices - what are they? PCI video card. What is the difference between PCI Express and PCI?

You might be interested:

Any device that is installed through the PCI slot in your motherboard before drivers are installed on it and the operating system recognizes it will show up in Device Manager as a PCI Device with a yellow question mark. It could be sound card, and a modem and any other device. Installing it is very simple. You just need to install the drivers with which the device will work. To get started, install...

The vast majority of fans computer games It has long been known what an Xbox 360 is. Therefore, this article is for those who are not yet familiar with this phrase. Let's start with the fact that Xbox is a game console that was developed and produced by by Microsoft. Xbox sales began on November 15, 2001. This console is Microsoft's first independent entry into the market game consoles. Before this, the company could only boast of joint development…

Today, the tablet computer has firmly entered our lives. These devices are constantly being improved, and there can be no talk of stopping the development of tablets. The main difference between “tablets” and other similar “devices”, by which it can be distinguished, is the presence of a large touch screen. Its dimensions practically coincide with the dimensions of the entire tablet. And all the components are located in the case under the screen. Typically, screen diagonal tablet computer varies within...

A typical representative is the HP Mini 1103 When answering the question of what a netbook is, you first need to say that a netbook is laptop computer. It is also called a mini-laptop. This is a small device both in size and performance, having a screen with a diagonal of 7-12 inches. It weighs little, is characterized by low cost and energy consumption. Mostly netbooks, as well as pocket computers, used to work with by email, communication via Skype or ICQ,…

Greetings, dear readers.

After reinstallation operating system Some users (including me) have encountered a situation where the Device Manager shows that a PCI device driver is needed for Windows 7. And most often this occurs on laptops, although the problem can also be seen on PCs. In some cases, you may notice certain negative points in the operation of the device, manifested by the speed of information processing, “pauses”, and sometimes “stops”. In this article I will try to tell you how to cope with the disease.

It must be said right away that the PCI device does not have a specific purpose. This marking indicates the bus through which the component is connected. The equipment itself can have different purposes - a modem, network card, cardreader and much more. Therefore, it is not always possible to solve the problem immediately.

Installing specific drivers( )

There are several ways to find out which driver you need to look for. First you need to get into “” and then into “”.

In most cases, problems are found in the "" section. If you click on this item, a drop-down list will open, on the left side of which there will be yellow exclamation mark, and then there is an inscription.

So, for example, you need to find a driver PCI controller Simple Communications. This means that there is no special interface found on the computer between the host and the firmware Management Engine from Intel.

Another popular problem is the presence of an error in Nvidia nforce PCI Management. It indicates a problem with the chipset software. To solve you need to go to official website and find the appropriate software. It is important to find exactly the right security (must match Windows versions, bit depth and even BIOS release). Then you can simply update the driver or install it if it was not there. Sometimes a reboot is required.

Search by ID( )

Sometimes there are situations when you cannot immediately determine which equipment is not working. Also, the marking in " Device Manager" What to do in this case?

To find the right software for Windows 7, you need to do a few steps:


By the way, this method is also suitable for PCI Windows XP devices. It is best to search on trusted sites to avoid accidentally installing a virus.

Hello. We would like to tell you how to solve the installation problem PCI drivers controller.
Recently they brought to us Asus laptop, after installing the driver It turned out that the driver does not work correctly.

It was necessary to install an operating room Windows system 7. After installing the operating system, all drivers were installed sequentially, as expected with a reboot. The drivers were installed from the official Asus website.

This problem has come to light. Device driver Trusted Execution Engine Interface does not work correctly. Updating the driver did not produce any results, everything remained unchanged.

It was decided to remove the drivers for this device completely. After uninstalling and rebooting, the system showed that there are no drivers for - PCI controller encryption/decryption.

Briefly PCI controller This universal tire to connect various devices, began to look for a solution to the problem in this direction.

How to solve this problem:

The first option to solve this problem is to set it in the BIOS settings to Advanced section OS Selection parameter, the operating system you are installing, in our case windows 7. If this option is not available, then you need to update the BIOS.

Then there in BIOS function Set Boot Option UEFI to Disabled and disable it. Now install the operating system from your DVD media or USB doesn't matter.

After installing the operating system, install drivers other than the Intel(R) driver Trusted Execution Engine Interface.

Then install the update for Windows 7 - Kernel-Mode Driver Framework version 1.11 update for Windows 7, this update is still named KB2685811 in the update center.

You can download it from the official Microsoft website
or we have a Yandex disk, version for x64, version for x86.

Then install drivers for Intel(R) Trusted Execution Engine Interface or PCI encryption/decryption device.

As we did.

In our case, the operating system was not reinstalled and no changes were even made to the BIOS; we simply removed the drivers for this device, then downloaded and installed the update mentioned above. We didn’t do anything anymore; the drivers were detected by the system and installed automatically. Just rebooted the laptop after the update was completed.

In the course of our work, we periodically have to deal with fairly low-level interaction with the hardware. In this article we want to show how PCI devices are polled to identify them and load the appropriate device drivers.

As a minimum base for working with PCI devices, we will use a kernel that supports the Multiboot specification. This way you will avoid having to write your own boot sector and loader. In addition, this issue is already well covered on the Internet. GRUB will act as the bootloader. We will boot from a flash drive, since it is convenient to boot both a virtual and a real machine from it. We will use QEMU as a virtual machine. As real car The machine must have a regular BIOS (not UEFI) that supports booting from a USB-HDD (usually the Legacy USB support option is present). For work you will need Ubuntu Linux with the following programs: expect, qemu, grub (these can be easily installed using the sudo apt-get install command). The gcc used must compile 32-bit code.

Let's look at the first step - creating a kernel that supports the Multiboot specification. If you use GRUB as a bootloader, the kernel will be created from 3 files:
Kernel.c– the main file with the code of our program and the main() procedure;
Loader.s– contains the multiboot header for GRUB;
Linker.ld– ld linker script, which specifically specifies at which address the kernel will be located.

Contents of Linker.ld:

ENTRY (loader) SECTIONS ( . = 0x00100000; . text ALIGN(0x1000) : ( *(.text) ) .rodata ALIGN (0x1000) : ( *(.rodata*) ) .data ALIGN (0x1000) : ( *(.data) ) .bss: ( sbss = .; *( COMMON) *(.bss) ebss = .; ) )

The linker script specifies how to link already compiled object files. The first line states that the entry point in our kernel will be the address labeled “loader”. Further in the script it is indicated that starting from the address 0x00100000 (1MB) the text section will be located. The rodata, data and bss sections are aligned at 0x1000 (4Kb) and are located after the text section.

Contents of Loader.s:

Global loader .set FLAGS, 0x0 .set MAGIC, 0x1BADB002 .set CHECKSUM, -(MAGIC + FLAGS) .align 4 .long MAGIC .long FLAGS .long CHECKSUM # reserve initial kernel stack space .set STACKSIZE, 0x4000 .lcomm stack, STACKSIZE .comm mbd, 4 .comm magic, 4 loader: movl $(stack + STACKSIZE), %esp movl %eax, magic movl %ebx, mbd call kmain cli hang: hlt jmp hang

GRUB, after loading a kernel image from disk, looks for signature 0x1BADB002 in the first 8Kb of the loaded image. The signature is the first field of the multiboot header. The header itself looks like this:

Offset Type Field Name Note
0 u32 magic required
4 u32 flags required
8 u32 checksum required
12 u32 header_addr if flags is set
16 u32 load_addr if flags is set
20 u32 load_end_addr if flags is set
24 u32 bss_end_addr if flags is set
28 u32 entry_addr if flags is set
32 u32 mode_type if flags is set
36 u32 width if flags is set
40 u32 height if flags is set
44 u32 depth if flags is set

The header must include at least 3 fields – magic, flag, checksum. The magic field is a signature and, as mentioned above, is always equal to 0x1BADB002. The flag field contains additional requirements to the state of the machine at the time of transfer of control to the OS. Depending on the value of this field, the set of fields in the Multiboot Information structure may change. A pointer to the Multiboot Information structure contains the EBX register at the time control is transferred to the boot kernel. In our case, the flag field has a value of 0, and the multiload header consists of only 3 fields.

At the time control is transferred to the kernel, the processor operates in protected mode with page addressing disabled. Device interrupt processing is disabled. GRUB does not create a stack for the bootable kernel, and this is the first thing the operating system must do. In our case, 16Kb is allocated for the stack. The last assembler instruction executed will be call instruction kmain, which transfers control to the C code, namely void functions kmain(void).

Contents of kernel.c:

#include "printf.h" #include "screen.h" void kmain(void) ( clear_screen(); printf(" -- Kernel started! -- n"); )

There's nothing interesting here yet. From a loading point of view, there should be nothing specific in it, just an entry point for the C code. An implementation has been added for displaying printf functions, found on the Internet, and several functions for working with video memory, such as putchar, clear_screen.

The following simple makefile will be used to build the kernel:

CC = gcc CFLAGS = -Wall -nostdlib -fno-builtin -nostartfiles -nodefaultlibs LD = ld OBJFILES = loader.o printf.o screen.o pci.o kernel.o start: all cp ./kernel.bin ./flash/ boot/grub/ expect ./grub_install.exp qemu /dev/sdb all: kernel.bin .s.o: as -o $@ $< .c.o: $(CC) $(CFLAGS) -o $@ -c $< kernel.bin: $(OBJFILES) $(LD) -T linker.ld -o $@ $^ clean: rm $(OBJFILES) kernel.bin

Now we have a kernel that can be downloaded. It's time to check that it actually loads. Let's install GRUB on a flash drive and tell it to load our kernel at startup. To do this you need to follow these steps:

1. Create a partition on a flash drive, format it into a file system supported by GRUB (in our case this is file system FAT32). We took advantage Disk utility Utility from the Ubuntu kit, which allowed you to create a partition:

2. Mount the USB flash drive and create the /boot/grub/ directory. Copy the files stage1, stage2, fat_stage1_5 from /usr/lib into it. Create text file menu.lst in the /boot/grub/ directory and write to it

Timeout 5 default 0 title start_kernel root (hd0,0) kernel /boot/grub/kernel.bin

For installing GRUB The expect script in the grub_install.exp file is used on the flash drive. Its contents:

Log_user 0 spawn grub expect "grub> " send "root (hd1,0)r" expect "grub> " send "setup (hd1)r" expect "grub> " send "quitr" exit 0

In a particular case, other disk numbers and device names are possible. Ultimately, compiling and starting the virtual machine must be done with the make start command. This command from the makefile will do installing GRUB to a flash drive using the grub_install.exp script, and then launches the QEMU virtual machine with our program. Since everything is loaded from a real flash drive, you can boot from it not only the QEMU virtual machine, but also a real computer.

Launched virtual machine QEMU with our program looks like this:


Now let's get down to the main task - listing all PCI devices available on the computer. PCI is the main bus for devices on a computer. In addition to conventional devices, which are inserted into all known slots on the motherboard, devices built into the motherboard are also connected motherboard(so-called On-board devices), as well as a number of controllers (for example, USB) and bridges to other buses (for example, PCI-ISA bridge). Thus, PCI is the main bus on a computer, from which polling of all its devices begins.

Each PCI device is associated with a 256-byte structure (PCI Configuration Space), in which its settings are located. Device configuration ultimately comes down to writing and reading data from this structure. For all PCI devices, data is read and written through 2 I/O ports:
0xcf8 - configuration port into which the PCI address is written;
0xcfc - data port through which data is read and written to the PCI address specified in the configuration port.

By reading data from PCI Configuration Space, you can obtain information about the device, and by writing data there, the device can be configured.

The PCI address is the following 32-bit structure:

Bit 31 Bits 30 – 24 Bits 23 – 16 Bits 15 – 11 Bits 10 – 8 Bits 7 – 2 Bits 1 – 0
Always 1 Reserved Tire number Device number Feature number Register number Always 0

The bus number together with the device number identifies physical device on the computer. A physical device may include several logical ones, which are identified by a function number (for example, a video capture card with a Wi-Fi controller will have, according to at least, two functions).

PCI Configuration Space is conventionally divided into 4-byte registers. The register number being accessed is stored from the 2nd to 7th bits in the 32-bit PCI address. The fields of the PCI Configuration Space structure that describes a PCI device depend on its type. But for all device types, the first 4 registers of the structure contain the following fields:

Register number Bits 31 - 24 Bits 23 – 16 Bits 15 – 8 Bits 7 – 0
0 Device ID Vendor ID
1 Status Command
2 Class code Subclass Prog IF Revision ID
3 BIST Header type Latency Timer Cache Line Size

Class code– describes the type (class) of a device in terms of the functions that the device performs ( network adapter, video card, etc.);
Vendor ID– device manufacturer identifier (every device manufacturer in the world has one or more such unique identifiers). These numbers are issued by the international organization PCI SIG;
Device IDunique identifier device (unique for a given Vendor ID). Their numbering is determined by the manufacturer himself.

The DeviceID (abbreviated DEV) and VendorID (abbreviated VEN) fields determine the driver corresponding to this device. Sometimes an additional identifier RevisionID (abbreviated REV) is used for this. In other words, Windows, when detecting a new device on the computer, uses the VEN, DEV and REV numbers to search for corresponding drivers on its disk or on the Internet using Microsoft server. These numbers can also be found in Device Manager:

Let's look at the code that implements the simplest way to obtain a list of PCI devices available on a computer:

Int ReadPCIDevHeader(u32 bus, u32 dev, u32 func, PCIDevHeader *p_pciDevice) ( int i; if (p_pciDevice == 0) return 1; for (i = 0; i< sizeof(p_pciDevice->header)/sizeof(p_pciDevice->header); i++) ReadConfig32(bus, dev, func, i, &p_pciDevice->header[i]); if (p_pciDevice->option.vendorID == 0x0000 || p_pciDevice->option.vendorID == 0xffff || p_pciDevice->option.deviceID == 0xffff) return 1; return 0; ) void kmain(void) ( int bus; int dev; clear_screen(); printf(" -- Kernel started! -- n"); for (bus = 0; bus< PCI_MAX_BUSES; bus++) for (dev = 0; dev < PCI_MAX_DEVICES; dev++) { u32 func = 0; PCIDevHeader pci_device; if (ReadPCIDevHeader(bus, dev, func, &pci_device)) continue; PrintPCIDevHeader(bus, dev, func, &pci_device); if (pci_device.option.headerType & PCI_HEADERTYPE_MULTIFUNC) { for (func = 1; func < PCI_MAX_FUNCTIONS; func++) { if (ReadPCIDevHeader(bus, dev, func, &pci_device)) continue; PrintPCIDevHeader(bus, dev, func, &pci_device); } } } }

In this code, there is a complete enumeration of bus numbers and device numbers in the address at which reading occurs. If the Header type field contains the PCI_HEADERTYPE_MULTIFUNC flag, then this physical device implements multiple logical devices, and when searching for PCI devices in the address written to the configuration port, you need to iterate over the function number. If VendorID has an incorrect value, then there is no device with that number on this bus. On Qemu this code produces the following output:


0x8086 is the VendorID of the equipment Intel. A DeviceID of 0x7000 corresponds to the PIIX3 PCI-to-ISA Bridge device. Let's boot from the resulting flash drive into VmWare Workstation 9.0. The list of PCI devices turned out to be much longer and looks like this:


This is what searching for PCI devices in the system looks like. This action is performed on all modern operating systems running on IBM computers PC. The next step in the operation of the operating system is to search for drivers and configure the found devices, and this already happens in a unique way for each device individually.