# US 2014/0156968 A1 · Flexible page sizes for virtual memory

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

- Number: US 2014/0156968 A1
- Document ID: US20140156968A1
- Status: Published application
- Kind: A1
- Application number: 13/693,146
- Filed: 2012-12-04
- Published: 2014-06-05
- Earliest claimed: 2012-12-04
- Assignees: ATI Technologies ULC; Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.; Ati Technologies Ulc
- Inventors: Elene Terry; Dhirendra Partap Singh Rana
- Web page: https://patentgrep.com/patent/US20140156968A1

## CPC

- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2212/652: Page size control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for translating a virtual memory address into a physical memory address includes parsing the virtual memory address into a page directory entry offset, a page table entry offset, and an access offset. The page directory entry offset is combined with a virtual memory base address to locate a page directory entry in a page directory block, wherein the page directory entry includes a native page table size field and a page table block base address. The page table entry offset and the page table block base address are combined to locate a page table entry, wherein the page table entry includes a physical memory page base address and a size of the physical memory page is indicated by the native page table size field. The access offset and the physical memory page base address are combined to determine the physical memory address.

## Claims

### Claim 1

A method for translating a virtual memory address into a physical memory address, comprising:
parsing the virtual memory address into a page directory entry offset, a page table entry offset, and an access offset;
combining the page directory entry offset with a virtual memory base address to locate a page directory entry in a page directory block, wherein the page directory entry includes a native page table size field and a base address of a page table block;
combining the page table entry offset and the base address of the page table block to locate a page table entry, wherein the page table entry includes a base address of a physical memory page and a size of the physical memory page is indicated by the native page table size field; and
combining the access offset and the base address of the physical memory page to determine the physical memory address.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the native page table size enables any size physical memory page to be accessed without requiring additional address translation.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the native page table size is used to indicate a native address space pointed to by the page table entry, based on the formula:
address space=(2̂native page table size)×4 KB.

### Claim 4 (depends on 1)

The method according to claim 1, wherein a memory footprint of the page table block may be reduced when the native page table size is greater than or equal to one.

### Claim 5

A processor configured to translate a virtual memory address into a physical memory address, comprising:
circuitry configured to parse the virtual memory address into a page directory entry offset, a page table entry offset, and an access offset; and
circuitry configured to:
combine the page directory entry offset with a virtual memory base address to locate a page directory entry in a page directory block, wherein the page directory entry includes a native page table size field and a base address of a page table block;
combine the page table entry offset and the base address of the page table block to locate a page table entry, wherein the page table entry includes a base address of a physical memory page and a size of the physical memory page is indicated by the native page table size field; and
combine the access offset and the base address of the physical memory page to determine the physical memory address.

### Claim 6

A non-transitory computer-readable storage medium storing a set of instructions for execution by a general purpose computer to translate a virtual memory address into a physical memory address, the set of instructions comprising:
a parsing code segment for parsing the virtual memory address into a page directory entry offset, a page table entry offset, and an access offset;
a first combining code segment for combining the page directory entry offset with a virtual memory base address to locate a page directory entry in a page directory block, wherein the page directory entry includes a native page table size field and a base address of a page table block;
a second combining code segment for combining the page table entry offset and the base address of the page table block to locate a page table entry, wherein the page table entry includes a base address of a physical memory page and a size of the physical memory page is indicated by the native page table size field; and
a third combining code segment for combining the access offset and the base address of the physical memory page to determine the physical memory address.

### Claim 7 (depends on 6)

The non-transitory computer-readable storage medium of claim 6, wherein the instructions are hardware description language (HDL) instructions used for the manufacture of a device.

### Claim 8

A method for determining a number of page table entries needed to address a given virtual address space, comprising:
determining a page size of each page table entry pointed to by a page directory entry;
determining a page directory entry address space pointed to; and
determining the number of page table entries by dividing the page directory entry address space pointed to by the page size of each page table entry.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the page size of each page table entry is determined by the formula:
page size=(2̂native page table size)×4 KB,
wherein the native page table size is a field in the page directory entry.

### Claim 10 (depends on 8)

The method according to claim 8, wherein the page directory address space pointed to is determined by the formula:
page size of page size entry×(2̂page table block size),
wherein the page table block size is a predetermined value.

### Claim 11

A page directory entry for use in translating a virtual memory address into a physical memory address, comprising:
a native page table size field, indicating a size of a corresponding physical memory page; and
a base address of the physical memory page.

### Claim 12 (depends on 11)

The page directory entry according to claim 11, wherein the native page table size enables any size physical memory page to be accessed without requiring additional address translation.

### Claim 13 (depends on 11)

The page directory entry according to claim 11, wherein the native page table size is used to indicate a native address space pointed to by a page table entry, based on the formula:
address space=(2̂native page table size)×4 KB.

### Claim 14 (depends on 11)

The page directory entry according to claim 11, wherein a memory footprint of a page table block may be reduced when the native page table size is greater than or equal to one.
