From nobody Thu Oct 30 05:28:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=mail.uni-paderborn.de Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525184701923673.2676843999474; Tue, 1 May 2018 07:25:01 -0700 (PDT) Received: from localhost ([::1]:42765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDWDF-0006Ck-74 for importer@patchew.org; Tue, 01 May 2018 10:25:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDWBC-0004uz-LF for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDWB9-00034v-Df for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:54 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:51898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fDWB9-00033o-7D for qemu-devel@nongnu.org; Tue, 01 May 2018 10:22:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.uni-paderborn.de; s=20170601; h=References:In-Reply-To:Message-Id:Date :Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CJxUya8F9g+axwd+wX50hjz1+p24EDhDJMg885JVk1k=; b=ulh6DZsLC01beRds+sILtoSC7 9aC2jL18q6VP1iXvYtNQikRxZ+VzLh8Ly2Dey3Qx39BJ9nSFLXebrOvU/li2A1yW3cEGbkHPkwW7w jjK5Eso5/wXdyxtYcRUvBiGMYd8YLrilK6Uyr3AwJ94yO4dW/LUVbAnz/ovUx7oNWTQFQ=; From: Bastian Koppelmann To: qemu-devel@nongnu.org Date: Tue, 1 May 2018 16:22:12 +0200 Message-Id: <20180501142222.19154-3-kbastian@mail.uni-paderborn.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180501142222.19154-1-kbastian@mail.uni-paderborn.de> References: <20180501142222.19154-1-kbastian@mail.uni-paderborn.de> X-IMT-Spam-Score: 0.0 () X-PMX-Version: 6.4.2.2738846, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2018.5.1.141516, AntiVirus-Engine: 5.49.1, AntiVirus-Data: 2018.4.9.5491000 X-IMT-Authenticated-Sender: uid=kbastian,ou=People,o=upb,c=de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 131.234.142.9 Subject: [Qemu-devel] [RFC PATCH 02/12] tests/tcg/tricore: Add build infrastructure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" this includes the Makefile and linker script to build all the tests. Signed-off-by: Bastian Koppelmann --- tests/tcg/tricore/Makefile | 30 +++++++++++++++++++++++ tests/tcg/tricore/link.ld | 60 ++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 90 insertions(+) create mode 100644 tests/tcg/tricore/Makefile create mode 100644 tests/tcg/tricore/link.ld diff --git a/tests/tcg/tricore/Makefile b/tests/tcg/tricore/Makefile new file mode 100644 index 0000000000..8c168d1062 --- /dev/null +++ b/tests/tcg/tricore/Makefile @@ -0,0 +1,30 @@ +AS :=3D tricore-as +LD :=3D tricore-ld +HOST_CC =3D gcc + +LDFLAGS =3D -Tlink.ld +ASFLAGS =3D + +SIM =3D ../../../tricore-softmmu/qemu-system-tricore +SIMFLAGS =3D -M tricore_testboard -nographic -kernel + +all: build + +%.pS: %.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o link.ld + $(LD) $(LDFLAGS) $< -o $@ + +build: $(TESTCASES) + +check: $(addprefix run-, $(TESTCASES)) + +run-%.tst: %.tst + $(SIM) $(SIMFLAGS) ./$< + +clean: + $(RM) -fr $(TESTCASES) linker.ld diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org =3D 0x80000000, len =3D 15K + data_ram (w!xp): org =3D 0xd0000000, len =3D 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE =3D DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN =3D 0xd0000000 ; +__CSA_SIZE =3D 8k ; +__CSA_END =3D __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . =3D ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . =3D ALIGN(8) ; + *(.data) + *(.data.*) + . =3D ALIGN(8) ; + __USTACK =3D . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE =3D . ; + *(.bss) + *(COMMON) + . =3D ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. =3D ASSERT ((__CSA_BEGIN & 0x3f) =3D=3D 0 , "illegal CSA start addres= s") ; + _. =3D ASSERT ((__CSA_SIZE & 0x3f) =3D=3D 0 , "illegal CSA size") ; + +} --=20 2.11.0