ram
Allocate RAM to the VM
Synopsis:
ram [start_address,]length
Description:
The ram option allocates RAM to the VM, at the guest-physical address specified by start_address for the number of bytes specified by length.
If you don't specify this option, by default the qvm process allocates the RAM immediately following the highest RAM/ROM address already allocated in the guest system.
When you specify the length argument, you can use either
hexadecimal notation (e.g., 0xa0000
for 640 KB), or human-readable
abbreviations (e.g., 16M
for 16 MB).
You must allocate RAM before components that refer to the guest memory (see
Exceptions
in
the Configuration
chapter).
RAM that appears to the guest as contiguous is unlikely to be contiguous in
host-physical memory (see Memory
in
the Understanding QNX Virtual Environments) chapter.
Example:
0x80000000
:
ram 0x80000000,128M
[image=0x80000000]
[virtual=aarch64le,elf] .bootstrap = {
[+keeplinked] startup-armv8_fm -v -H
[+keeplinked] PATH=/proc/boot procnto -v
}
Allocating memory on x86 boards
Due to the long history of the x86 platform, it is likely that a guest OS will expect
the 128 KB of VGA memory to be mapped at 0xa0000
. Though the
hypervisor doesn't offer emulation of a VGA device, you should reserve this region
in guest-physical memory so that the qvm process assembling the
VM can't allocate it (see reserve in this chapter).
Similarly, the region between 0xc0000
and 0xfffff
has traditionally been known as the BIOS area. You should configure this area, but
you should use the rom option to remove it from the memory map
passed on to the guest.
ram 1024M
you must reserve the location for the VGA, specify the ROM for the BIOS, and specify
the RAM memory, so that your memory configuration for an x86 guest looks something
like this:
ram 0,0xa0000
reserve loc 0xa0000,0x20000
rom 0xc0000,0x40000
ram 1m,1023m
where:
ram 0,0xa0000
allocates the first 640 KB of guest-physical RAM to the guestreserve loc 0xa0000,0x20000
reserves the next 128 KB so that the qvm process instance assembling the VM can't use this location when it is dynamically allocating resources (see reserve in this chapter).rom 0xc0000,0x40000
allocates the 128 KB BIOS area as ROMram 1m,1023m
allocates to the guest the remaining portion of the 1 GB of RAM, starting at 1 MB
For cases where the guest doesn't expect to find a component (e.g., legacy device, BIOS) at a specific location, you may specify only the size of the memory allocation and let the qvm process decide on the location. However, if the guest expects memory to be available for a specific purpose at a specific location, you must respect these requirements, just as you would for an OS running directly on an x86 board.
See Configuring memory
in the Understanding QNX Virtual Environments
chapter.
Mapping PCI pass-through devices on x86
ram 0,0xa0000
rom 0xc0000,0x40000
ram 1M,1500M # Get 1.5 GB. Stops below the 2G boundary.
ram 4096M,3000M # Get 3 GB. Starts above the 4G boundary.