5.18.4 Semihosting functions

Describes the following functions:

semihosting_notImplemented()

If a client has registered the IRIS_SEMIHOSTING_CALL_EXTENSION event source but only wants to override a subset of the semihosting functions, it can call semihosting_notImplemented() from within the ec_FOO() callback function for IRIS_SEMIHOSTING_CALL_EXTENSION.

This indicates that the function was not yet executed and that it must be handled by another client or by the original built-in function. This function is called in the same context as, and instead of, semihosting_return().

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance. This must be the instId argument of the current ec_FOO() callback.

Return value

Function has no return value.

Errors

  • E_unknown_instance_id.
  • E_invalid_context.

semihosting_provideInputData()

Feeds user input as a sequence of bytes into the model for a semihosted read.

Arguments

data

Type: NumberU64[]

Characters (bytes) to be provided to the file descriptor fDes as input data. This must not be empty. The encoding is 8 bytes per array element. The first byte is in the lowest bits (little-endian). The last element contains 1-8 bytes in the lowest bits.

fDes

Type: NumberU64

File descriptor number used for input. This is usually 0, meaning stdin. This value must be passed to the semihosting_provideInputData() function when passing data.

instId

Type: NumberU64

Opaque number uniquely identifying the target instance to which the input data must be sent.

size

Type: NumberU64

Number of bytes in data.

Return value

Function has no return value.

Errors

  • E_unknown_instance_id.
  • E_unknown_file_descriptor.
  • E_data_size_error.

semihosting_return()

Returns a value from a semihosting override function. This function must be called from within the event callback of the IRIS_SEMIHOSTING_CALL_EXTENSION event, before returning from the callback. It must not be called from any other event callback. If called from outside of an IRIS_SEMIHOSTING_CALL_EXTENSION event, E_invalid_context is returned.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance to which the return value must be sent. This must be the instId argument of the current ec_FOO() callback.

retval

Type: NumberU64

Return value of the function being called. The semantics depend on the function being called.

Return value

Function has no return value.

Errors

  • E_unknown_instance_id.
  • E_invalid_context.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.