Emulating PCI Configuration Space for Bus-Less Device Driver Binding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In ARM processor platforms, bus-less devices such as NIC controllers and storage devices lack standardized device IDs, making it difficult for operating systems to bind drivers to these devices, especially if the device IDs are generic or if the device was developed after the OS release, leading to configuration issues.

Innovation Solution

The solution involves making a bus-less device appear as a PCI device by emulating the PCI configuration space within a secure-mode platform firmware, allowing system software to probe and configure the device by treating un-backed system memory addresses as a PCI configuration space and handling exceptions to return configuration data, enabling driver binding.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If bus-less devices use non-standardized device IDs, then device functionality can be implemented, but driver binding becomes difficult or impossible

Engineering Contradiction:
Improvedevice functionalityVSAvoiddriver binding
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The patent creates a virtual copy of the PCI configuration space that mimics the structure and content of real PCI devices. By emulating the configuration space with standardized device IDs, vendor IDs, and device descriptors, the system allows OS drivers to bind to bus-less devices as if they were physical PCI devices, resolving the driver binding issue while maintaining device functionality

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces a firmware layer as an intermediary between the bus-less device and the OS driver. This firmware emulates PCI configuration space and intercepts OS driver access attempts, translating generic device IDs into standardized PCI format, thereby enabling driver binding without modifying the actual device or the OS

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If devices are developed after OS release, then new device functionality is available, but OS cannot recognize device IDs without patches

Engineering Contradiction:
Improvenew device supportVSAvoiddriver recognition
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The patent dynamically changes the device ID parameters presented to the OS by emulating PCI configuration space. Instead of using the original generic device ID from the bus-less device, the firmware translates it into a standardized PCI device ID format that the OS can recognize, allowing new devices to be supported without OS patches

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If generic device IDs are used, then device compatibility is improved, but device-specific driver binding fails

Engineering Contradiction:
Improvedevice compatibilityVSAvoiddevice identification
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent creates a virtual copy of the PCI configuration space that contains both the generic device ID from the bus-less device and a translated standardized PCI device ID. This dual-identity approach maintains compatibility while enabling precise driver binding through the standardized ID that the OS can recognize

Inventive Principle:
Principle #26Copying

Data Source

PatentUS10534732B2Exposing memory-mapped IO devices to drivers by emulating PCI bus and PCI device configuration space
Publication Date: 2020.01.14 VMWARE INC
  • US10534732B2 patent drawing
  • US10534732B2 patent drawing
  • US10534732B2 patent drawing

AI summary

Devices are emulated as PCI devices so that existing PCI drivers can be used for the devices. This is accomplished by creating a shim PCI device with a emulated PCI configuration space, accessed via a emulated PCI Extended Configuration Access Mechanism (ECAM) space which is emulated by accesses to trapped unbacked memory addresses. When system software accesses the PCI ECAM space to probe for PCI configuration data or program base address registers of the PCI ECAM space, an exception is raised and the exception is handled by a secure monitor that is executing at a higher privilege level than the system software. The secure monitor in handling the exception emulates the PCI configuration space access of the emulated PCI device corresponding to the ECAM address accessed, such that system software may discover the device and bind and appropriately configure a PCI driver to it with the right IRQ and memory base ranges.