Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Interrupt Controller Distributor Interface [Secure]

Description

This group of APIs provide access, configuration, and control of the Generic Interrupt Controller (GIC) Distributor interface when in the Secure state.

Functions

ALT_STATUS_CODE alt_int_dist_secure_enable (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_secure_disable (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_is_secure (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_enable (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_disable (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_is_enabled (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_pending_set (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_pending_clear (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_is_pending (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_is_active (ALT_INT_INTERRUPT_t int_id)
 
ALT_STATUS_CODE alt_int_dist_priority_get (ALT_INT_INTERRUPT_t int_id, uint32_t *priority)
 
ALT_STATUS_CODE alt_int_dist_priority_set (ALT_INT_INTERRUPT_t int_id, uint32_t priority)
 
ALT_STATUS_CODE alt_int_dist_target_get (ALT_INT_INTERRUPT_t int_id, alt_int_cpu_target_t *target)
 
ALT_STATUS_CODE alt_int_dist_target_set (ALT_INT_INTERRUPT_t int_id, alt_int_cpu_target_t target)
 
ALT_STATUS_CODE alt_int_dist_trigger_get (ALT_INT_INTERRUPT_t int_id, ALT_INT_TRIGGER_t *trigger_type)
 
ALT_STATUS_CODE alt_int_dist_trigger_set (ALT_INT_INTERRUPT_t int_id, ALT_INT_TRIGGER_t trigger_type)
 

Function Documentation

ALT_STATUS_CODE alt_int_dist_secure_enable ( ALT_INT_INTERRUPT_t  int_id)

Enable the specified interrupt for secure operation.

This function configures the interrupt as Secure.

All interrupts are secure by default.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_secure_disable ( ALT_INT_INTERRUPT_t  int_id)

Disable the specified interrupt from secure operation.

This function configures the interrupt as non-secure.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_is_secure ( ALT_INT_INTERRUPT_t  int_id)

Returns true if the specified interrupt is enabled for secure operation and false otherwise.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_TRUEInterrupt is Secure.
ALT_E_FALSEInterrupt is Non-Secure.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_enable ( ALT_INT_INTERRUPT_t  int_id)

Enable the specified interrupt to be forwarded to the CPU interface.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), interrupts must be enabled on each CPU that will service the interrupt. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_disable ( ALT_INT_INTERRUPT_t  int_id)

Disables the specified interrupt from being forwarded to the CPU interface.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), interrupts must be disabled on each CPU that will no longer service the interrupt. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_is_enabled ( ALT_INT_INTERRUPT_t  int_id)

Return true if the specified interrupt is enabled and false otherwise.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), interrupts must be queried on each CPU that may service the interrupt. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_TRUEInterrupt is enabled.
ALT_E_FALSEInterrupt is disabled.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_pending_set ( ALT_INT_INTERRUPT_t  int_id)

Set the pending status of the specified peripheral interrupt.

This API is not valid for Software Generated Interrupts (SGI) (interrupts 0 - 15).

For Private Peripheral Interrupt (PPI) (interrupts 16 - 32), pending is set on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All peripheral interrupts are valid, 16 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_pending_clear ( ALT_INT_INTERRUPT_t  int_id)

Clear the pending status of the specified peripheral interrupt.

This API is not valid for Software Generated Interrupts (SGI) (interrupts 0 - 15).

For Private Peripheral Interrupt (PPI) (interrupts 16 - 32), pending is cleared on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 16 - 1019.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_is_pending ( ALT_INT_INTERRUPT_t  int_id)

Returns true if the specified interrupt is pending or active and pending, otherwise returns false.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), is pending is queried on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_TRUEThe specified interrupt is pending or active and pending.
ALT_E_FALSEThe specified interrupt is not pending and is not active and pending.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_is_active ( ALT_INT_INTERRUPT_t  int_id)

Returns true if the specified interrupt is active or active and pending, otherwise returns false.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), is active is queried on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
Return values
ALT_E_TRUEThe specified interrupt is active or active and pending.
ALT_E_FALSEThe specified interrupt is not active and is not active and pending.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_priority_get ( ALT_INT_INTERRUPT_t  int_id,
uint32_t *  priority 
)

Get the priority field value of the specified interrupt.

Higher priority corresponds to a lower priority field value.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), priority is queried on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
priority[out] Pointer to an output parameter that contains the interrupt priority.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_priority_set ( ALT_INT_INTERRUPT_t  int_id,
uint32_t  priority 
)

Sets the priority field value of the specified interrupt.

Higher priority corresponds to a lower priority field value.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), priority is set on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
priorityThe interrupt priority. Valid values are 0 - 255.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier and / or priority value is invalid.
ALT_STATUS_CODE alt_int_dist_target_get ( ALT_INT_INTERRUPT_t  int_id,
alt_int_cpu_target_t target 
)

Get the processor target list for the specified interrupt.

For Software Generated Interrupts (SGI) (interrupts 0 - 15) and Private Peripheral Interrupt (PPI) (interrupts 16 - 32), get target will return a set corresponding to the current CPU.

Parameters
int_idThe interrupt identifier. All interrupts are valid, 0 - 1019.
target[out] Pointer to an output parameter that contains the set of CPU(s) servicing the interrupt.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_target_set ( ALT_INT_INTERRUPT_t  int_id,
alt_int_cpu_target_t  target 
)

Sets the the list of processors that the interrupt is sent to if it is asserted. This function is only valid for Shared Peripheral Interrupts (SPI).

Parameters
int_idThe interrupt identifier. Only SPI are valid, 32 - 1019.
targetThe set of CPUs which will handle the interrupt.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier and / or target list is invalid.
ALT_STATUS_CODE alt_int_dist_trigger_get ( ALT_INT_INTERRUPT_t  int_id,
ALT_INT_TRIGGER_t trigger_type 
)

Get the configured trigger type for the specified Private Peripheral Interrupt (PPI) or Shared Peripheral Interrupt (SPI).

For PPI (interrupts 16 - 32), triggering is queried on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. Only PPI and SPI are valid, 16 - 1019.
trigger_type[out] Pointer to an output parameter that contains the trigger type of the interrupt.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier is invalid.
ALT_STATUS_CODE alt_int_dist_trigger_set ( ALT_INT_INTERRUPT_t  int_id,
ALT_INT_TRIGGER_t  trigger_type 
)

Sets the trigger type for the specified interrupt Private Peripheral Interrupt (PPI) or Shared Peripheral Interrupt (SPI).

For PPI (interrupts 16 - 32), triggering is set on a per CPU basis. This is done by calling this API when executing on that CPU.

Parameters
int_idThe interrupt identifier. Only PPI and SPI are valid, 16 - 1019.
trigger_typeA parameter value which specifies the type of triggering to configure the given interrupt as.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGThe given interrupt identifier and / or other configuration is invalid.