4.15.8 Event source IRIS_SEMIHOSTING_CALL_EXTENSION

This event source is intrusive. Activating it changes the model behavior. When it is active, this event is issued instead of a built-in semihosting function call.

The receiver of this event is expected to implement and execute the semihosting call from within the event callback. This event source should be activated with eventStream_create(syncEc=True).

Note:

All synchronous event activity across IPC has a severe performance impact.

The ec_FOO() callback must do one of the following:

  • Execute the semihosting function, and therefore override the built-in implementation. In this case it must call semihosting_return(). semihosting_return() must not be called from any other event callback, otherwise E_invalid_context is returned. Functions that need to return more data than an integer should write it directly into memory using memory_write(). A buffer consisting of a memory address and length is usually passed to the called function as an argument for this purpose.
  • Leave execution to the built-in implementation, and therefore not override it. In this case, it must call semihosting_notImplemented().
  • Leave execution to the next client that registered this event source. If multiple clients have registered this event source, any of them might be called first and have the choice to implement the function or pass it to the next one, in no defined order. This enables different plug-ins to override separate, non-overlapping, sets of functions.

Table 4-13 Event source IRIS_SEMIHOSTING_CALL_EXTENSION

Field Type Description
OPERATION NumberU64 The operation number of the built-in or user semihosting call according to the semihosting specification. This is the value of the operation number register when the target issues the semihosting trap instruction.
PARAMETER NumberU64 Register argument for the called function. This is the value of the parameter register when the target issues the semihosting trap instruction. This either contains an argument value for the called function, or it contains the virtual address of a data structure. This decision and the semantics depend on OPERATION. In case of a memory address, the semihosting implementation must read the memory using the memory_read() function.
Non-ConfidentialPDF file icon PDF version101196_0100_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.