ST Multicom R3.2.4 Release Notes
Copyright © 2003-2009 STMicroelectronics. All Rights Reserved.
This document is not to be copied in whole or in part.
New in this release
- INSbl30122 MME multihosting support
Enhancement summary
- INSbl30122 New MME APIs to support Multihosting
Bug Fix Summary
- INSbl30117 insmod of embxshm kernel module crashes when run via busybox
- INSbl30118 Memory corruption detected during EMBX_Mailbox_Deinit() on Linux
- INSbl30120 Non GPL Linux RT task priority code only implemented for SH4 architecture
- INSbl30121 Using OS21 with CONFIG_DEBUG and CONFIG_DEBUG_ALLOC causes crashes in EMBX Initialisation
- INSbl29924 Use of weak references to OS21 APIs in EMBX target libraries is not robust
MME Multihosting support
The Multicom R3.2.4 release has been extended to support
Mutlihosting which allows Companion cpus to instantiate and
issue commands to transformers. In order to enable this feature
Multicom needs to be recompiled with the 'ENABLE_MULTIHOST=1'
option on the make command line.
In order to use this feature on the Companion cpus the
following new API calls have been added;
MME_ERROR MME_HostInit(void);
MME_ERROR MME_HostTerm(void);
MME_ERROR MME_HostRegisterTransport(const char *name);
MME_ERROR MME_HostDeregisterTransport(const char* name);
These new APIs mirror exactly the standard MME API calls i.e
MME_Init(), MME_Term(), MME_RegisterTransport() and
MME_DeregisterTransport() and should be called with the same parameters.
MME companion failure recovery
The Multicom R3.2.3 release has been extended to support a simple
recovery mechanism for when a companion (ST231) crashes. In this
case the user needs to follow a certain sequence of calls in order
to recover and restart the companion correctly. Several new API
calls and modifications have been made to support this feature;
EMBX_ERROR EMBXSHM_RemoveProcessor(EMBX_TRANSPORT htp, EMBX_UINT cpuID);
MME_ERROR MME_KillCommand(MME_TransformerHandle_t Handle, MME_CommandId_t CmdId);
MME_ERROR MME_KillCommandAll(MME_TransformerHandle_t Handle);
MME_ERROR MME_KillTransformer(MME_TransformerHandle_t handle);
MME_ERROR MME_IsStillAlive(MME_TransformerHandle_t handle, MME_UINT* alive);
Also MME_TermTransformer(), MME_GetTransformerCapability() &
MME_IsStillAlive() will timeout if they receive no response
from the companion within a timeout period. In this case they will return
MME_TRANSFORMER_NOT_RESPONDING to the caller.
The default timeout period is set to MME_TIMEOUT_INFINITE which
emulates the old behaviour (i.e. no timeouts). To enable timeouts, the MME
tuneable MME_TUNEABLE_TRANSFORMER_TIMEOUT should be set to a timeout value in
milliseconds. This can be done using the MME_ModifyTuneable()
call.
In order to recover from a failed companion the user should follow
this sequence;
- Place companion into reset
- Call EMBXSHM_RemoveProcessor() to 'remove' the failed processor from the system
- Call MME_KillCommand() or MME_KillCommandAll() to kill any outstanding commands
- Call MME_KillTransfomer() on all open transformers for that transport
- Call MME_DeregisterTransport() to close the transport handle
- Call EMBX_UnregisterTransport() to cause shutdown of the transport
- Reload companions code and allow it to leave the reset state
- Re-register the transport with EMBX_RegisterTransport()
- Re-register the transport with MME_RegisterTransport()
NOTE: When restarting the EMBX system it is safe to call EMBX_Mailbox_Init() again
as it will return EMBX_ALREADY_INITIALIZED. In which case there
is no need to re-register the mailboxes. Similarly for EMBX_Init().
32-Bit Space Enanced (SE) mode support
The Multicom R3.2.x release has been specifically developed to
support ST40/sh4 hosts running OS21 or Linux in 32-bit (Space enhanced
mode), although it still supports the sh4 when in 29-bit mode.
Support
for many of the older ST platforms has been removed from this release
(e.g. ST20, ST220 based systems). Users of such systems should not
upgrade to this release but continue to use the older releases.
As far as the Multicom programmer is concerned there should be no host or
transformer code changes necessary (against the Multicom 3.1.2 release)
when using this new release, either in 29-bit or 32-bit mode.
Furthermore the same binary Multicom libraries can be used whichever
mode the ST40 is running.
The only changes necessary to
support 32-bit operation are to modify the Multicom EMBXSHM memory
configuration (see section 9.1 of the Multicom User Guide). Now when
running in 32-bit mode the Warp range arguments must be specified as
physical (bus) addresses.
For example on an STi7200/mb519 you may specify the primary Warp range
as;
warpRangeAddr 0x40000000
warpRangeSize 0x10000000
Which specifies a Warp memory region of 256MB in size starting at the
base of the LMI#0 physical memory. Any buffers whose
physical addresses lie within this range will be transferred between
the host and the LX companions using zero-copy memory techniques.
Note:
In 29-bit mode you are still allowed to specify the Warp range using
the P1/P2 segment addresses but it may be clearer to change
them to true physical addresses.
The primary Warp region must enclose
the EMBXSHM heap allocated by Multicom, this means it generally needs
to specify the same LMI that the host's code, heap and data are loaded
into.
If zero-copy is also required for the LMI#1 memory region then it is
necessary to specify a Secondary Warp Range. The EMBXSHM_MailboxConfig_t
data structure has been extended to incorporate two new
members; warpRangeAddr2 and warpRangeSize2;
typedef struct
{
EMBX_CHAR name[EMBX_MAX_TRANSPORT_NAME+1]; /* The name of this transport */
EMBX_UINT cpuID; /* Local CPU ID (0 == master) */
EMBX_UINT participants[EMBXSHM_MAX_CPUS]; /* 1 == participating in this transport */
EMBX_UINT pointerWarp; /* No longer used */
EMBX_UINT maxPorts; /* Max ports supported (0 == no limit) */
EMBX_UINT maxObjects; /* Number of shared objects to support */
EMBX_UINT freeListSize; /* Number of pre-allocated free nodes per port */
EMBX_VOID *sharedAddr; /* Address of base of shared memory */
EMBX_UINT sharedSize; /* Size of shared memory */
EMBX_VOID *warpRangeAddr; /* Primary warp range base address */
EMBX_UINT warpRangeSize; /* Primary warp range size */
EMBX_VOID *warpRangeAddr2; /* Secondary Warp range base address */
EMBX_UINT warpRangeSize2; /* Secondary Warp range size */
} EMBXSHM_MailboxConfig_t;
For example on an STi7200/mb519 you may specify the Secondary Warp range
as;
warpRangeAddr2 0x80000000
warpRangeSize2 0x10000000
Which would specify a 256MB secondary Warp region beginning at the base
of the LMI#1 physical memory.
If a secondary Warp range is not required then the warpRangeSize2
parameter should be set to 0.
Note1: The pointerWarp member is still part of the mailbox configuration data, but is not
longer used by Multicom. The sharedAddr parameter can still
be used and a virtual address should be supplied if this is
required.
Note2: Due to the changes in the Warp range handling, release R3.2.x of
Multicom is not binary compatible with code compiled against earlier versions of
Multicom (e.g. 3.1.x). Thus all host and companion code will need to be recompiled
against the latest Multicom headers and libraries in order to function
correctly.
STLinux2.3 udev support
The
STLinux2.3 release enables dynamic device support using udev. This
allows device drivers to dynamically create device files in /dev.
However, in order to use this facility Multicom has to make use of GPL
only exported functions. This code path is not enabled by default and
must be enabled by specifying ENABLE_GPL=1 in the Multicom build
options.
If you do not wish to build the Multicom modules under a GPL licence
then you will need to statically create the mme device entry
under lib/udev/devices
in the target file system, or disable udev support when using the
STLinux2.3 release.
STLinux Default thread priorities
The R3.2.1 and later
releases support RT scheduler thread classes for the Multicom helper
threads, and by default the following thread priorities are used for a
Linux host;
Thread priority tuneable |
Default Value |
Scheduler Class |
Priority |
EMBX_TUNEABLE_THREAD_PRIORITY |
-90 |
RT/RR |
70 |
MME_TUNEABLE_MANAGER_THREAD_PRIORITY |
-80 |
RT/RR |
60 |
MME_TUNEABLE_TRANSFORMER_THREAD_PRIORITY |
-70 |
RT/RR |
50 |
MME_TUNEABLE_EXECUTION_LOOP_HIGHEST_PRIORITY |
-20 |
NORMAL |
nice -20 |
MME_TUNEABLE_EXECUTION_LOOP_ABOVE_NORMAL_PRIORITY |
-10 |
NORMAL |
nice -10 |
MME_TUNEABLE_EXECUTION_LOOP_NORMAL_PRIORITY |
0 |
NORMAL |
nice 0 |
MME_TUNEABLE_EXECUTION_LOOP_BELOW_NORMAL_PRIORITY |
10 |
NORMAL |
nice 10 |
MME_TUNEABLE_EXECUTION_LOOP_LOWEST_PRIORITY |
19 |
NORMAL |
nice 19 |
The
tuneable value determines which scheduler class and what priority the
thread should be created with. Values < -20 will cause an RT
(SCHED_RR) class thread to be created with priority <value>
+ 20. Values >= -20 will cause a normal Linux scheduler class to be
used (SCHED_NORMAL) and the priority value will be used to set the
thread 'nice' level.
It should be noted that when the Multicom
host is running on STLinux the only threads that are created on
the host are the per remote transformer instantiation MME callback ones
(MME_TUNEABLE_TRANSFORMER_THREAD_PRIORITY) and the two EMBX control
ones (EMBX_TUNEABLE_THREAD_PRIORITY).
Toolkit/OS21 compatibility
Multicom
release R3.2.2 has been reworked to allow it to operate with the
various ST40 and ST200 compiler toolkits. To do this it makes use of
weak symbol definitions which allow it to determine at runtime which
OS21 APIs are available. Hence this means that the prebuilt Multicom
libraries can be used with any ST40 or ST200 toolkit, either in 29-bit
mode or 32-bit SE mode, and still operate correctly. However, to
support 32-bit SE mode the application needs to be compiled using a
toolkit with a version of OS21 designed to support virtual memory
operation.
Known defects/issues
The remainder of this section discusses issues that the user
may encounter but that are not considered to be bugs in the ST RPC software.
- This release has not been tested with Windows CE. This is purely a STLinux and OS21 release
- Support of STLinux for versions prior to 2.2 has been deprecated.
- Support for ST20 and ST220 based platforms has been removed.
- EMBX distributed objects do not offer the strong buffer ownership
provided by the EMBX message API. This forces the user to be
responsible for correctly managing buffer ownership when using
distributed objects with the EMBXSHMC transport.
- make clean does not remove the Linux kernel modules. These will need to be removed manually in order to ensure a clean rebuild.
Product license
The Multicom product license can be found in license.pdf.
Toolset version information
The supplied ST Multicom binary library files have been built using the
following toolsets;
- ST40 R3.1.1 patch 1
- ST200 R5.1 patch 2
ST Multicom has been tested using the following toolsets;
- ST40 R4.0.2/R4.1.1 Toolset (OS21)
- STLinux 2.2 for ST40 (kernel version 2.6.17.14_stm22_0038)
- STLinux 2.3 for ST40 (kernel version linux-sh4-2.6.23.17_stm23_0116)
- ST200 R5.1 patch 2 Toolset (OS21)
- ST200 R6.1 Toolset (OS21)
Note: For some of the above toolsets ST is not able to guarantee
binary compatibility between toolset releases. The Multicom User
Manual provides instructions on rebuilding the target binaries if this is required.