Question

Looking at a BSP package supplied with VxWorks shows the following memory mapping for the image: (from Pentium4)

Parameter RAM_HIGH_ADRS {
    NAME        Bootrom Copy region
    DEFAULT     (INCLUDE_BOOT_APP)::(0x00008000) \
                 0x00108000
}

Parameter RAM_LOW_ADRS {
    NAME        Runtime kernel load address
    DEFAULT     (INCLUDE_BOOT_RAM_IMAGE)::(0x00508000) \
                (INCLUDE_BOOT_APP)::(0x00108000) \
                0x00308000
}

But this one looks strange to me, how can RAM_LOW_ADRS > RAM_HIGH_ADRS ? Per what I could understand, the boot loader is suppose to be loaded after RAM_HIGH_ADRS and the VxWorks image at RAM_LOW_ADRS, and the boot loader is suppose to be located after the image.

Any ideas?

Was it helpful?

Solution

RAM High/Low are somewhat of a misnomer as you have discovered.
It really should be called RAM_VXWORKS_ADDR and RAM_BOOT_ADDR (or some such).
A lot of those names are historical in nature.

In 99% of cases, RAM_HIGH > RAM_LOW. But, depending on architecture, BSP and target, there might be an inversion.

In the end, it's just an address to load software. As long as there is no conflict or overlap, it's ok.

The vxWorks Heap has nothing to do with RAM_LOW/HIGH_ADDR per se.

The vxWorks heap (in a simplified view) runs from above the vxWorks image to the address returned by sysMemTop() - which is defined by the BSP and might run to the top of physical RAM (or not).

In the normal situation, with vxWorks loading bellow the bootrom load address, the bootrom simply gets overwritten. That's not the case in your BSP, so you do loose some RAM space since the bootrom is not "reclaimed".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top