Developer Guide

  • 2021.2
  • 06/11/2021
  • Public
Contents

Real-Time Configuration Manager (RTCM)

RTCM is an EFI application that makes it possible to use software SRAM technology on non-virtualized systems. Because of the nature of RTCM, certain system-wide configurations (such as cache management, performed via
cache configurator
) must be performed with RTCM disabled. In this guide, you will be instructed to disable RTCM when using the
cache configurator
, and enable RTCM when using the
cache allocation library
. This topic provides a short description of RTCM and why it is important to configure it appropriately.
If you are using a hypervisor that supports software SRAM (such as the ACRN* hypervisor), you do not have to use RTCM because RTCM functionality has been integrated into your hypervisor. Follow the guidance from your hypervisor vendor about appropriate use of the cache configurator.

About RTCM

RTCM enables software SRAM technology by implementing functionality traditionally reserved for a hypervisor. To use software SRAM, you must have RTCM or a hypervisor that supports software SRAM.

RTCM and Cache Allocation Library

RTCM prevents the eviction of software SRAM buffers from the cache whenever possible.
To provide such protections, RTCM virtualizes certain model-specific registers (MSRs) and CPUID leafs to prevent system software from discovering reserved cache or modifying the reservations. Unlike a traditional hypervisor, RTCM does not virtualize other system resources such as the cores, I/O, or memory. This enables RTCM to have minimal performance overhead and is only invoked when certain operations are performed that have the potential to impact software SRAM buffers. RTCM does not support running multiple operating systems, and as of today only supports running a single instance of the Linux* OS.
The
cache allocation library
depends upon software SRAM to provide low-latency access to buffers. The cache allocation library requires that RTCM (or a hypervisor supporting software SRAM) be enabled.

RTCM and Cache Configurator

Virtualization of the underlying physical resources prevents the
cache configurator
from obtaining needed information.
The cache configurator interfaces with the real-time configuration driver and underlying hardware to discover the original/unmodified cache configuration of the target system it is attempting to configure.
If RTCM is running at the time of such discovery, the cache configurator will not get the unmodified cache configuration of the system. It will instead get a virtualized view of the system that may be different from the unmodified view, resulting in improper functioning.
You must ensure that RTCM is disabled while the cache configurator is being used to perform the configuration and then re-enable RTCM afterward to protect software SRAM.
If the cache configuration doesn’t contain any software SRAM buffers, RTCM will not be loaded even if enabled via Boot Options.

RTCM and Data Streams Optimizer

The Data Streams Optimizer (DSO) tunes the system to achieve the right balance between power management and performance consistency for real-time applications. Some of the tuning configurations provided by DSO enable power management options that are not compatible with RTCM. It is important to decide in advance whether RTCM and DSO tuning are going to be used together and follow this consistently.
If your use case requires using both DSO and RTCM, set the
SoftwareSRAM
compatibility option as described in Create a Requirements File. In this case, only tuning configurations compatible with Software SRAM and RTCM will be applied by DSO.
If your use case requires balancing power consumption without software SRAM, do not use the
SoftwareSRAM
compatibility option. In this case, ensure that RTCM is disabled before using the data streams optimizer for the first time and remains disabled afterward. Make sure RTCM and Software SRAM are not used for the entire lifecycle of the configured device by you or other users of the device.
If you enable RTCM, then use the data streams optimizer to tune the system, and then disable RTCM, the system may freeze or you may see the error: “Could not set up firmware update: Invalid argument. ERROR: Failed to apply buffer capsule” or various other errors due to offline cores. See Troubleshooting for recovery recommendations.

Setup

If you have completed the Get Started Guide, RTCM is already set up.
The following steps are for reference and troubleshooting.
Add RTCM to the Boot Options
Cache allocation features require RTCM to be first in the boot order.
The following steps show how to manually add RTCM to the boot options:
  1. From your host system, connect to the target system:
    ssh <user>@<target>
  2. In the SSH session
    , run the following command to determine the boot disk:
    lsblk
    Output example:
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 57.3G 0 disk |-sda1 8:1 1 128M 0 part /boot/efi |-sda2 8:2 1 12G 0 part / |-sda3 8:3 1 12G 0 part |-sda4 8:4 1 12G 0 part /data |-sda5 8:5 1 4G 0 part [SWAP] sdb 8:16 1 14.4G 0 disk |-sdb1 8:17 1 14.4G 0 part sdc 8:32 1 28.7G 0 disk
    In this example, the boot disk (/boot/efi) is
    sda
    and partition is
    1
    . In some cases, you may see the partition
    p1
    ; this also means the partition is 1.
  3. Set RTCM as the default boot option.
    Replace <disk> and <partition> with the disk name and partition number from the previous step..
    efibootmgr -c -l '\EFI\BOOT\rtcm_boot.efi' -d /dev/<disk> -p <partition> -L RTCM
    Output example: the appearance of RTCM means the command was successful. RTCM will be enabled (as indicated by the asterisk) and first in the boot order (as indicated in BootOrder) after you reboot.
    BootCurrent: 0003 Timeout: 5 seconds BootOrder: 0004,0003,0001,0002,0000 Boot0000* Enter Setup Boot0001* Internal UEFI Shell Boot0002* Boot Device List Boot0003* UEFI INTEL SSDPEKKW010T8 BTHH85010JZH1P0E 1 Boot0004* RTCM
  4. Reboot the target system.
    reboot
Enable RTCM
You can enable RTCM with the following commands:
For systems running the PR1 release of the Yocto Project*-based BSP for Intel Atom® x6000E Series processors, run:
/usr/share/tcc_tools/scripts/setup_ssram_v1/control_rtcm.sh enable reboot
For other systems, run:
/usr/share/tcc_tools/scripts/setup_ssram/control_rtcm.sh enable reboot
Disable RTCM
You can disable RTCM with the following commands:
For systems running the PR1 release of the Yocto Project*-based BSP for Intel Atom® x6000E Series processors, run:
/usr/share/tcc_tools/scripts/setup_ssram_v1/control_rtcm.sh disable reboot
For other systems, run:
/usr/share/tcc_tools/scripts/setup_ssram/control_rtcm.sh disable reboot

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.