diff --git a/ThirdParty/sw_services/xilopenamp/src/config.c b/ThirdParty/sw_services/xilopenamp/src/config.c old mode 100644 new mode 100755 index 204bd7aa..0f28479f --- a/ThirdParty/sw_services/xilopenamp/src/config.c +++ b/ThirdParty/sw_services/xilopenamp/src/config.c @@ -58,13 +58,7 @@ extern unsigned char _binary_firmware2_end; #define FIRMWARE2_START (void *)&_binary_firmware2_start #define FIRMWARE2_END (void *)&_binary_firmware2_end -/* IPI REGs OFFSET */ -#define IPI_TRIG_OFFSET 0x00000000 /* IPI trigger register offset */ -#define IPI_OBS_OFFSET 0x00000004 /* IPI observation register offset */ -#define IPI_ISR_OFFSET 0x00000010 /* IPI interrupt status register offset */ -#define IPI_IMR_OFFSET 0x00000014 /* IPI interrupt mask register offset */ -#define IPI_IER_OFFSET 0x00000018 /* IPI interrupt enable register offset */ -#define IPI_IDR_OFFSET 0x0000001C /* IPI interrupt disable register offset */ + /* Init firmware table */ const struct firmware_info fw_table[] = { { "firmware1", diff --git a/ThirdParty/sw_services/xilopenamp/src/env.h b/ThirdParty/sw_services/xilopenamp/src/env.h old mode 100644 new mode 100755 index caaec46c..92b95cfe --- a/ThirdParty/sw_services/xilopenamp/src/env.h +++ b/ThirdParty/sw_services/xilopenamp/src/env.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2014, Mentor Graphics Corporation * All rights reserved. + * Copyright (c) 2015 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/ThirdParty/sw_services/xilopenamp/src/remote_device.c b/ThirdParty/sw_services/xilopenamp/src/remote_device.c old mode 100644 new mode 100755 index 7f6816d0..3fc28f39 --- a/ThirdParty/sw_services/xilopenamp/src/remote_device.c +++ b/ThirdParty/sw_services/xilopenamp/src/remote_device.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2014, Mentor Graphics Corporation * All rights reserved. + * Copyright (c) 2015 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/ThirdParty/sw_services/xilopenamp/src/remoteproc.c b/ThirdParty/sw_services/xilopenamp/src/remoteproc.c old mode 100644 new mode 100755 index 02a9db8a..c5e4725e --- a/ThirdParty/sw_services/xilopenamp/src/remoteproc.c +++ b/ThirdParty/sw_services/xilopenamp/src/remoteproc.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2014, Mentor Graphics Corporation * All rights reserved. + * Copyright (c) 2015 Xilinx, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c b/ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c old mode 100644 new mode 100755 index 3a72f3c9..d8c38695 --- a/ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c +++ b/ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c @@ -550,44 +550,42 @@ void rpmsg_rx_callback(struct virtqueue *vq) { env_unlock_mutex(rdev->lock); - if (!rp_hdr) { - return; - } + while(rp_hdr) { - /* Get the channel node from the remote device channels list. */ - node = rpmsg_rdev_get_endpoint_from_addr(rdev, rp_hdr->dst); + /* Get the channel node from the remote device channels list. */ + node = rpmsg_rdev_get_endpoint_from_addr(rdev, rp_hdr->dst); - if (!node) - /* Fatal error no endpoint for the given dst addr. */ - return; + if (!node) + /* Fatal error no endpoint for the given dst addr. */ + return; - rp_ept = (struct rpmsg_endpoint *) node->data; + rp_ept = (struct rpmsg_endpoint *) node->data; - rp_chnl = rp_ept->rp_chnl; + rp_chnl = rp_ept->rp_chnl; - if ((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS)) { + if ((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS)) { + /* First message from RPMSG Master, update channel + * destination address and state */ + rp_chnl->dst = rp_hdr->src; + rp_chnl->state = RPMSG_CHNL_STATE_ACTIVE; - /* First message from RPMSG Master, update channel - * destination address and state */ - rp_chnl->dst = rp_hdr->src; - rp_chnl->state = RPMSG_CHNL_STATE_ACTIVE; - - /* Notify channel creation to application */ - if (rdev->channel_created) { - rdev->channel_created(rp_chnl); + /* Notify channel creation to application */ + if (rdev->channel_created) { + rdev->channel_created(rp_chnl); + } + } else { + rp_ept->cb(rp_chnl, rp_hdr->data, rp_hdr->len, rp_ept->priv, + rp_hdr->src); } - } else { - rp_ept->cb(rp_chnl, rp_hdr->data, rp_hdr->len, rp_ept->priv, - rp_hdr->src); + env_lock_mutex(rdev->lock); + + /* Return used buffers. */ + rpmsg_return_buffer(rdev, rp_hdr, len, idx); + + rp_hdr = (struct rpmsg_hdr *) rpmsg_get_rx_buffer(rdev, &len, &idx); + env_unlock_mutex(rdev->lock); } - - env_lock_mutex(rdev->lock); - - /* Return used buffers. */ - rpmsg_return_buffer(rdev, rp_hdr, len, idx); - - env_unlock_mutex(rdev->lock); } /** diff --git a/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c b/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c old mode 100644 new mode 100755 index e6282adf..56ff3436 --- a/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c +++ b/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c @@ -32,7 +32,6 @@ #include #include #include -#include "sleep.h" @@ -107,6 +106,10 @@ int rpmsg_retarget_deinit(struct rpmsg_channel *rp_chnl) { return 0; } +int rpmsg_retarget_send(void *data, int len) { + return send_rpc(data, len); +} + /************************************************************************* * * FUNCTION diff --git a/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h b/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h old mode 100644 new mode 100755 index e055b4c9..0c384dc8 --- a/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h +++ b/ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h @@ -79,3 +79,4 @@ void debug_print(char* str, int len); /* API prototypes */ int rpmsg_retarget_init(struct rpmsg_channel *rp_chnl, rpc_shutdown_cb cb); int rpmsg_retarget_deinit(struct rpmsg_channel *rp_chnl); +int rpmsg_retarget_send(void *data, int len);