# US 9,355,031 B2 · Techniques for mapping device addresses to physical memory addresses

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,355,031 B2
- Document ID: US9355031B2
- Status: Granted
- Kind: B2
- Application number: 13/452,860
- Filed: 2012-04-21
- Published: 2012-10-25
- Granted: 2016-05-31
- Earliest claimed: 2011-04-21
- Assignees: International Business Machines Corporation
- Applicants: Gerd Bayer; Hannes Hering; Hoang-Nam Nguyen; Christoph Raisch; Jan-Bernd Themann
- Inventors: Gerd Bayer; Hannes Hering; Hoang-Nam Nguyen; Christoph Raisch; Jan-Bernd Themann
- Web page: https://patentgrep.com/patent/US9355031B2

## CPC

- G06F 13/404: {with address mapping}
- G06F 12/0292: {using tables or multilevel address translation means (G06F12/023 takes precedence; address translation in virtual memory systems G06F12/10)}
- G06F 12/1081: for peripheral access to main memory, e.g. direct memory access [DMA]
- G06F 13/4072: {Drivers or receivers (G06F13/4086 takes precedence; for multistate logic circuits H03K19/0002)}
- G06F 13/4282: {on a serial bus, e.g. I2C bus, SPI bus (on daisy chain buses G06F13/4247)}
- G06F 2212/656: Address space sharing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data processing system includes a main storage, an input/output memory management unit (IOMMU) coupled to the main storage, a peripheral component interconnect (PCI) device coupled to the IOMMU, and a mapper. The system is configured to allocate an amount of physical memory in the main storage and the IOMMU is configured to provide access to the main storage and to map a PCI address from the PCI device to a physical memory address within the main storage. The mapper is configured to perform a mapping between the allocated amount of physical memory of the main storage and a contiguous PCI address space. The IOMMU is further configured to translate PCI addresses of the contiguous PCI address space to the physical memory address within the main storage.

## Claims

### Claim 1

A data processing system comprising:
a main storage;
an input/output memory management unit (IOMMU) coupled to the main storage;
a peripheral component interconnect (PCI) device coupled to the IOMMU, wherein the system is configured to allocate an amount of physical memory in the main storage and the IOMMU is configured to provide access to the main storage and to map a PCI address from the PCI device to a physical memory address within the main storage; and
an operating system executing within the data processing system and that includes a mapper configured to perform a mapping between the allocated amount of physical memory of the main storage and a contiguous PCI address space, wherein the IOMMU is further configured to translate PCI addresses of the contiguous PCI address space to the physical memory address within the main storage;
wherein the IOMMU is configured to translate the PCI address to the physical memory address by combining a first address part of the PCI address referring to a memory block of the physical memory address and a second address part of the PCI address referring to a memory unit within the memory block.

### Claim 2 (depends on 1)

The data processing system of claim 1, wherein the data processing system is configured to allocate the physical memory in the main storage in memory blocks.

### Claim 3 (depends on 2)

The data processing system of claim 2, wherein the memory blocks have different block sizes.

### Claim 4 (depends on 1)

The data processing system of claim 1, wherein the data processing system is configured to apply a block size with a power of two.

### Claim 5 (depends on 4)

The data processing system of claim 4, wherein the block size is 4 kB.

### Claim 6 (depends on 1)

The data processing system of claim 1, wherein the PCI device is configured to internally use a device memory address and includes a mapping unit that is configured to translate the device memory address to the PCI address.

### Claim 7 (depends on 6)

The data processing system of claim 6, wherein the PCI device is configured to provide internal individual memory areas to be addressed by the device memory address and the mapping unit has a key assigned to each individual memory area and is configured only to translate the device memory address into the PCI address if the device memory address is provided with the key assigned to the memory area that includes the device memory address.

### Claim 8 (depends on 7)

The data processing system of claim 7, wherein the mapping unit is configured to translate the device memory address to the PCI address by adding an offset to the device memory address.

### Claim 9 (depends on 8)

The data processing system of claim 8, wherein the offset depends on the key.

### Claim 10 (depends on 8)

The data processing system of claim 8, wherein the mapping unit is configured to map the device memory address to the PCI address under application of bit-shifting of the device memory address according to a power of a given block size.

### Claim 11 (depends on 6)

The data processing system of claim 6, wherein a PCI device driver associated with the PCI device is configured to setup the mapping unit.

### Claim 12 (depends on 1)

The data processing system of claim 1, wherein the mapper is configured to allocate separate contiguous areas of PCI memory within the contiguous PCI address space for application requests, and wherein the separate areas are provided within the contiguous PCI address space spaced apart from each other.

### Claim 13 (depends on 1)

The data processing system of claim 1, wherein the PCI device is configured to provide the PCI address to the IOMMU together with a resource identifier identifying the PCI device.

### Claim 14

A data processing system, comprising:
an input/output memory management unit (IOMMU) coupled to a main storage;
a peripheral component interconnect (PCI) device coupled to the IOMMU, wherein the system is configured to allocate an amount of physical memory in the main storage and the IOMMU is configured to provide access to the main storage and to map a PCI address from the PCI device to a physical memory address within the main storage; and
an operating system executing within the data processing system and that includes a mapper configured to perform a mapping between the allocated amount of physical memory of the main storage and a contiguous PCI address space, wherein the mapper is configured to allocate separate contiguous areas of PCI memory within the contiguous PCI address space for application requests, and wherein the IOMMU is further configured to translate PCI addresses of the contiguous PCI address space to the physical memory address within the main storage; and
wherein the IOMMU is configured to translate the PCI address to the physical memory address by combining a first address part of the PCI address referring to a memory block of the physical memory address and a second address part of the PCI address referring to a memory unit within the memory block.

### Claim 15 (depends on 14)

The data processing system of claim 14, wherein the PCI device is configured to internally use a device memory address and includes a mapping unit that is configured to translate the device memory address to the PCI address.

### Claim 16 (depends on 15)

The data processing system of claim 15, wherein the PCI device is configured to provide internal individual memory areas to be addressed by the device memory address and the mapping unit has a key assigned to each individual memory area and is configured only to translate the device memory address into the PCI address if the device memory address is provided with the key assigned to the memory area that includes the device memory address.

### Claim 17

A method of accessing physical memory, the method comprising:
mapping, using an input/output memory management unit (IOMMU), a peripheral component interconnect (PCI) address from a PCI device to a physical memory address within main storage;
mapping, using a mapper, between an allocated amount of physical memory of the main storage and a contiguous PCI address space, the mapper being located within an operating system of a data processing system and executed by the data processing system; and
translating, using the IOMMU, PCI addresses of the contiguous PCI address space to a physical memory address within the main storage;
wherein the IOMMU is configured to translate the PCI address to the physical memory address by combining a first address part of the PCI address referring to a memory block of the physical memory address and a second address part of the PCI address referring to a memory unit within the memory block.

### Claim 18 (depends on 17)

The method of claim 17, wherein the PCI device is configured to internally use a device memory address and the method further comprises:
translating, using a mapping unit of the PCI device, the device memory address to the PCI address.
