asinfo

QNX SDP8.0Building Embedded SystemsConfigurationDeveloper

Array of structures describing different sections of the system memory map (e.g., RAM, SRAM, flash, I/O ranges)

The asinfo (Address Space Information) area consists of an array of asinfo structures, each of which has these fields:
start
The first physical address of the range being described.
end
The last physical address of the range being described. Note that this is the actual last byte, not one beyond the end.
owner
An offset from the start of the section giving the owner of this entry (its parent in the tree). It's set to AS_NULL_OFF if the entry doesn't have an owner (it's at the root of the address space tree).
name
An offset from the start of the strings section of the system page giving the string name of this entry.
attr
A bitfield describing attributes of the address range (see attr below).
priority
Indicates the speed of the memory in the address range. A smaller number means slower memory. The macro AS_PRIORITY_DEFAULT is defined to use a default value for this field (currently defined as 100).

Each array entry describes the attributes of one address space section on the machine. The memory map has a tree format; that is, an address range can have a parent. The information in the asinfo structures can be hard-coded from the system memory map, or read in from the memory controller.

When procnto is managing virtual memory for process address spaces, it uses the information in asinfo to know from where in RAM it can allocate memory.

attr

The attr field can have the following bits:
AS_ATTR_KIDS 0x0010
Other entries use this entry as their owner.
The library turns on this bit automatically; you shouldn't specify it when creating the section.
AS_ATTR_CONTINUED 0x0020
Multiple entries are used to describe one logical address range. This bit will be on in all but the last entry.
The library turns on this bit and uses it internally; you shouldn't specify it when creating the section.

Address space trees

The asinfo section contains trees describing address spaces (where RAM, ROM, flash, etc. are located).

The general hierarchy for address spaces is:
/memory/memclass/...
or:
/io/memclass/...
or:
/memory/io/memclass/...

The memory or io indicates if this entry describes something in the memory or the I/O address space. The third form (/memory/io/memclass/...) is used on machines without separate in/out instructions and where everything is memory-mapped.

The memclass is something like ram, rom, flash, etc. Below memclass are further classifications, allowing the process manager to provide typed memory support.

Understanding pidin asinfo output

A brief examination of the following sample output from pidin syspage=asinfo (see pidin) may help you understand better the information stored in the syspage asinfo array of structures:
Header size=0x000000f0, Total Size=0x00000918, Version=2.0, #Cpu=2, Type=4352
Section:asinfo offset:0x00000540 size:0x00000258 elsize:0x00000018
0000) 0000000000000000-000000000000ffff o:ffff /io
0018) 0000000000000000-000fffffffffffff o:ffff /memory
0030) 0000000000000000-00000000ffffffff o:0018 /memory/below4G
0048) 0000000000000000-0000000000ffffff o:0018 /memory/isa
0060) 0000000006000000-00000000ffefffff o:0018 /memory/device
0078) 00000000fff00000-00000000ffffffff o:0018 /memory/rom
0090) 0000000000000000-000000000009f7ff o:0048 /memory/isa/ram
00a8) 0000000000100000-0000000000ffffff o:0048 /memory/isa/ram
00c0) 0000000001000000-0000000005ffffff o:0030 /memory/below4G/ram
00d8) 0000000006000000-000000003fedffff o:0060 /memory/device/ram
00f0) 000000003ff00000-000000003fffffff o:0060 /memory/device/ram
0108) 00000000000f6a00-00000000000f6a23 o:0018 /memory/acpi_rsdp
0120) 00000000fee00000-00000000fee003ef o:0018 /memory/lapic
0138) 00000000f0000000-00000000f7ffffff o:0018 /memory/ecam
0150) 0000000001430078-0000000001e2686b o:0018 /memory/imagefs
0168) 0000000001400f30-0000000001430077 o:0018 /memory/startup
0180) 0000000001430078-0000000001e2686b o:0018 /memory/bootram
0198) 0000000000001000-000000000009efff o:0090 /memory/isa/ram/sysram
01b0) 0000000000106000-0000000000108fff o:00a8 /memory/isa/ram/sysram
01c8) 0000000000110000-00000000005e1fff o:00a8 /memory/isa/ram/sysram
01e0) 00000000005e3000-0000000000ffffff o:00a8 /memory/isa/ram/sysram
01f8) 0000000001000000-000000000142ffff o:00c0 /memory/below4G/ram/sysram
0210) 0000000001e27000-0000000005ffffff o:00c0 /memory/below4G/ram/sysram
0228) 0000000006000000-000000003f2d2fff o:00d8 /memory/device/ram/sysram
0240) 000000003ff00000-000000003fffffff o:00f0 /memory/device/ram/sysram
The following is information about the system page entry:
Header size=0x000000f0, Total Size=0x00000918, Version=2.0, #Cpu=2, Type=4352
Section:asinfo offset:0x00000540 size:0x00000258 elsize:0x00000018
where the first line describes the system page (see size, total_size, num_cpu, and type under System Page), and the second line describes the asinfo structure array:
offset:0x00000540
The offset, in bytes, of the asinfo structure array in the system page.
size:0x00000258
The size, in bytes, of the asinfo structure array.
elsize:0x00000018
The size, in bytes, of each element in the asinfo structure array.

The above information is followed by a list of the asinfo elements, each one describing a section of memory on the system. Notice that the number in the first column increments by the size of the element (0x18).

Suppose we parse the following line and refer to the description of asinfo above:
0210) 0000000001e27000-0000000005ffffff o:00c0 /memory/below4G/ram/sysram
We then learn the following:
0210)
This entry's offset (displayed as a hexadecimal value) within the asinfo structure array.
0000000001e27000
The memory region's offset in memory (start).
0000000005ffffff
The offset of the last byte of this memory region (end).
o:00c0
The owner of the memory region, displayed as the hexadecimal offset of the parent region.
/memory/below4G/ram/sysram
The memory region's descriptive name. Note that this name uses a tree to describe the memory region (name; see Address space trees above).
For more information about:
  • managing memory in a QNX OS system — Memory management in the System Architecture Process Manager chapter
  • determining the location and size of system RAM and initializing the asinfo structure in the system page — init_raminfo() in the Startup Library chapter of this guide
  • allocating and mapping memory — malloc() and mmap(), mmap64(), mmap_handle() in the C Library Reference
  • memory types (e.g., ram, sysram) — the Working with Memory chapter in the Programmer's Guide
  • Virtual and physical systems — Bootfile in the Utilities Reference mkifs entry
Page updated: