From 14a37c7bfe462b56fbec21757dc6f9ecd5cb3181 Mon Sep 17 00:00:00 2001 From: Rajiv Mohan Date: Fri, 2 Aug 2024 00:59:21 -0700 Subject: [PATCH] zynq: Remove support for Zynq-7000 SoC Remove openamp support for Zynq-7000 SoC, following changes are done 1) remove folder apps/machine/zynq7 2) remove folder apps/system/generic/machine/zynq7 3) remove file cmake/platforms/zynq7_generic.cmake 4) remove file cmake/platforms/zynq7_linux.cmake 5) Modify README.md files Reasons to remove: 1) Support for Zynq-7000 has ended 2) Removing redundant or unmaintained code 3) Reduce technical debt carried by OpenAMP team 4) very few customer using openamp on Zynq-7000 SoC For using Zynq-7000 SoC support last working and tested version is (v2023.10) https://github.com/OpenAMP/open-amp/tree/v2023.10 Signed-off-by: Rajiv Mohan --- apps/machine/zynq7/CMakeLists.txt | 6 - apps/machine/zynq7/platform_info.c | 269 ---------------- apps/machine/zynq7/platform_info.h | 59 ---- .../zynq7/platform_info_remoteproc_master.c | 157 ---------- apps/machine/zynq7/rsc_table.c | 69 ----- apps/machine/zynq7/rsc_table.h | 44 --- apps/machine/zynq7/zynq_a9_rproc.c | 167 ---------- .../generic/machine/zynq7/CMakeLists.txt | 16 - apps/system/generic/machine/zynq7/Xilinx.spec | 2 - apps/system/generic/machine/zynq7/helper.c | 100 ------ .../generic/machine/zynq7/linker_master.ld | 228 -------------- .../generic/machine/zynq7/linker_remote.ld | 290 ------------------ cmake/platforms/zynq7_generic.cmake | 6 - cmake/platforms/zynq7_linux.cmake | 4 - doc/apps/echo_test/README.md | 2 +- doc/apps/matrix_multiply/README.md | 2 +- doc/apps/rpc_demo/README.md | 2 +- 17 files changed, 3 insertions(+), 1420 deletions(-) delete mode 100644 apps/machine/zynq7/CMakeLists.txt delete mode 100644 apps/machine/zynq7/platform_info.c delete mode 100644 apps/machine/zynq7/platform_info.h delete mode 100644 apps/machine/zynq7/platform_info_remoteproc_master.c delete mode 100644 apps/machine/zynq7/rsc_table.c delete mode 100644 apps/machine/zynq7/rsc_table.h delete mode 100644 apps/machine/zynq7/zynq_a9_rproc.c delete mode 100644 apps/system/generic/machine/zynq7/CMakeLists.txt delete mode 100644 apps/system/generic/machine/zynq7/Xilinx.spec delete mode 100644 apps/system/generic/machine/zynq7/helper.c delete mode 100644 apps/system/generic/machine/zynq7/linker_master.ld delete mode 100644 apps/system/generic/machine/zynq7/linker_remote.ld delete mode 100644 cmake/platforms/zynq7_generic.cmake delete mode 100644 cmake/platforms/zynq7_linux.cmake diff --git a/apps/machine/zynq7/CMakeLists.txt b/apps/machine/zynq7/CMakeLists.txt deleted file mode 100644 index 7fb18fcc6..000000000 --- a/apps/machine/zynq7/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -collect (APP_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") - -collect (APP_COMMON_SOURCES platform_info.c) -collect (APP_COMMON_SOURCES rsc_table.c) -collect (APP_COMMON_SOURCES zynq_a9_rproc.c) - diff --git a/apps/machine/zynq7/platform_info.c b/apps/machine/zynq7/platform_info.c deleted file mode 100644 index a243d5004..000000000 --- a/apps/machine/zynq7/platform_info.c +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation. All rights reserved. - * Copyright (c) 2017 - 2018 Xilinx, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/************************************************************************** - * FILE NAME - * - * platform_info.c - * - * DESCRIPTION - * - * This file define platform specific data and implements APIs to set - * platform specific information for OpenAMP. - * - **************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include "platform_info.h" -#include "rsc_table.h" -#include -#include - -/* Another APU core ID. In this demo, the other APU core is 0. */ -#define A9_CPU_ID 0UL - -/* scugic device, used to raise soft irq */ -#define SCUGIC_DEV_NAME "scugic_dev" -#define SCUGIC_BUS_NAME "generic" - -/* scugic base address */ -#define SCUGIC_PERIPH_BASE 0xF8F00000 -#define SCUGIC_DIST_BASE (SCUGIC_PERIPH_BASE + 0x00001000) - -#define _rproc_wait() asm volatile("wfi") - -/* processor operations for hil_proc for A9. It defines - * notification operation and remote processor management. */ -extern const struct remoteproc_ops zynq_a9_proc_ops; -static metal_phys_addr_t scugic_phys_addr = SCUGIC_DIST_BASE; -struct metal_device scugic_device = { - .name = SCUGIC_DEV_NAME, - .bus = NULL, - .num_regions = 1, - .regions = { - { - .virt = (void *)SCUGIC_DIST_BASE, - .physmap = &scugic_phys_addr, - .size = 0x1000, - .page_shift = -1UL, - .page_mask = -1UL, - .mem_flags = DEVICE_MEMORY, - .ops = {NULL}, - }, - }, - .node = {NULL}, - .irq_num = 0, - .irq_info = NULL, -}; - -/* Remoteproc private data */ -static struct remoteproc_priv rproc_priv = { - .gic_name = SCUGIC_DEV_NAME, - .gic_bus_name = SCUGIC_BUS_NAME, - .gic_dev = NULL, - .gic_io = NULL, - .irq_to_notify = SGI_TO_NOTIFY, - .irq_notification = SGI_NOTIFICATION, - /* toggle CPU ID, there is only two CPUs in PS */ - .cpu_id = (~XPAR_CPU_ID) & ZYNQ_CPU_ID_MASK, -}; - -/* Remoteproc instance */ -static struct remoteproc rproc_inst; - -/* External functions */ -extern int init_system(void); -extern void cleanup_system(void); - -static struct remoteproc * -platform_create_proc(int proc_index, int rsc_index) -{ - void *rsc_table; - int rsc_size; - int ret; - metal_phys_addr_t pa; - - (void) proc_index; - rsc_table = get_resource_table(rsc_index, &rsc_size); - - /* Register IPI device */ - (void)metal_register_generic_device(&scugic_device); - /* Initialize remoteproc instance */ - if (!remoteproc_init(&rproc_inst, &zynq_a9_proc_ops, &rproc_priv)) - return NULL; - - /* - * Mmap shared memories - * Or shall we constraint that they will be set as carved out - * in the resource table? - */ - /* mmap resource table */ - pa = (metal_phys_addr_t)rsc_table; - (void *)remoteproc_mmap(&rproc_inst, &pa, - NULL, rsc_size, - NORM_NONCACHE | STRONG_ORDERED, - &rproc_inst.rsc_io); - /* mmap shared memory */ - pa = SHARED_MEM_PA; - (void *)remoteproc_mmap(&rproc_inst, &pa, - NULL, SHARED_MEM_SIZE, - NORM_NONCACHE | STRONG_ORDERED, - NULL); - - /* parse resource table to remoteproc */ - ret = remoteproc_set_rsc_table(&rproc_inst, rsc_table, rsc_size); - if (ret) { - xil_printf("Failed to initialize remoteproc\r\n"); - remoteproc_remove(&rproc_inst); - return NULL; - } - xil_printf("Initialize remoteproc successfully.\r\n"); - - return &rproc_inst; -} - -int platform_init(int argc, char *argv[], void **platform) -{ - unsigned long proc_id = 0; - unsigned long rsc_id = 0; - struct remoteproc *rproc; - - if (!platform) { - xil_printf("Failed to initialize platform," - "NULL pointer to store platform data.\r\n"); - return -EINVAL; - } - /* Initialize HW system components */ - init_system(); - - if (argc >= 2) { - proc_id = strtoul(argv[1], NULL, 0); - } - - if (argc >= 3) { - rsc_id = strtoul(argv[2], NULL, 0); - } - - rproc = platform_create_proc(proc_id, rsc_id); - if (!rproc) { - xil_printf("Failed to create remoteproc device.\r\n"); - return -EINVAL; - } - *platform = rproc; - return 0; -} - -/* RPMsg virtio shared buffer pool */ -static struct rpmsg_virtio_shm_pool shpool; - -struct rpmsg_device * -platform_create_rpmsg_vdev(void *platform, unsigned int vdev_index, - unsigned int role, - void (*rst_cb)(struct virtio_device *vdev), - rpmsg_ns_bind_cb ns_bind_cb) -{ - struct remoteproc *rproc = platform; - struct rpmsg_virtio_device *rpmsg_vdev; - struct virtio_device *vdev; - void *shbuf; - struct metal_io_region *shbuf_io; - int ret; - - rpmsg_vdev = metal_allocate_memory(sizeof(*rpmsg_vdev)); - if (!rpmsg_vdev) - return NULL; - shbuf_io = remoteproc_get_io_with_pa(rproc, SHARED_MEM_PA); - if (!shbuf_io) - goto err1; - shbuf = metal_io_phys_to_virt(shbuf_io, - SHARED_MEM_PA + SHARED_BUF_OFFSET); - - xil_printf("creating remoteproc virtio\r\n"); - /* TODO: can we have a wrapper for the following two functions? */ - vdev = remoteproc_create_virtio(rproc, vdev_index, role, rst_cb); - if (!vdev) { - xil_printf("failed remoteproc_create_virtio\r\n"); - goto err1; - } - - xil_printf("initializing rpmsg vdev\r\n"); - if (role == VIRTIO_DEV_DRIVER) { - /* Only RPMsg virtio driver needs to initialize the - * shared buffers pool - */ - rpmsg_virtio_init_shm_pool(&shpool, shbuf, - (SHARED_MEM_SIZE - - SHARED_BUF_OFFSET)); - - /* RPMsg virtio device can set shared buffers pool - * argument to NULL - */ - ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, - shbuf_io, &shpool); - } else { - ret = rpmsg_init_vdev(rpmsg_vdev, vdev, ns_bind_cb, - shbuf_io, NULL); - } - if (ret) { - xil_printf("failed rpmsg_init_vdev\r\n"); - goto err2; - } - xil_printf("initializing rpmsg vdev\r\n"); - return rpmsg_virtio_get_rpmsg_device(rpmsg_vdev); -err2: - remoteproc_remove_virtio(rproc, vdev); -err1: - metal_free_memory(rpmsg_vdev); - return NULL; -} - -int platform_poll(void *priv) -{ - struct remoteproc *rproc = priv; - struct remoteproc_priv *prproc; - unsigned int flags; - - prproc = rproc->priv; - while(1) { - flags = metal_irq_save_disable(); - if (!(atomic_flag_test_and_set(&prproc->nokick))) { - metal_irq_restore_enable(flags); - remoteproc_get_notification(rproc, RSC_NOTIFY_ID_ANY); - break; - } - _rproc_wait(); - metal_irq_restore_enable(flags); - } - return 0; -} - -void platform_release_rpmsg_vdev(struct rpmsg_device *rpdev, void *platform) -{ - struct rpmsg_virtio_device *rpvdev; - struct remoteproc *rproc; - - rpvdev = metal_container_of(rpdev, struct rpmsg_virtio_device, rdev); - rproc = platform; - - rpmsg_deinit_vdev(rpvdev); - remoteproc_remove_virtio(rproc, rpvdev->vdev); -} - -void platform_cleanup(void *platform) -{ - struct remoteproc *rproc = platform; - - if (rproc) - remoteproc_remove(rproc); - cleanup_system(); -} diff --git a/apps/machine/zynq7/platform_info.h b/apps/machine/zynq7/platform_info.h deleted file mode 100644 index f7586a012..000000000 --- a/apps/machine/zynq7/platform_info.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation. All rights reserved. - * Copyright (c) 2017 - 2018 Xilinx, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef PLATFORM_INFO_H_ -#define PLATFORM_INFO_H_ - -#include -#include -#include - -#include "platform_info_common.h" - -#if defined __cplusplus -extern "C" { -#endif - -/* SGIs */ -#define SGI_TO_NOTIFY 15 /* SGI to notify the remote */ -#define SGI_NOTIFICATION 14 /* SGI from the remote */ - -/* Memory attributes */ -#define NORM_NONCACHE 0x11DE2 /* Normal Non-cacheable */ -#define STRONG_ORDERED 0xC02 /* Strongly ordered */ -#define DEVICE_MEMORY 0xC06 /* Device memory */ -#define RESERVED 0x0 /* reserved memory */ - -/* Shared memory */ -#define SHARED_MEM_PA 0x3e800000UL -#define SHARED_MEM_SIZE 0x80000UL -#define SHARED_BUF_OFFSET 0x80000UL - -/* Zynq CPU ID mask */ -#define ZYNQ_CPU_ID_MASK 0x1UL - -/* Remoteproc private data struct */ -struct remoteproc_priv { - const char *gic_name; /* SCUGIC device name */ - const char *gic_bus_name; /* SCUGIC bus name */ - struct metal_device *gic_dev; /* pointer to SCUGIC device */ - struct metal_io_region *gic_io; /* pointer to SCUGIC i/o region */ - unsigned int irq_to_notify; /* SCUGIC IRQ vector to notify the - * other end. - */ - unsigned int irq_notification; /* SCUGIC IRQ vector received from - * other end. - */ - unsigned int cpu_id; /* CPU ID */ - atomic_int nokick; /* 0 for kick from other side */ -}; - -#if defined __cplusplus -} -#endif - -#endif /* PLATFORM_INFO_H_ */ diff --git a/apps/machine/zynq7/platform_info_remoteproc_master.c b/apps/machine/zynq7/platform_info_remoteproc_master.c deleted file mode 100644 index e9d042c26..000000000 --- a/apps/machine/zynq7/platform_info_remoteproc_master.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/************************************************************************** - * FILE NAME - * - * platform_info.c - * - * DESCRIPTION - * - * This file implements APIs to get platform specific - * information for OpenAMP. - * - **************************************************************************/ - -#include -#include -#include - -/* Reference implementation that show cases platform_get_cpu_info and - platform_get_for_firmware API implementation for Bare metal environment */ - -extern struct hil_platform_ops zynq_a9_proc_ops; - -/* IPC Device parameters */ -#define SHM_ADDR (void *)0x08008000 -#define SHM_SIZE 0x00200000 -#define VRING0_IPI_VECT 6 -#define VRING1_IPI_VECT 3 -#define HOST_CPU_ID 0 -#define REMOTE_CPU_ID 1 - -/** - * This array provides definition of CPU nodes for host and remote - * context. It contains two nodes because the same file is intended - * to use with both host and remote configurations. On zynq platform - * only one node definition is required for host/remote as there - * are only two cores present in the platform. - * - * Only platform specific info is populated here. Rest of information - * is obtained during resource table parsing.The platform specific - * information includes; - * - * -CPU ID - * -Shared Memory - * -Interrupts - * -Channel info. - * - * Although the channel info is not platform specific information - * but it is convenient to keep it in HIL so that user can easily - * provide it without modifying the generic part. - * - * It is good idea to define hil_proc structure with platform - * specific fields populated as this can be easily copied to hil_proc - * structure passed as parameter in platform_get_processor_info. The - * other option is to populate the required structures individually - * and copy them one by one to hil_proc structure in platform_get_processor_info - * function. The first option is adopted here. - * - * - * 1) First node in the array is intended for the remote contexts and it - * defines Host CPU ID, shared memory, interrupts info, number of channels - * and there names. This node defines only one channel - * "rpmsg-openamp-demo-channel". - * - * 2)Second node is required by the host and it defines remote CPU ID, - * shared memory and interrupts info. In general no channel info is required by the - * Host node, however in baremetal host and linux remote case the linux - * rpmsg bus driver behaves as host so the rpmsg driver on linux side still needs - * channel info. This information is not required by the hosts for baremetal - * remotes. - * - */ -struct hil_proc proc_table []= -{ - { - /* CPU ID of remote */ - REMOTE_CPU_ID, - - /* Shared memory info - Last field is not used currently */ - { - SHM_ADDR, SHM_SIZE, 0x00 - }, - - /* VirtIO device info */ - { - 0, 0, 0, - { - { - /* Provide vring interrupts info here. Other fields are obtained - * from the rsc table so leave them empty. - */ - NULL, NULL, 0, 0, - { - VRING0_IPI_VECT,0x1006,1 - } - }, - { - NULL, NULL, 0, 0, - { - VRING1_IPI_VECT,0x1006,1 - } - } - } - }, - - /* Number of RPMSG channels */ - 1, - - /* RPMSG channel info - Only channel name is expected currently */ - { - {"rpmsg-openamp-demo-channel"} - }, - - /* HIL platform ops table. */ - &zynq_a9_proc_ops, - - /* Next three fields are for future use only */ - 0, - 0, - NULL - } -}; - -/* Start and end addresses of firmware image for remotes. These are defined in the - * object files that are obtained by converting the remote ELF Image into object - * files. These symbols are not used for remotes. - */ -extern unsigned char _binary_firmware1_start; -extern unsigned char _binary_firmware1_end; - -extern unsigned char _binary_firmware2_start; -extern unsigned char _binary_firmware2_end; - -#define FIRMWARE1_START (void *)&_binary_firmware1_start -#define FIRMWARE1_END (void *)&_binary_firmware1_end - -#define FIRMWARE2_START (void *)&_binary_firmware2_start -#define FIRMWARE2_END (void *)&_binary_firmware2_end - -/* Init firmware table */ - -const struct firmware_info fw_table[] = -{ - {"firmware1", - (unsigned int)FIRMWARE1_START, - (unsigned int)FIRMWARE1_END}, - {"firmware2", - (unsigned int)FIRMWARE2_START, - (unsigned int)FIRMWARE2_END} -}; - -int fw_table_size = sizeof(fw_table)/sizeof(struct firmware_info); diff --git a/apps/machine/zynq7/rsc_table.c b/apps/machine/zynq7/rsc_table.c deleted file mode 100644 index 48ded3a16..000000000 --- a/apps/machine/zynq7/rsc_table.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation - * All rights reserved. - * Copyright (c) 2015-2022 Xilinx, Inc. All rights reserved. - * Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/* - * This file populates resource table for BM remote - * for use by the Linux host - */ - -#include -#include "rsc_table.h" -#include "platform_info.h" - -/* Place resource table in special ELF section */ -/* Redefine __section for section name with token */ -#define __section_t(S) __attribute__((__section__(#S))) -#define __resource __section_t(.resource_table) - -#define RPMSG_VDEV_DFEATURES (1 << VIRTIO_RPMSG_F_NS) - -/* VirtIO rpmsg device id */ -#define VIRTIO_ID_RPMSG_ 7 - -/* Resource table entries */ -#define NUM_VRINGS 0x02 -#define VRING_ALIGN 0x1000 -#define RING_TX FW_RSC_U32_ADDR_ANY -#define RING_RX FW_RSC_U32_ADDR_ANY -#define VRING_SIZE 256 - -#define NUM_TABLE_ENTRIES 1 - - -struct remote_resource_table __resource resources = { - /* Version */ - 1, - - /* NUmber of table entries */ - NUM_TABLE_ENTRIES, - /* reserved fields */ - {0, 0,}, - - /* Offsets of rsc entries */ - { - offsetof(struct remote_resource_table, rpmsg_vdev), - }, - - /* Virtio device entry */ - { - RSC_VDEV, VIRTIO_ID_RPMSG_, 31, RPMSG_VDEV_DFEATURES, 0, 0, 0, - NUM_VRINGS, {0, 0}, - }, - - /* Vring rsc entry - part of vdev rsc entry */ - {RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0}, - {RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0}, -}; - -void *get_resource_table (int rsc_id, int *len) -{ - (void) rsc_id; - *len = sizeof(resources); - return &resources; -} diff --git a/apps/machine/zynq7/rsc_table.h b/apps/machine/zynq7/rsc_table.h deleted file mode 100644 index a428024c6..000000000 --- a/apps/machine/zynq7/rsc_table.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation - * All rights reserved. - * Copyright (c) 2015 Xilinx, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/* - * This file populates resource table for BM remote - * for use by the Linux host - */ - -#ifndef RSC_TABLE_H_ -#define RSC_TABLE_H_ - -#include -#include - -#if defined __cplusplus -extern "C" { -#endif - -#define NO_RESOURCE_ENTRIES 8 - -/* Resource table for the given remote */ -struct remote_resource_table { - unsigned int version; - unsigned int num; - unsigned int reserved[2]; - unsigned int offset[NO_RESOURCE_ENTRIES]; - /* rpmsg vdev entry */ - struct fw_rsc_vdev rpmsg_vdev; - struct fw_rsc_vdev_vring rpmsg_vring0; - struct fw_rsc_vdev_vring rpmsg_vring1; -}__attribute__((packed, aligned(0x100000))); - -void *get_resource_table (int rsc_id, int *len); - -#if defined __cplusplus -} -#endif - -#endif /* RSC_TABLE_H_ */ diff --git a/apps/machine/zynq7/zynq_a9_rproc.c b/apps/machine/zynq7/zynq_a9_rproc.c deleted file mode 100644 index 92a89f2ed..000000000 --- a/apps/machine/zynq7/zynq_a9_rproc.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2018 Xilinx, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/************************************************************************** - * FILE NAME - * - * zynq_a9_rproc.c - * - * DESCRIPTION - * - * This file define Xilinx Zynq A9 platform specific remoteproc - * implementation. - * - **************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/* SCUGIC macros */ -#define GIC_DIST_SOFTINT 0xF00 -#define GIC_SFI_TRIG_CPU_MASK 0x00FF0000 -#define GIC_SFI_TRIG_SATT_MASK 0x00008000 -#define GIC_SFI_TRIG_INTID_MASK 0x0000000F -#define GIC_CPU_ID_BASE (1 << 4) - -static int zynq_a9_proc_irq_handler(int vect_id, void *data) -{ - struct remoteproc *rproc = data; - struct remoteproc_priv *prproc; - - (void)vect_id; - if (!rproc) - return METAL_IRQ_NOT_HANDLED; - prproc = rproc->priv; - atomic_flag_clear(&prproc->nokick); - return METAL_IRQ_HANDLED; -} - -static struct remoteproc * -zynq_a9_proc_init(struct remoteproc *rproc, - const struct remoteproc_ops *ops, void *arg) -{ - struct remoteproc_priv *prproc = arg; - struct metal_device *dev; - unsigned int irq_vect; - int ret; - - (void)ops; - if (!rproc || !prproc) - return NULL; - ret = metal_device_open(prproc->gic_bus_name, prproc->gic_name, - &dev); - if (ret) { - xil_printf("failed to open GIC device: %d.\r\n", ret); - return NULL; - } - prproc->gic_dev = dev; - prproc->gic_io = metal_device_io_region(dev, 0); - if (!prproc->gic_io) - goto err1; - atomic_flag_test_and_set(&prproc->nokick); - - /* Register interrupt handler and enable interrupt */ - irq_vect = prproc->irq_notification; - metal_irq_register(irq_vect, zynq_a9_proc_irq_handler, rproc); - metal_irq_enable(irq_vect); - xil_printf("Successfully initialize remoteproc.\r\n"); - return rproc; -err1: - metal_device_close(dev); - return NULL; -} - -static void zynq_a9_proc_remove(struct remoteproc *rproc) -{ - struct remoteproc_priv *prproc; - struct metal_device *dev; - - if (!rproc) - return; - prproc = rproc->priv; - metal_irq_disable(prproc->irq_to_notify); - metal_irq_unregister(prproc->irq_to_notify); - dev = prproc->gic_dev; - if (dev) - metal_device_close(dev); -} - -static void * -zynq_a9_proc_mmap(struct remoteproc *rproc, metal_phys_addr_t *pa, - metal_phys_addr_t *da, size_t size, - unsigned int attribute, struct metal_io_region **io) -{ - struct remoteproc_mem *mem; - metal_phys_addr_t lpa, lda; - struct metal_io_region *tmpio; - - lpa = *pa; - lda = *da; - - if (lpa == METAL_BAD_PHYS && lda == METAL_BAD_PHYS) - return NULL; - if (lpa == METAL_BAD_PHYS) - lpa = lda; - if (lda == METAL_BAD_PHYS) - lda = lpa; - - if (!attribute) - attribute = NORM_NONCACHE | STRONG_ORDERED; - mem = metal_allocate_memory(sizeof(*mem)); - if (!mem) - return NULL; - tmpio = metal_allocate_memory(sizeof(*tmpio)); - if (!tmpio) { - metal_free_memory(mem); - return NULL; - } - remoteproc_init_mem(mem, NULL, lpa, lda, size, tmpio); - /* va is the same as pa in this platform */ - metal_io_init(tmpio, (void *)lpa, &mem->pa, size, - sizeof(metal_phys_addr_t)<<3, attribute, NULL); - remoteproc_add_mem(rproc, mem); - *pa = lpa; - *da = lda; - if (io) - *io = tmpio; - return metal_io_phys_to_virt(tmpio, mem->pa); -} - -static int zynq_a9_proc_notify(struct remoteproc *rproc, uint32_t id) -{ - struct remoteproc_priv *prproc; - unsigned long mask = 0; - - (void)id; - if (!rproc) - return -1; - prproc = rproc->priv; - if (!prproc->gic_io) - return -1; - - mask = ((1 << (GIC_CPU_ID_BASE + prproc->cpu_id)) | - (prproc->irq_to_notify)) - & (GIC_SFI_TRIG_CPU_MASK | GIC_SFI_TRIG_INTID_MASK); - /* Trigger IPI */ - metal_io_write32(prproc->gic_io, GIC_DIST_SOFTINT, mask); - return 0; -} - -/* processor operations from r5 to a53. It defines - * notification operation and remote processor managementi operations. */ -const struct remoteproc_ops zynq_a9_proc_ops = { - .init = zynq_a9_proc_init, - .remove = zynq_a9_proc_remove, - .mmap = zynq_a9_proc_mmap, - .notify = zynq_a9_proc_notify, - .start = NULL, - .stop = NULL, - .shutdown = NULL, -}; diff --git a/apps/system/generic/machine/zynq7/CMakeLists.txt b/apps/system/generic/machine/zynq7/CMakeLists.txt deleted file mode 100644 index 094fbe7b2..000000000 --- a/apps/system/generic/machine/zynq7/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -collect (APP_COMMON_SOURCES helper.c) - -set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_remote.ld") - -set_property (GLOBAL PROPERTY APP_LINKER_OPT "-Wl,-build-id=none -specs=${CMAKE_CURRENT_SOURCE_DIR}/Xilinx.spec -T\"${_linker_script}\"") - -find_path(XIL_INCLUDE_DIR NAMES xparameters.h PATHS ${CMAKE_FIND_ROOT_PATH}) -collect (PROJECT_INC_DIRS "${XIL_INCLUDE_DIR}") - -find_library(LIBXIL_LIB NAMES xil PATHS ${CMAKE_FIND_ROOT_PATH}) -get_filename_component(LIBXIL_LIB_DIR ${LIBXIL_LIB} DIRECTORY) -collect(PROJECT_LIB_DIRS ${LIBXIL_LIB_DIR}) - -collect(PROJECT_LIB_DEPS xil) -collect(PROJECT_LIB_DEPS c) -collect(PROJECT_LIB_DEPS m) diff --git a/apps/system/generic/machine/zynq7/Xilinx.spec b/apps/system/generic/machine/zynq7/Xilinx.spec deleted file mode 100644 index 8eea37748..000000000 --- a/apps/system/generic/machine/zynq7/Xilinx.spec +++ /dev/null @@ -1,2 +0,0 @@ -*startfile: -crti%O%s crtbegin%O%s diff --git a/apps/system/generic/machine/zynq7/helper.c b/apps/system/generic/machine/zynq7/helper.c deleted file mode 100644 index f3c427439..000000000 --- a/apps/system/generic/machine/zynq7/helper.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2014, Mentor Graphics Corporation - * All rights reserved. - * - * Copyright (c) 2015 Xilinx, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "xparameters.h" -#include "xil_exception.h" -#include "xil_printf.h" -#include "xscugic.h" -#include "xil_cache.h" -#include -#include -#include "platform_info.h" - - -#define INTC_DEVICE_ID XPAR_SCUGIC_0_DEVICE_ID - -static XScuGic xInterruptController; - -/* Interrupt Controller setup */ -static int app_gic_initialize(void) -{ - u32 Status; - XScuGic_Config *IntcConfig; /* The configuration parameters of the interrupt controller */ - - Xil_ExceptionDisable(); - - /* - * Initialize the interrupt controller driver - */ - IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID); - if (NULL == IntcConfig) { - return XST_FAILURE; - } - - Status = XScuGic_CfgInitialize(&xInterruptController, IntcConfig, - IntcConfig->CpuBaseAddress); - if (Status != XST_SUCCESS) { - return XST_FAILURE; - } - - /* - * Register the interrupt handler to the hardware interrupt handling - * logic in the ARM processor. - */ - Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_IRQ_INT, - (Xil_ExceptionHandler)XScuGic_InterruptHandler, - &xInterruptController); - - /* Disable the interrupt before enabling exception to avoid interrupts - * received before exception is enabled. - */ - XScuGic_Disable(&xInterruptController, SGI_NOTIFICATION); - - Xil_ExceptionEnable(); - - /* Connect notificaiton interrupt ID with ISR */ - XScuGic_Connect(&xInterruptController, SGI_NOTIFICATION, - (Xil_ExceptionHandler)metal_xlnx_irq_isr, - (void *)SGI_NOTIFICATION); - - return 0; -} - -/* Main hw machinery initialization entry point, called from main()*/ -/* return 0 on success */ -int init_system(void) -{ - int ret; - struct metal_init_params metal_param = METAL_INIT_DEFAULTS; - - /* Low level abstraction layer for openamp initialization */ - metal_init(&metal_param); - - /* configure the global interrupt controller */ - app_gic_initialize(); - - /* Initialize metal Xilinx IRQ controller */ - ret = metal_xlnx_irq_init(); - if (ret) { - xil_printf("%s: Xilinx metal IRQ controller init failed.\r\n", - __func__); - } - - return ret; -} - -void cleanup_system() -{ - metal_finish(); - - Xil_DCacheDisable(); - Xil_ICacheDisable(); - Xil_DCacheInvalidate(); - Xil_ICacheInvalidate(); -} diff --git a/apps/system/generic/machine/zynq7/linker_master.ld b/apps/system/generic/machine/zynq7/linker_master.ld deleted file mode 100644 index a571ef159..000000000 --- a/apps/system/generic/machine/zynq7/linker_master.ld +++ /dev/null @@ -1,228 +0,0 @@ -/* Linker script for Xilinx Zynq-7000 - * - * Version: Sourcery CodeBench Lite 2013.11-24 - * Support: https://sourcery.mentor.com/GNUToolchain/ - * - * Copyright (c) 2007-2010 CodeSourcery, Inc. - * Copyright (c) 2010-2013 Mentor Graphics, Inc. - * - * The authors hereby grant permission to use, copy, modify, distribute, - * and license this software and its documentation for any purpose, provided - * that existing copyright notices are retained in all copies and that this - * notice is included verbatim in any distributions. No written agreement, - * license, or royalty fee is required for any of the authorized uses. - * Modifications to this software may be copyrighted by their authors - * and need not follow the licensing terms described here, provided that - * the new terms are clearly indicated on the first page of each file where - * they apply. - */ -OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") -ENTRY(__cs3_reset) -SEARCH_DIR(.) -GROUP(-lgcc -lc -lcs3 -lcs3unhosted -lcs3arm) - -MEMORY -{ - ram (rwx) : ORIGIN = 0x10000000, LENGTH = 256M - rom (rx) : ORIGIN = 0xe4000000, LENGTH = 64M -} - -/* These force the linker to search for particular symbols from - * the start of the link process and thus ensure the user's - * overrides are picked up - */ -EXTERN(__cs3_reset __cs3_reset_zynq7000_ram) -EXTERN(__cs3_start_asm _start) -/* Bring in the interrupt routines & vector */ -INCLUDE arm-names.inc -EXTERN(__cs3_interrupt_vector_arm) -EXTERN(__cs3_start_c main __cs3_stack __cs3_heap_end) - -/* Provide fall-back values */ -PROVIDE(__cs3_heap_start = _end); -PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram); -PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20); -PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram); - -SECTIONS -{ - .text : - { - CREATE_OBJECT_SYMBOLS - __cs3_region_start_ram = .; - _ftext = .; - *(.cs3.region-head.ram) - ASSERT (. == __cs3_region_start_ram, ".cs3.region-head.ram not permitted"); - __cs3_interrupt_vector = __cs3_interrupt_vector_arm; - *(.cs3.interrupt_vector) - /* Make sure we pulled in an interrupt vector. */ - ASSERT (. != __cs3_interrupt_vector_arm, "No interrupt vector"); - - PROVIDE(__cs3_reset = __cs3_reset_zynq7000_ram); - *(.cs3.reset) - _start = DEFINED(__cs3_start_asm) ? __cs3_start_asm : _start; - - *(.text.cs3.init) - *(.text .text.* .gnu.linkonce.t.*) - *(.plt) - *(.gnu.warning) - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) - - *(.ARM.extab* .gnu.linkonce.armextab.*) - *(.gcc_except_table) - } >ram - .eh_frame_hdr : ALIGN (4) - { - KEEP (*(.eh_frame_hdr)) - *(.eh_frame_entry .eh_frame_entry.*) - } >ram - .eh_frame : ALIGN (4) - { - KEEP (*(.eh_frame)) *(.eh_frame.*) - } >ram - /* .ARM.exidx is sorted, so has to go in its own output section. */ - PROVIDE_HIDDEN (__exidx_start = .); - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } >ram - PROVIDE_HIDDEN (__exidx_end = .); - .rodata : ALIGN (4) - { - *(.rodata .rodata.* .gnu.linkonce.r.*) - - . = ALIGN(4); - KEEP(*(.init)) - - . = ALIGN(4); - __preinit_array_start = .; - KEEP (*(.preinit_array)) - __preinit_array_end = .; - - . = ALIGN(4); - __init_array_start = .; - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array)) - __init_array_end = .; - - . = ALIGN(4); - KEEP(*(.fini)) - - . = ALIGN(4); - __fini_array_start = .; - KEEP (*(.fini_array)) - KEEP (*(SORT(.fini_array.*))) - __fini_array_end = .; - - . = ALIGN(0x4); - KEEP (*crtbegin.o(.ctors)) - KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*crtend.o(.ctors)) - - . = ALIGN(0x4); - KEEP (*crtbegin.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*crtend.o(.dtors)) - - . = ALIGN(4); - __cs3_regions = .; - LONG (0) - LONG (__cs3_region_init_ram) - LONG (__cs3_region_start_ram) - LONG (__cs3_region_init_size_ram) - LONG (__cs3_region_zero_size_ram) - __cs3_regions_end = .; - . = ALIGN (8); - _etext = .; - } >ram - - ASSERT (!(__cs3_region_init_ram & 7), "__cs3_region_init_ram not aligned") - ASSERT (!(__cs3_region_start_ram & 7), "__cs3_region_start_ram not aligned") - ASSERT (!(__cs3_region_init_size_ram & 7), "__cs3_region_init_size_ram not aligned") - ASSERT (!(__cs3_region_zero_size_ram & 7), "__cs3_region_zero_size_ram not aligned") - .cs3.rom : ALIGN (8) - { - __cs3_region_start_rom = .; - *(.cs3.region-head.rom) - *(.rom) - . = ALIGN (8); - } >rom - .cs3.rom.bss : - { - *(.rom.b .bss.rom) - . = ALIGN (8); - } >rom - /* __cs3_region_end_rom is deprecated */ - __cs3_region_end_rom = __cs3_region_start_rom + LENGTH(rom); - __cs3_region_size_rom = LENGTH(rom); - __cs3_region_init_rom = LOADADDR (.cs3.rom); - __cs3_region_init_size_rom = LOADADDR (.cs3.rom.bss) - LOADADDR (.cs3.rom); - __cs3_region_zero_size_rom = SIZEOF(.cs3.rom.bss); - - .data : ALIGN (8) - { - KEEP(*(.jcr)) - *(.got.plt) *(.got) - *(.shdata) - *(.data .data.* .gnu.linkonce.d.*) - . = ALIGN (8); - *(.ram) - . = ALIGN (8); - _edata = .; - } >ram - .bss : ALIGN (8) - { - *(.shbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - . = ALIGN (8); - *(.ram.b .bss.ram) - . = ALIGN (8); - _end = .; - __end = .; - } >ram - /* __cs3_region_end_ram is deprecated */ - __cs3_region_end_ram = __cs3_region_start_ram + LENGTH(ram); - __cs3_region_size_ram = LENGTH(ram); - __cs3_region_init_ram = LOADADDR (.text); - __cs3_region_init_size_ram = _edata - ADDR (.text); - __cs3_region_zero_size_ram = _end - _edata; - - .stab 0 (NOLOAD) : { *(.stab) } - .stabstr 0 (NOLOAD) : { *(.stabstr) } - /* DWARF debug sections. - * Symbols in the DWARF debugging sections are relative to - * the beginning of the section so we begin them at 0. - */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* DWARF 2.1 */ - .debug_ranges 0 : { *(.debug_ranges) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - - .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) } -} -/* checksum: b15b0bf76673e544380111 */ diff --git a/apps/system/generic/machine/zynq7/linker_remote.ld b/apps/system/generic/machine/zynq7/linker_remote.ld deleted file mode 100644 index 3f1996f63..000000000 --- a/apps/system/generic/machine/zynq7/linker_remote.ld +++ /dev/null @@ -1,290 +0,0 @@ -/*******************************************************************/ -/* */ -/* This file is automatically generated by linker script generator.*/ -/* */ -/* Version: */ -/* */ -/* Copyright (c) 2010 Xilinx, Inc. All rights reserved. */ -/* */ -/* Description : Cortex-A9 Linker Script */ -/* */ -/*******************************************************************/ - -_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x2000; -_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x4000; - -_ABORT_STACK_SIZE = DEFINED(_ABORT_STACK_SIZE) ? _ABORT_STACK_SIZE : 1024; -_SUPERVISOR_STACK_SIZE = DEFINED(_SUPERVISOR_STACK_SIZE) ? _SUPERVISOR_STACK_SIZE : 2048; -_IRQ_STACK_SIZE = DEFINED(_IRQ_STACK_SIZE) ? _IRQ_STACK_SIZE : 4096; -_FIQ_STACK_SIZE = DEFINED(_FIQ_STACK_SIZE) ? _FIQ_STACK_SIZE : 1024; -_UNDEF_STACK_SIZE = DEFINED(_UNDEF_STACK_SIZE) ? _UNDEF_STACK_SIZE : 1024; - -/* Define Memories in the system */ - -MEMORY -{ - ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x3e000000, LENGTH = 0x00400000 - ps7_ram_0_S_AXI_BASEADDR : ORIGIN = 0x00000000, LENGTH = 0x00030000 - ps7_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0000, LENGTH = 0x0000FE00 -} - -/* Specify the default entry point to the program */ - -ENTRY(_vector_table) - -/* Define the sections, and where they are mapped in memory */ - -SECTIONS -{ -.text : { - -_binary_firmware1_start = 0; -_binary_firmware1_end = 0; -_binary_firmware2_start = 0; -_binary_firmware2_end = 0; - - *(.vectors) - *(.boot) - *(.text) - *(.text.*) - *(.gnu.linkonce.t.*) - *(.plt) - *(.gnu_warning) - *(.gcc_execpt_table) - *(.glue_7) - *(.glue_7t) - *(.vfp11_veneer) - *(.ARM.extab) - *(.gnu.linkonce.armextab.*) -} > ps7_ddr_0_S_AXI_BASEADDR - -.init : { - KEEP (*(.init)) -} > ps7_ddr_0_S_AXI_BASEADDR - -.fini : { - KEEP (*(.fini)) -} > ps7_ddr_0_S_AXI_BASEADDR - -.rodata : { - __rodata_start = .; - *(.rodata) - *(.rodata.*) - *(.gnu.linkonce.r.*) - __rodata_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.rodata1 : { - __rodata1_start = .; - *(.rodata1) - *(.rodata1.*) - __rodata1_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.sdata2 : { - __sdata2_start = .; - *(.sdata2) - *(.sdata2.*) - *(.gnu.linkonce.s2.*) - __sdata2_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.sbss2 : { - __sbss2_start = .; - *(.sbss2) - *(.sbss2.*) - *(.gnu.linkonce.sb2.*) - __sbss2_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.data : { - __data_start = .; - *(.data) - *(.data.*) - *(.gnu.linkonce.d.*) - *(.jcr) - *(.got) - *(.got.plt) - __data_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.data1 : { - __data1_start = .; - *(.data1) - *(.data1.*) - __data1_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.got : { - *(.got) -} > ps7_ddr_0_S_AXI_BASEADDR - -.ctors : { - __CTOR_LIST__ = .; - ___CTORS_LIST___ = .; - KEEP (*crtbegin.o(.ctors)) - KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - __CTOR_END__ = .; - ___CTORS_END___ = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.dtors : { - __DTOR_LIST__ = .; - ___DTORS_LIST___ = .; - KEEP (*crtbegin.o(.dtors)) - KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - __DTOR_END__ = .; - ___DTORS_END___ = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.fixup : { - __fixup_start = .; - *(.fixup) - __fixup_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.eh_frame : { - *(.eh_frame) -} > ps7_ddr_0_S_AXI_BASEADDR - -.eh_framehdr : { - __eh_framehdr_start = .; - *(.eh_framehdr) - __eh_framehdr_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.gcc_except_table : { - *(.gcc_except_table) -} > ps7_ddr_0_S_AXI_BASEADDR - -.mmu_tbl (ALIGN(16384)) : { - __mmu_tbl_start = .; - *(.mmu_tbl) - __mmu_tbl_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.ARM.exidx : { - __exidx_start = .; - *(.ARM.exidx*) - *(.gnu.linkonce.armexidix.*.*) - __exidx_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.preinit_array : { - __preinit_array_start = .; - KEEP (*(SORT(.preinit_array.*))) - KEEP (*(.preinit_array)) - __preinit_array_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.init_array : { - __init_array_start = .; - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array)) - __init_array_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.fini_array : { - __fini_array_start = .; - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array)) - __fini_array_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.ARM.attributes : { - __ARM.attributes_start = .; - *(.ARM.attributes) - __ARM.attributes_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.sdata : { - __sdata_start = .; - *(.sdata) - *(.sdata.*) - *(.gnu.linkonce.s.*) - __sdata_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.sbss (NOLOAD) : { - __sbss_start = .; - *(.sbss) - *(.sbss.*) - *(.gnu.linkonce.sb.*) - __sbss_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.tdata : { - __tdata_start = .; - *(.tdata) - *(.tdata.*) - *(.gnu.linkonce.td.*) - __tdata_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.tbss : { - __tbss_start = .; - *(.tbss) - *(.tbss.*) - *(.gnu.linkonce.tb.*) - __tbss_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.bss (NOLOAD) : { - __bss_start = .; - *(.bss) - *(.bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - __bss_end = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 ); - -_SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 ); - -/* Generate Stack and Heap definitions */ - -.heap (NOLOAD) : { - . = ALIGN(16); - _heap = .; - HeapBase = .; - _heap_start = .; - . += _HEAP_SIZE; - _heap_end = .; - HeapLimit = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -.stack (NOLOAD) : { - . = ALIGN(16); - _stack_end = .; - . += _STACK_SIZE; - _stack = .; - __stack = _stack; - . = ALIGN(16); - _irq_stack_end = .; - . += _IRQ_STACK_SIZE; - __irq_stack = .; - _supervisor_stack_end = .; - . += _SUPERVISOR_STACK_SIZE; - . = ALIGN(16); - __supervisor_stack = .; - _abort_stack_end = .; - . += _ABORT_STACK_SIZE; - . = ALIGN(16); - __abort_stack = .; - _fiq_stack_end = .; - . += _FIQ_STACK_SIZE; - . = ALIGN(16); - __fiq_stack = .; - _undef_stack_end = .; - . += _UNDEF_STACK_SIZE; - . = ALIGN(16); - __undef_stack = .; -} > ps7_ddr_0_S_AXI_BASEADDR - -_end = .; -} diff --git a/cmake/platforms/zynq7_generic.cmake b/cmake/platforms/zynq7_generic.cmake deleted file mode 100644 index e526704cb..000000000 --- a/cmake/platforms/zynq7_generic.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set (CMAKE_SYSTEM_PROCESSOR "arm" CACHE STRING "") -set (MACHINE "zynq7" CACHE STRING "") -set (CROSS_PREFIX "arm-none-eabi-" CACHE STRING "") -set (CMAKE_C_FLAGS "-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard" CACHE STRING "") - -include (cross_generic_gcc) diff --git a/cmake/platforms/zynq7_linux.cmake b/cmake/platforms/zynq7_linux.cmake deleted file mode 100644 index 5986b56a6..000000000 --- a/cmake/platforms/zynq7_linux.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set (CMAKE_SYSTEM_PROCESSOR "arm") -set (CROSS_PREFIX "arm-xilinx-linux-gnueabi-") - -include (cross-linux-gcc) diff --git a/doc/apps/echo_test/README.md b/doc/apps/echo_test/README.md index 1ae5e4b08..26268c1e8 100644 --- a/doc/apps/echo_test/README.md +++ b/doc/apps/echo_test/README.md @@ -14,7 +14,7 @@ By default this option is `ON` when `WITH_APPS` is on. Here is an example: ``` -$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynq7_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON +$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynqmp_r5_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON ``` ### Linux Compilation diff --git a/doc/apps/matrix_multiply/README.md b/doc/apps/matrix_multiply/README.md index e1e44c047..85448a140 100644 --- a/doc/apps/matrix_multiply/README.md +++ b/doc/apps/matrix_multiply/README.md @@ -14,7 +14,7 @@ By default this option is `ON` when `WITH_APPS` is on. Here is an example: ``` -$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynq7_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON +$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynqmp_r5_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON ``` ### Linux Compilation diff --git a/doc/apps/rpc_demo/README.md b/doc/apps/rpc_demo/README.md index 54cf77938..6a6ffa992 100644 --- a/doc/apps/rpc_demo/README.md +++ b/doc/apps/rpc_demo/README.md @@ -14,7 +14,7 @@ By default this option is `ON` when `WITH_APPS` is on. Here is an example: ``` -$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynq7_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON +$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynqmp_r5_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON ``` ### Linux Compilation