Skip to content

Commit

Permalink
openamp: xlnx: outputs: Account for FreeRTOS IPI Vector ID
Browse files Browse the repository at this point in the history
Account for AMD-Xilinx FreeRTOS RPU's FreeRTOS difference in IPI
Vector ID Mappings.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
  • Loading branch information
bentheredonethat authored and zeddii committed Dec 23, 2024
1 parent d9c1cfb commit f1bc613
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lopper/assists/openamp_xlnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ def xlnx_openamp_gen_outputs(openamp_channel_info, channel_id, role, verbose = 0
soc_ipi_map[nobuf_ipi_key] = nobuf_ipi

IPI_IRQ_VECT_ID = remote_ipi_irq_vect_id if role == 'remote' else host_ipi_irq_vect_id
IPI_IRQ_VECT_ID_FREERTOS = IPI_IRQ_VECT_ID

if platform in [ SOC_TYPE.VERSAL, SOC_TYPE.VERSAL_NET ]:
IPI_IRQ_VECT_ID_FREERTOS = hex(int(IPI_IRQ_VECT_ID,16) - 32)

POLL_BASE_ADDR = remote_ipi_base if role == 'remote' else host_ipi_base
# flip this as we are kicking other side with the bitmask value
IPI_CHN_BITMASK = host_ipi_bitmask if role == 'remote' else remote_ipi_bitmask
Expand Down Expand Up @@ -811,6 +816,7 @@ def xlnx_openamp_gen_outputs(openamp_channel_info, channel_id, role, verbose = 0
"DEV_BUS_NAME":bus_name,
"IPI_DEV_NAME":ipi_dev_name,
"IPI_IRQ_VECT_ID":IPI_IRQ_VECT_ID,
"IPI_IRQ_VECT_ID_FREERTOS":IPI_IRQ_VECT_ID_FREERTOS,
"IPI_CHN_BITMASK":IPI_CHN_BITMASK,
"RING_TX":tx,
"RING_RX":rx,
Expand Down
4 changes: 4 additions & 0 deletions lopper/assists/openamp_xlnx_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def resolve_host_remote( tree, subnode, verbose = 0 ):
#define _AMD_GENERATED_H_
/* Interrupt vectors */
#ifdef USE_FREERTOS
#define IPI_IRQ_VECT_ID $IPI_IRQ_VECT_ID_FREERTOS
#else
#define IPI_IRQ_VECT_ID $IPI_IRQ_VECT_ID
#endif /* USE_FREERTOS */
#define POLL_BASE_ADDR $POLL_BASE_ADDR
#define IPI_CHN_BITMASK $IPI_CHN_BITMASK
Expand Down

0 comments on commit f1bc613

Please sign in to comment.