The names of typed memory regions are derived directly from the names of the asinfo segments. The asinfo section itself describes a hierarchy, and so the naming of typed memory object is a hierarchy.
Here's a sample system configuration:
| Name | Range (start, end) |
|---|---|
| /memory | 0, 0xFFFFFFFF |
| /memory/ram | 0, 0x1FFFFFF |
| /memory/ram/sysram | 0x1000, 0x1FFFFFF |
| /memory/isa/ram/dma | 0x1000, 0xFFFFFF |
| /memory/ram/dma | 0x1000, 0x1FFFFFF |
The name you pass to posix_typed_mem_open() follows the above naming convention. POSIX allows an implementation to define what happens when the name doesn't start with a leading slash (/). The resolution rules on opening are as follows:
Here are some examples of how posix_typed_mem_open() resolves names, using the above sample configuration:
| This name: | Resolves to: | See: |
|---|---|---|
| /memory | /memory | Rule 1 |
| /memory/ram | /memory/ram | Rule 2 |
| /sysram | Fails | |
| sysram | /memory/ram/sysram | Rule 3 |