From e659f4e06970dcfa03b55a9878333683c4d5c2b4 Mon Sep 17 00:00:00 2001 From: "huanfeng.wang" Date: Mon, 11 Sep 2023 19:16:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0log=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/common/platform/src/spu_log.s.c | 4 +- public/common/utility/inc/ucp_printf.h | 146 ++++++++++----------- public/make/ld/ape0-Cache128-noMPUC.ld | 167 ++++++++++++++++++++++++ public/make/ld/ape1-Cache128-noMPUC.ld | 166 +++++++++++++++++++++++ public/make/ld/ape2-Cache128-noMPUC.ld | 166 +++++++++++++++++++++++ public/make/ld/ape3-Cache128-noMPUC.ld | 166 +++++++++++++++++++++++ public/make/ld/ape4-Cache128-noMPUC.ld | 167 ++++++++++++++++++++++++ public/make/ld/ape5-Cache128-noMPUC.ld | 166 +++++++++++++++++++++++ public/make/ld/ape6-Cache128-noMPUC.ld | 167 ++++++++++++++++++++++++ public/make/ld/ape7-Cache128-noMPUC.ld | 166 +++++++++++++++++++++++ public/make/ld/ecs-rfm-spu0-noCache.ld | 107 +++++++++++++++ public/make/ld/ecs-rfm-spu1-Cache128.ld | 115 ++++++++++++++++ public/make/ld/pet-rfm-spu0-noCache.ld | 107 +++++++++++++++ public/make/ld/pet-rfm-spu1-noCache.ld | 111 ++++++++++++++++ public/make/makefile.ape_spu | 6 +- public/make/makefile.ecs_rfm_spu0 | 2 +- public/make/makefile.ecs_rfm_spu1 | 2 +- public/make/makefile.pet_rfm_spu0 | 2 +- public/make/makefile.pet_rfm_spu1 | 2 +- 19 files changed, 1855 insertions(+), 80 deletions(-) create mode 100644 public/make/ld/ape0-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape1-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape2-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape3-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape4-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape5-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape6-Cache128-noMPUC.ld create mode 100644 public/make/ld/ape7-Cache128-noMPUC.ld create mode 100644 public/make/ld/ecs-rfm-spu0-noCache.ld create mode 100644 public/make/ld/ecs-rfm-spu1-Cache128.ld create mode 100644 public/make/ld/pet-rfm-spu0-noCache.ld create mode 100644 public/make/ld/pet-rfm-spu1-noCache.ld diff --git a/public/common/platform/src/spu_log.s.c b/public/common/platform/src/spu_log.s.c index fb7df96..8816fa0 100644 --- a/public/common/platform/src/spu_log.s.c +++ b/public/common/platform/src/spu_log.s.c @@ -13,6 +13,7 @@ #include "spu_shell.h" #define SPU_LOG_INNER_MAX_SIZE (64) +#define __LOG __attribute__((section(".LOG"))) /**************************************************/ /* 对内接口 */ @@ -81,7 +82,7 @@ void spu_log_output(uint8_t level, const char *fmt, ...) int32_t i32ret = 0; uint32_t u32str_len = 0; va_list st_va_list; - int8_t i8str[SPU_LOG_INNER_MAX_SIZE*2] = {0}; + __LOG static int8_t i8str[SPU_LOG_INNER_MAX_SIZE*2] = {0}; uint8_t u8offset = SPU_SW_MSG_INFO_SIZE; spu_sw_msg_info_t stsw_msg_info; @@ -131,6 +132,7 @@ void spu_log_output(uint8_t level, const char *fmt, ...) pu8_addr = spu_log_client_mem_alloc(&u16_index); memcpy_ucp((pu8_addr+u8offset), i8str, u32str_len); + __ucps2_synch(0); stsw_msg_info.u8Head[0] = SPU_SW_MSG_INFO_HEAD1; stsw_msg_info.u8Head[1] = SPU_SW_MSG_INFO_HEAD2; diff --git a/public/common/utility/inc/ucp_printf.h b/public/common/utility/inc/ucp_printf.h index a86062a..fa82c76 100644 --- a/public/common/utility/inc/ucp_printf.h +++ b/public/common/utility/inc/ucp_printf.h @@ -1,73 +1,73 @@ -// +FHDR------------------------------------------------------------ -// Copyright (c) 2022 SmartLogic. -// ALL RIGHTS RESERVED -// ----------------------------------------------------------------- -// Filename : ucp_printf.h -// Author : xianfeng.du -// Created On : 2022-06-25 -// Last Modified : -// ----------------------------------------------------------------- -// Description: -// -// -// -FHDR------------------------------------------------------------ - - -#ifndef __UCP_PRINTF_H__ -#define __UCP_PRINTF_H__ - -#include -#include "spu_log.h" - -#define PRINT_OFF 0x00000000 // close all PRINT -#define PRINT_ERROR 0x00000001 -#define PRINT_WARN 0x00000002 -#define PRINT_LOG 0x00000004 -#define PRINT_DEBUG 0x00000008 -#define PRINT_TICK 0x00000010 - -#define UCP_PRINT_LEVEL (PRINT_OFF) -//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_WARN |PRINT_LOG | PRINT_DEBUG | PRINT_TICK) -//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_DEBUG) -//#define UCP_PRINT_LEVEL (PRINT_ERROR) - - -#if (UCP_PRINT_LEVEL & PRINT_ERROR) -//#define UCP_PRINT_ERROR(fmt, args...) printf(__FILE__ ": [ERROR]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) -#define UCP_PRINT_ERROR(fmt, args...) spu_log_output(LOG_ERROR, "[ERROR]:" fmt "\n", ##args) -#else -#define UCP_PRINT_ERROR(fmt, args...) -#endif - -#if (UCP_PRINT_LEVEL & PRINT_WARN) -//#define UCP_PRINT_WARN(fmt, args...) printf(__FILE__ ": [WARN]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) -#define UCP_PRINT_WARN(fmt, args...) spu_log_output(LOG_WARN, "[WARN]:" fmt "\n", ##args) -#else -#define UCP_PRINT_WARN(fmt, args...) -#endif - -#if (UCP_PRINT_LEVEL & PRINT_LOG) -//#define UCP_PRINT_LOG(fmt, args...) printf(__FILE__ ": [LOG]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) -#define UCP_PRINT_LOG(fmt, args...) spu_log_output(LOG_INFO, "[LOG]:" fmt "\n", ##args) -#else -#define UCP_PRINT_LOG(fmt, args...) -#endif - -#if (UCP_PRINT_LEVEL & PRINT_DEBUG) -//#define UCP_PRINT_LOG(fmt, args...) printf(__FILE__ ": [LOG]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) -#define UCP_PRINT_DEBUG(fmt, args...) spu_log_output(LOG_DEBUG, "[DEBUG]:" fmt "\n", ##args) -#else -#define UCP_PRINT_DEBUG(fmt, args...) -#endif - -#if (UCP_PRINT_LEVEL & PRINT_TICK) -//#define UCP_PRINT_TICK(fmt, args...) printf(__FILE__ ": [TICK]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) -#define UCP_PRINT_TICK(fmt, args...) spu_log_output(LOG_TICK, "[TICK]:" fmt "\n", ##args) -#else -#define UCP_PRINT_TICK(fmt, args...) -#endif - -#define UCP_PRINT_EMPTY(fmt, args...) - -#endif - +// +FHDR------------------------------------------------------------ +// Copyright (c) 2022 SmartLogic. +// ALL RIGHTS RESERVED +// ----------------------------------------------------------------- +// Filename : ucp_printf.h +// Author : xianfeng.du +// Created On : 2022-06-25 +// Last Modified : +// ----------------------------------------------------------------- +// Description: +// +// +// -FHDR------------------------------------------------------------ + + +#ifndef __UCP_PRINTF_H__ +#define __UCP_PRINTF_H__ + +#include +#include "spu_log.h" + +#define PRINT_OFF 0x00000000 // close all PRINT +#define PRINT_ERROR 0x00000001 +#define PRINT_WARN 0x00000002 +#define PRINT_LOG 0x00000004 +#define PRINT_DEBUG 0x00000008 +#define PRINT_TICK 0x00000010 + +//#define UCP_PRINT_LEVEL (PRINT_OFF) +//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_WARN |PRINT_LOG | PRINT_DEBUG | PRINT_TICK) +//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_DEBUG) +#define UCP_PRINT_LEVEL (PRINT_ERROR) + + +#if (UCP_PRINT_LEVEL & PRINT_ERROR) +//#define UCP_PRINT_ERROR(fmt, args...) printf(__FILE__ ": [ERROR]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) +#define UCP_PRINT_ERROR(fmt, args...) spu_log_output(LOG_ERROR, "[ERROR]:" fmt "\n", ##args) +#else +#define UCP_PRINT_ERROR(fmt, args...) +#endif + +#if (UCP_PRINT_LEVEL & PRINT_WARN) +//#define UCP_PRINT_WARN(fmt, args...) printf(__FILE__ ": [WARN]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) +#define UCP_PRINT_WARN(fmt, args...) spu_log_output(LOG_WARN, "[WARN]:" fmt "\n", ##args) +#else +#define UCP_PRINT_WARN(fmt, args...) +#endif + +#if (UCP_PRINT_LEVEL & PRINT_LOG) +//#define UCP_PRINT_LOG(fmt, args...) printf(__FILE__ ": [LOG]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) +#define UCP_PRINT_LOG(fmt, args...) spu_log_output(LOG_INFO, "[LOG]:" fmt "\n", ##args) +#else +#define UCP_PRINT_LOG(fmt, args...) +#endif + +#if (UCP_PRINT_LEVEL & PRINT_DEBUG) +//#define UCP_PRINT_LOG(fmt, args...) printf(__FILE__ ": [LOG]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) +#define UCP_PRINT_DEBUG(fmt, args...) spu_log_output(LOG_DEBUG, "[DEBUG]:" fmt "\n", ##args) +#else +#define UCP_PRINT_DEBUG(fmt, args...) +#endif + +#if (UCP_PRINT_LEVEL & PRINT_TICK) +//#define UCP_PRINT_TICK(fmt, args...) printf(__FILE__ ": [TICK]: %d: %s():" fmt "\n", __LINE__, __func__, ##args) +#define UCP_PRINT_TICK(fmt, args...) spu_log_output(LOG_TICK, "[TICK]:" fmt "\n", ##args) +#else +#define UCP_PRINT_TICK(fmt, args...) +#endif + +#define UCP_PRINT_EMPTY(fmt, args...) + +#endif + diff --git a/public/make/ld/ape0-Cache128-noMPUC.ld b/public/make/ld/ape0-Cache128-noMPUC.ld new file mode 100644 index 0000000..f1cef83 --- /dev/null +++ b/public/make/ld/ape0-Cache128-noMPUC.ld @@ -0,0 +1,167 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x240000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ; + +CORE(ape0); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + .rodata : { *(.rodata*) + ASSERT((. <= 0x23C000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7200000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7300000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9c000000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9c400000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9c400000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ape1-Cache128-noMPUC.ld b/public/make/ld/ape1-Cache128-noMPUC.ld new file mode 100644 index 0000000..23ed195 --- /dev/null +++ b/public/make/ld/ape1-Cache128-noMPUC.ld @@ -0,0 +1,166 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x400000 - 0x40)) ;/* DM7 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ + +CORE(ape1); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + .rodata :{ *(.rodata*) + ASSERT((. <= 0x3FC000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7300000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7400000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9c400000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9c800000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9c800000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ape2-Cache128-noMPUC.ld b/public/make/ld/ape2-Cache128-noMPUC.ld new file mode 100644 index 0000000..58c6fe1 --- /dev/null +++ b/public/make/ld/ape2-Cache128-noMPUC.ld @@ -0,0 +1,166 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x240000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23F000) ;/* SPU Vector Stack = 4KB, no MPU Stack */ +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ; + +CORE(ape0); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23F000), "Error: No room for .DM0"); + } + .rodata : { *(.rodata*) + ASSERT((. <= 0x23F000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7400000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7500000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9c800000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9cc00000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9cc00000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} diff --git a/public/make/ld/ape3-Cache128-noMPUC.ld b/public/make/ld/ape3-Cache128-noMPUC.ld new file mode 100644 index 0000000..1aba49e --- /dev/null +++ b/public/make/ld/ape3-Cache128-noMPUC.ld @@ -0,0 +1,166 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x400000 - 0x40)) ;/* DM7 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FF000) ;/* SPU Vector Stack = 4KB, no MPU Stack */ + +CORE(ape1); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FF000), "Error: No room for .DM7"); + } + .rodata :{ *(.rodata*) + ASSERT((. <= 0x3FF000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7500000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7600000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9cc00000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9d000000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9d000000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ape4-Cache128-noMPUC.ld b/public/make/ld/ape4-Cache128-noMPUC.ld new file mode 100644 index 0000000..11c1bc7 --- /dev/null +++ b/public/make/ld/ape4-Cache128-noMPUC.ld @@ -0,0 +1,167 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x240000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ; + +CORE(ape0); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + .rodata : { *(.rodata*) + ASSERT((. <= 0x23C000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7600000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7700000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9d000000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9d400000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9d400000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ape5-Cache128-noMPUC.ld b/public/make/ld/ape5-Cache128-noMPUC.ld new file mode 100644 index 0000000..199ebf1 --- /dev/null +++ b/public/make/ld/ape5-Cache128-noMPUC.ld @@ -0,0 +1,166 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x400000 - 0x40)) ;/* DM7 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ + +CORE(ape1); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + .rodata :{ *(.rodata*) + ASSERT((. <= 0x3FC000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7700000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7800000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9d400000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9d800000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9d800000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ape6-Cache128-noMPUC.ld b/public/make/ld/ape6-Cache128-noMPUC.ld new file mode 100644 index 0000000..f59e32e --- /dev/null +++ b/public/make/ld/ape6-Cache128-noMPUC.ld @@ -0,0 +1,167 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x240000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ; + +CORE(ape0); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + .rodata : { *(.rodata*) + ASSERT((. <= 0x23C000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7800000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7900000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + . = 0x9d800000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9dc00000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9dc00000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} diff --git a/public/make/ld/ape7-Cache128-noMPUC.ld b/public/make/ld/ape7-Cache128-noMPUC.ld new file mode 100644 index 0000000..fe3280d --- /dev/null +++ b/public/make/ld/ape7-Cache128-noMPUC.ld @@ -0,0 +1,166 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x400000 - 0x40)) ;/* DM7 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x23C000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x280000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x3FC000) ;/* SPU Vector Stack = 16KB, no MPU Stack */ + +CORE(ape1); +CACHE_SIZE(128); + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +/* All text code & data are in IM */ +SECTIONS { + /* All .data & .bss are located in IM */ + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } + .sbss : { *(.sbss.2*) } + .sbss : { *(.sbss.4*) } + .sbss : { *(.sbss.8*) } + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } + .sdata : { *(.sdata.2*) } + .sdata : { *(.sdata.4*) } + .sdata : { *(.sdata.8*) } + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + . = 0x40000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.m0) + ASSERT((. <= 0x80000), "Error: No room for MPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : AT(__section_end) { *( .DM0 ) + ASSERT((. <= 0x23C000), "Error: No room for .DM0"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : AT(__section_end) { *( .DM1 ) + ASSERT((. <= 0x280000), "Error: No room for .DM1"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + . = 0x280000; + HIDDEN(__section_start = .); + .DM2 : AT(__section_end) { *( .DM2 ) + ASSERT((. <= 0x2c0000), "Error: No room for .DM2"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM2 */ + __ucps2_d2heap_start = ALIGN(0x8); + + . = 0x2c0000; + HIDDEN(__section_start = .); + .DM3 : AT(__section_end) { *( .DM3 ) + ASSERT((. <= 0x300000), "Error: No room for .DM3"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM3*/ + __ucps2_d3heap_start = ALIGN(0x8); + + . = 0x300000; + HIDDEN(__section_start = .); + .DM4 : AT(__section_end) { *( .DM4 ) + ASSERT((. <= 0x340000), "Error: No room for .DM4"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM4*/ + __ucps2_d4heap_start = ALIGN(0x8); + + . = 0x340000; + HIDDEN(__section_start = .); + .DM5 : AT(__section_end) { *( .DM5 ) + ASSERT((. <= 0x380000), "Error: No room for .DM5"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM5*/ + __ucps2_d5heap_start = ALIGN(0x8); + + . = 0x380000; + HIDDEN(__section_start = .); + .DM6 : AT(__section_end) { *( .DM6 ) + ASSERT((. <= 0x3c0000), "Error: No room for .DM6"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM6*/ + __ucps2_d6heap_start = ALIGN(0x8); + + . = 0x3C0000; + HIDDEN(__section_start = .); + .DM7 : AT(__section_end) { *( .DM7 ) + ASSERT((. <= 0x3FC000), "Error: No room for .DM7"); + } + .rodata :{ *(.rodata*) + ASSERT((. <= 0x3FC000), "Error: No room for .rodata"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM7*/ + __ucps2_d7heap_start = ALIGN(0x8); + + . = 0x04000000; + HIDDEN(__section_start = .); + .virt.sm : AT(__section_end) { *(.virt.sm) + ASSERT((. <= 0x04200000), "Error: No room for virtual share memory"); + } + .noinit.MREG : + { + *(noinit.MREG) + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + /* Place .LOG section in DDR */ + . = 0xB7900000; + HIDDEN(__section_start = .); + .log : AT(__section_end) { *( .LOG ) + ASSERT((. <= 0xB7A00000), "Error: No room for log"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + . = 0x9dc00000; + HIDDEN(__section_start = .); + .text : AT(__section_end) { *(.text.start) + ASSERT((. <= 0x9e000000), "Error: No room for SPU start .text"); + } + .text : { *(.text*) + ASSERT((. <= 0x9e000000), "Error: No room for SPU's .text"); + } + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ecs-rfm-spu0-noCache.ld b/public/make/ld/ecs-rfm-spu0-noCache.ld new file mode 100644 index 0000000..de20349 --- /dev/null +++ b/public/make/ld/ecs-rfm-spu0-noCache.ld @@ -0,0 +1,107 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x220000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x220000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x260000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x400000) ; + + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +PHDRS { + TEXT PT_LOAD; + DATA PT_LOAD; + RODATA PT_LOAD; + DM0 PT_LOAD; + DM1 PT_LOAD; + LOG PT_LOAD; +} + +/* All text code & data are in IM */ +SECTIONS { + /* All .text & .data & .bss are located in IM */ + . = 0x000000; + .text : { *(.text.start) + ASSERT((. <= 0x40000), "Error: No room for SPU start .text"); + } : TEXT + + .text : { *(.text*) + ASSERT((. <= 0x40000), "Error: No room for SPU's .text"); + } : TEXT + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } : DATA + .sbss : { *(.sbss.2*) } : DATA + .sbss : { *(.sbss.4*) } : DATA + .sbss : { *(.sbss.8*) } : DATA + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } : DATA + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } : DATA + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } : DATA + .sdata : { *(.sdata.2*) } : DATA + .sdata : { *(.sdata.4*) } : DATA + .sdata : { *(.sdata.8*) } : DATA + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } : DATA + .rodata : { *(.rodata*) + ASSERT((. <= 0x40000), "Error: No room for .rodata"); + } : RODATA + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : { *( .DM0 ) + ASSERT((. <= 0x220000), "Error: No room for .DM0"); + } : DM0 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : { *( .DM1 ) + ASSERT((. <= 0x260000), "Error: No room for .DM1"); + } : DM1 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + __section_end = .; + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + __ucps2_d2heap_start = 0x2c0000; + __ucps2_d3heap_start = 0x300000; + __ucps2_d4heap_start = 0x340000; + __ucps2_d5heap_start = 0x380000; + __ucps2_d6heap_start = 0x3c0000; + __ucps2_d7heap_start = 0x400000; + + /* Place .LOG section in DDR */ + . = 0xB7C00000; + HIDDEN(__section_start = .); + .log : { *( .LOG ) + ASSERT((. <= 0xB7D00000), "Error: No room for log"); + } : LOG + /*HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end);*/ + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/ecs-rfm-spu1-Cache128.ld b/public/make/ld/ecs-rfm-spu1-Cache128.ld new file mode 100644 index 0000000..21aed01 --- /dev/null +++ b/public/make/ld/ecs-rfm-spu1-Cache128.ld @@ -0,0 +1,115 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x260000 - 0x40)) ;/* DM1 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x220000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x260000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x400000) ; + +#CORE(ecs_rfm1); +CACHE_SIZE(128); +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +PHDRS { + DATA PT_LOAD; + RODATA PT_LOAD; + DM0 PT_LOAD; + DM1 PT_LOAD; + TEXT PT_LOAD; + DDR0 PT_LOAD; + LOG PT_LOAD; +} + +/* All text code & data are in IM */ +SECTIONS { + . = 0x20000; /* icache size: 128KB */ + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } : DATA + .sbss : { *(.sbss.2*) } : DATA + .sbss : { *(.sbss.4*) } : DATA + .sbss : { *(.sbss.8*) } : DATA + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } : DATA + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } : DATA + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } : DATA + .sdata : { *(.sdata.2*) } : DATA + .sdata : { *(.sdata.4*) } : DATA + .sdata : { *(.sdata.8*) } : DATA + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } : DATA + .rodata : { *(.rodata*) + ASSERT((. <= 0x40000), "Error: No room for .rodata"); + } : RODATA + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : { *( .DM0 ) + ASSERT((. <= 0x220000), "Error: No room for .DM0"); + } : DM0 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : { *( .DM1 ) + ASSERT((. <= 0x260000), "Error: No room for .DM1"); + } : DM1 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + __section_end = .; + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + + __ucps2_d2heap_start = 0x2c0000; + __ucps2_d3heap_start = 0x300000; + __ucps2_d4heap_start = 0x340000; + __ucps2_d5heap_start = 0x380000; + __ucps2_d6heap_start = 0x3c0000; + __ucps2_d7heap_start = 0x400000; + +/* Place .LOG section in DDR */ + . = 0xB7D00000; + HIDDEN(__section_start = .); + .log : { *( .LOG ) + ASSERT((. <= 0xB7E00000), "Error: No room for log"); + } : LOG + /*HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end);*/ + . = 0x9fe00000; + .text : { *(.text.start) + ASSERT((. <= 0xa0000000), "Error: No room for SPU start .text"); + } : TEXT + + .text : { *(.text*) + ASSERT((. <= 0xa0000000), "Error: No room for SPU's .text"); + } : TEXT + + . = 0xb3e00000; + .ddr0 : { *(.DDR0) + ASSERT((. <= 0xb4200000), "Error: No room for DDR0 section"); + } : DDR0 + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/pet-rfm-spu0-noCache.ld b/public/make/ld/pet-rfm-spu0-noCache.ld new file mode 100644 index 0000000..ea43926 --- /dev/null +++ b/public/make/ld/pet-rfm-spu0-noCache.ld @@ -0,0 +1,107 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x220000 - 0x40)) ;/* DM0 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x220000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x260000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x400000) ; + + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +PHDRS { + TEXT PT_LOAD; + DATA PT_LOAD; + RODATA PT_LOAD; + DM0 PT_LOAD; + DM1 PT_LOAD; + LOG PT_LOAD; +} + +/* All text code & data are in IM */ +SECTIONS { + /* All .text & .data & .bss are located in IM */ + . = 0x000000; + .text : { *(.text.start) + ASSERT((. <= 0x40000), "Error: No room for SPU start .text"); + } : TEXT + + .text : { *(.text*) + ASSERT((. <= 0x40000), "Error: No room for SPU's .text"); + } : TEXT + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } : DATA + .sbss : { *(.sbss.2*) } : DATA + .sbss : { *(.sbss.4*) } : DATA + .sbss : { *(.sbss.8*) } : DATA + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } : DATA + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } : DATA + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } : DATA + .sdata : { *(.sdata.2*) } : DATA + .sdata : { *(.sdata.4*) } : DATA + .sdata : { *(.sdata.8*) } : DATA + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } : DATA + .rodata : { *(.rodata*) + ASSERT((. <= 0x40000), "Error: No room for .rodata"); + } : RODATA + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : { *( .DM0 ) + ASSERT((. <= 0x220000), "Error: No room for .DM0"); + } : DM0 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : { *( .DM1 ) + ASSERT((. <= 0x260000), "Error: No room for .DM1"); + } : DM1 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + __section_end = .; + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + __ucps2_d2heap_start = 0x2c0000; + __ucps2_d3heap_start = 0x300000; + __ucps2_d4heap_start = 0x340000; + __ucps2_d5heap_start = 0x380000; + __ucps2_d6heap_start = 0x3c0000; + __ucps2_d7heap_start = 0x400000; + + /* Place .LOG section in DDR */ + . = 0xB7A00000; + HIDDEN(__section_start = .); + .log : { *( .LOG ) + ASSERT((. <= 0xB7B00000), "Error: No room for log"); + } : LOG + /*HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end);*/ + + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/ld/pet-rfm-spu1-noCache.ld b/public/make/ld/pet-rfm-spu1-noCache.ld new file mode 100644 index 0000000..980f019 --- /dev/null +++ b/public/make/ld/pet-rfm-spu1-noCache.ld @@ -0,0 +1,111 @@ +ENTRY( __ucps2_init ) ; +PROVIDE(__ucps2_istack_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_dstack_bottom = (0x260000 - 0x40)) ;/* DM1 */ +PROVIDE(__ucps2_heap_bottom = (0x40000 - 0x40)) ; +PROVIDE(__ucps2_d0heap_bottom = 0x220000) ; +PROVIDE(__ucps2_d1heap_bottom = 0x260000) ; +PROVIDE(__ucps2_d2heap_bottom = 0x2c0000) ; +PROVIDE(__ucps2_d3heap_bottom = 0x300000) ; +PROVIDE(__ucps2_d4heap_bottom = 0x340000) ; +PROVIDE(__ucps2_d5heap_bottom = 0x380000) ; +PROVIDE(__ucps2_d6heap_bottom = 0x3c0000) ; +PROVIDE(__ucps2_d7heap_bottom = 0x400000) ; + + +/**************************************************************** + * The segments definition, which affect the load address of the + * elf. + */ + +PHDRS { + TEXT PT_LOAD; + DATA PT_LOAD; + RODATA PT_LOAD; + DM0 PT_LOAD; + DM1 PT_LOAD; + DDR0 PT_LOAD; + LOG PT_LOAD; +} + +/* All text code & data are in IM */ +SECTIONS { + /* All .text & .data & .bss are located in IM */ + . = 0x000000; + .text : { *(.text.start) + ASSERT((. <= 0x40000), "Error: No room for SPU start .text"); + } : TEXT + + .text : { *(.text*) + ASSERT((. <= 0x40000), "Error: No room for SPU's .text"); + } : TEXT + + /* tag start point for bss */ + __ucps2_bss_start = ALIGN(0x4); + .sbss : { *(.sbss.1*) } : DATA + .sbss : { *(.sbss.2*) } : DATA + .sbss : { *(.sbss.4*) } : DATA + .sbss : { *(.sbss.8*) } : DATA + .sbss : { *(.sbss*) + ASSERT((. <= 0x40000), "Error: No room for .sbss"); + } : DATA + .bss : { *(.bss*) + ASSERT((. <= 0x40000), "Error: No room for .bss"); + } : DATA + __ucps2_bss_end = ALIGN(0x4); + .sdata : { *(.sdata.1*) } : DATA + .sdata : { *(.sdata.2*) } : DATA + .sdata : { *(.sdata.4*) } : DATA + .sdata : { *(.sdata.8*) } : DATA + .sdata : { *(.sdata*) + ASSERT((. <= 0x40000), "Error: No room for .sdata"); + } : DATA + .rodata : { *(.rodata*) + ASSERT((. <= 0x40000), "Error: No room for .rodata"); + } : RODATA + HIDDEN(__section_end = ALIGN(4)); + + /* tag start point for heap */ + __ucps2_heap_start = ALIGN(0x8); + + /********************************************/ + . = 0x200000; + HIDDEN(__section_start = .); + .DM0 : { *( .DM0 ) + ASSERT((. <= 0x220000), "Error: No room for .DM0"); + } : DM0 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + /* tag start point for heap in DM0 */ + __ucps2_d0heap_start = ALIGN(0x8); + + . = 0x240000; + HIDDEN(__section_start = .); + .DM1 : { *( .DM1 ) + ASSERT((. <= 0x260000), "Error: No room for .DM1"); + } : DM1 + HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end); + __section_end = .; + /* tag start point for heap in DM1 */ + __ucps2_d1heap_start = ALIGN(0x8); + + __ucps2_d2heap_start = 0x2c0000; + __ucps2_d3heap_start = 0x300000; + __ucps2_d4heap_start = 0x340000; + __ucps2_d5heap_start = 0x380000; + __ucps2_d6heap_start = 0x3c0000; + __ucps2_d7heap_start = 0x400000; + /* Place .LOG section in DDR */ + . = 0xB7B00000; + HIDDEN(__section_start = .); + .log : { *( .LOG ) + ASSERT((. <= 0xB7C00000), "Error: No room for log"); + } : LOG + /*HIDDEN(__section_end = ALIGN(4) - __section_start + __section_end);*/ + + . = 0xb3e00000; + .ddr0 : { *(.DDR0) + ASSERT((. <= 0xb4200000), "Error: No room for DDR0 section"); + } : DDR0 + HIDDEN(__section_start = 0xffffffff); + HIDDEN(__section_end = 0xffffffff); +} + diff --git a/public/make/makefile.ape_spu b/public/make/makefile.ape_spu index 0607ec1..7afe52c 100644 --- a/public/make/makefile.ape_spu +++ b/public/make/makefile.ape_spu @@ -22,8 +22,10 @@ LD_FLAGS += -lsmartos #DEFINES += OSP_ENABLE -idx := $(shell echo $$(($(ape_id) % 2))) -LINK_FILE := $(UCP_INC)/ape$(idx)-Cache128-noMPUC.ld +#idx := $(shell echo $$(($(ape_id) % 2))) +#LINK_FILE := $(UCP_INC)/ape$(idx)-Cache128-noMPUC.ld +idx := $(shell echo $$(($(ape_id)))) +LINK_FILE := $(DIR_MAKE)/ld/ape$(idx)-Cache128-noMPUC.ld DIR_APE_DD := $(DIR_APE)/driver DIR_APE_OSP := $(DIR_APE)/osp diff --git a/public/make/makefile.ecs_rfm_spu0 b/public/make/makefile.ecs_rfm_spu0 index 3f761b7..c50dbc4 100644 --- a/public/make/makefile.ecs_rfm_spu0 +++ b/public/make/makefile.ecs_rfm_spu0 @@ -21,7 +21,7 @@ DIRS_LIB_FOLDER += $(DIR_LIB)/rfm_spu LD_FLAGS += -linterrupt #LINK_FILE := $(UCP_INC)/ECS_RFM-spu0-noCache.ld -LINK_FILE := $(DIR_MAKE)/rfm-spu0-noCache.ld +LINK_FILE := $(DIR_MAKE)/ld/ecs-rfm-spu0-noCache.ld DIRS_SRC_FOLDER += $(DIR_COMMON)/ecs_dm DIRS_SRC_FOLDER += $(DIR_COMMON)/app diff --git a/public/make/makefile.ecs_rfm_spu1 b/public/make/makefile.ecs_rfm_spu1 index 18e5930..9f10146 100644 --- a/public/make/makefile.ecs_rfm_spu1 +++ b/public/make/makefile.ecs_rfm_spu1 @@ -22,7 +22,7 @@ LD_FLAGS += -linterrupt #LINK_FILE := $(UCP_INC)/ECS_RFM-spu1-noCache.ld #LINK_FILE := $(DIR_MAKE)/rfm-spu1-noCache.ld -LINK_FILE := $(DIR_MAKE)/rfm-spu1-Cache128.ld +LINK_FILE := $(DIR_MAKE)/ld/ecs-rfm-spu1-Cache128.ld DIRS_SRC_FOLDER += $(DIR_COMMON)/ecs_dm DIRS_SRC_FOLDER += $(DIR_COMMON)/app diff --git a/public/make/makefile.pet_rfm_spu0 b/public/make/makefile.pet_rfm_spu0 index 2062f67..f512dd7 100644 --- a/public/make/makefile.pet_rfm_spu0 +++ b/public/make/makefile.pet_rfm_spu0 @@ -23,7 +23,7 @@ DIRS_LIB_FOLDER += $(DIR_LIB)/rfm_spu LD_FLAGS += -linterrupt #LINK_FILE := $(UCP_INC)/PT_RFM-spu0-noCache.ld -LINK_FILE := $(DIR_MAKE)/rfm-spu0-noCache.ld +LINK_FILE := $(DIR_MAKE)/ld/pet-rfm-spu0-noCache.ld DIRS_SRC_FOLDER += $(DIR_PET_SPU0)/top DIRS_SRC_FOLDER += $(DIR_PET_SPU0)/driver diff --git a/public/make/makefile.pet_rfm_spu1 b/public/make/makefile.pet_rfm_spu1 index 149bdca..e90f3ef 100644 --- a/public/make/makefile.pet_rfm_spu1 +++ b/public/make/makefile.pet_rfm_spu1 @@ -22,7 +22,7 @@ LD_FLAGS += -linterrupt #LINK_FILE := $(UCP_INC)/PT_RFM-spu1-noCache.ld #LINK_FILE := $(UCP_INC)/rfm-spu1-noCache.ld -LINK_FILE := $(DIR_MAKE)/rfm-spu1-noCache.ld +LINK_FILE := $(DIR_MAKE)/ld/pet-rfm-spu1-noCache.ld DIRS_SRC_FOLDER += $(DIR_PET_SPU1)/top DIRS_SRC_FOLDER += $(DIR_COMMON)/app