alf_query_system_info

NAME

alf_query_system_info - Queries basic configuration information.

SYNOPSIS

int alf_query_system_info(alf_handle_t alf_handle, ALF_QUERY_SYS_INFO_T query_info, ALF_ACCEL_TYPE_T accel_type, unsigned int * p_query_result);

Parameters  
alf_handle [IN] Handle to the ALF runtime.
query_info [IN]

A query identification that indicates the item to be queried:

  • ALF_QUERY_NUM_ACCEL: Returns the number of accelerators in the system.
  • ALF_QUERY_HOST_MEM_SIZE: Returns the memory size of control nodes up to 4T bytes, in units of kilobytes (2^10 bytes). When the size of memory is more than 4T bytes, the total reported memory size is (ALF_QUERY_HOST_MEM_SIZE_EXT*4T + ALF_QUERY_HOST_MEM_SIZE*1K) bytes. In case of systems where virtual memory is supported, this should be the maximum size of one contiguous memory block that a single user space application could allocate.
  • ALF_QUERY_HOST_MEM_SIZE_EXT: Returns the memory size of control nodes, in units of 4T bytes (2^42 bytes).
  • ALF_QUERY_ACCEL_MEM_SIZE: Returns the memory size of accelerator nodes up to 4T bytes, in units of kilo bytes (2^10 bytes) . When the size of memory is more than 4T bytes, the total reported memory size is (ALF_QUERY_ACCEL_MEM_SIZE_EXT*4T + ALF_QUERY_ACCL_MEM_SIZE*1K) bytes. For systems where virtual memory is supported, this should be the maximum size of one contiguous memory block that a single user space application could allocate.
  • ALF_QUERY_ACCEL_MEM_SIZE_EXT: Returns the memory size of accelerator nodes, in units of 4T bytes (2^42 bytes).
  • ALF_QUERY_HOST_ADDR_ALIGN: Returns the basic requirement of memory address alignment on control node side, in exponential of 2. A zero stands for byte aligned address. A 4 is to align by 16 byte boundaries.
  • ALF_QUERY_ACCEL_ADDR_ALIGN: Returns the basic requirement of memory address alignment on accelerator node side, in exponential of 2. A zero stands for byte aligned address. An 8 is to align by 256 byte boundaries
  • ALF_QUERY_DTL_ADDR_ALIGN: Returns the address alignment of data transfer list entries, in exponential of 2. A zero stands for byte aligned address. An 8 is to align by 256 byte boundaries.
  • ALF_QUERY_ACCEL_ENDIAN_ORDER:
    • ALF_ENDIAN_ORDER_BIG
    • ALF_ENDIAN_ORDER_LITTLE
  • ALF_QUERY_HOST_ENDIAN_ORDER:
    • ALF_ENDIAN_ORDER_BIG
    • ALF_ENDIAN_ORDER_LITTLE
accel_type [IN] Accelerator type. There is only one accelerator type defined, which is ALF_ACCEL_TYPE_SPE
p_query_result [OUT] Pointer to a buffer where the return value of the query is saved. If the query fails, the result is undefined. If a NULL pointer is provided, the query value is not returned, but the call returns zero.

DESCRIPTION

This function queries basic configuration information for the specific system on which ALF is running.

RETURN VALUE

0 Successful, the result of query is returned by p_result if that pointer is not NULL
less than 0 Errors occurred:
  • ALF_ERR_INVAL: Unsupported query
  • ALF_BADF: Invalid ALF handle
  • ALF_ERR_GENERIC: Generic internal errors
Related reference
alf_handle_t
alf_init
alf_num_instances_set
alf_exit
alf_error_handler_register
ALF_ERR_POLICY_T