Write-Combine Memory Allocation in PCIe Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for allocating a memory space with a write-combine attribute in PCIe systems are unreliable and complex, as they require manual modification of memory type range registers, which can damage adjacent memory spaces and are difficult to re-allocate due to strict size and alignment rules.

Innovation Solution

A method and apparatus for allocating a memory space with a write-combine attribute by scanning device resources, determining the required size and type, and allocating a contiguous memory space that meets the write-combine attribute requirements, ensuring the starting address is subsequent to non-write-combine memory spaces, thus avoiding interference with existing memory allocations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual modification of memory type range registers is used to allocate write-combine memory space, then the memory space can be allocated with the required attribute, but the allocation process becomes complex and unreliable due to strict size and alignment rules

Engineering Contradiction:
Improveallocation reliabilityVSAvoidallocation process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system automatically scans device resources and performs memory space allocation without requiring manual intervention. The BIOS or operating system autonomously identifies devices needing write-combine memory, calculates appropriate addresses, and allocates spaces according to strict rules, eliminating manual modification complexity and improving reliability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary scanning of device resources before allocation to identify which devices require write-combine memory space. This preliminary action allows the system to prepare and allocate memory spaces in advance according to predetermined rules, avoiding complex manual modification processes.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If manual modification of memory type range registers is used, then write-combine attribute can be set, but adjacent memory spaces may be damaged due to strict alignment rules

Engineering Contradiction:
Improvememory space allocation safetyVSAvoiddamage to adjacent memory spaces
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The system implements a feedback mechanism where it scans device resources to identify write-combine requirements, then uses this information to automatically allocate memory spaces at safe addresses. This feedback loop ensures that allocation decisions are made with awareness of existing memory layouts, preventing damage to adjacent memory spaces while maintaining write-combine functionality.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system allocates write-combine memory spaces at addresses that are predetermined to be safe from interfering with other memory allocations. By planning allocation locations in advance based on scanned device resources, the system prevents harmful effects on adjacent memory spaces before they can occur.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

3Ease of operation

If automatic allocation method is used, then the allocation process is simplified and stabilized, but the system must scan and evaluate device resources to determine allocation requirements

Engineering Contradiction:
Improveallocation process simplicityVSAvoidresource scanning and evaluation mechanism
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The BIOS or operating system performs automatic resource scanning and evaluation as part of its standard initialization process. This self-service approach integrates memory allocation into existing system routines, simplifying the overall process while the underlying complexity of resource scanning is handled transparently by the system's built-in mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9274940B2Method and apparatus for allocating memory space with write-combine attribute
Publication Date: 2016.03.01 HUAWEI TECH CO LTD
  • US9274940B2 patent drawing
  • US9274940B2 patent drawing
  • US9274940B2 patent drawing

AI summary

Embodiments of the present invention disclose a method and an apparatus for allocating a memory space with a write-combine attribute, including: determining, when resources of devices are scanned, a type and a size of a resource required by each device; determining, after the scanning of the resources of the devices is completed, a total size of write-combine memory spaces required by all first devices; then determining a starting address used to allocate a write-combine memory space to the first devices; and allocating one memory space jointly to all the first devices and allocating, from the one memory space, a sub-memory space to each first device. According to the embodiments of the present invention, a memory space with a write-combine attribute can be allocated to devices in a more reliable manner and by using a relatively simple allocation method.